# HG changeset patch
# User insilmaril
# Date 1152780058 0
# Node ID 64819498efbf8840c686e173b8a4d73d87b88f2e
# Parent 08b3473cb7abd7dd330a3efdf5055bcebbe92bd9
Fixed broken check for non-existen OO-export configuration
diff -r 08b3473cb7ab -r 64819498efbf exportoofiledialog.cpp
--- a/exportoofiledialog.cpp Thu Jul 13 08:40:03 2006 +0000
+++ b/exportoofiledialog.cpp Thu Jul 13 08:40:58 2006 +0000
@@ -12,6 +12,11 @@
init();
}
+bool ExportOOFileDialog::foundConfig()
+{
+ return !filters.isEmpty();
+}
+
QString ExportOOFileDialog::selectedConfig()
{
QStringList::Iterator itpath=configPaths.begin();
diff -r 08b3473cb7ab -r 64819498efbf exportoofiledialog.h
--- a/exportoofiledialog.h Thu Jul 13 08:40:03 2006 +0000
+++ b/exportoofiledialog.h Thu Jul 13 08:40:58 2006 +0000
@@ -14,6 +14,7 @@
ExportOOFileDialog (QWidget * parent = 0, const char * name = 0, bool
modal = false);
+ bool foundConfig();
QString selectedConfig();
QString selectedFile();
void addFilter(const QString &);
diff -r 08b3473cb7ab -r 64819498efbf lang/vym_de.ts
--- a/lang/vym_de.ts Thu Jul 13 08:40:03 2006 +0000
+++ b/lang/vym_de.ts Thu Jul 13 08:40:58 2006 +0000
@@ -1292,7 +1292,7 @@
- Kein Treffer gefunden für <b>%1</b>
+ Kein Treffer gefunden für <b>%1</b>
@@ -1640,6 +1640,16 @@
Konnte %1 nicht starten um einen neuen Tab zu öffnen.
+
+
+ Die Konfigurationsdateien für den Export ins Open Office
+Format konnten nicht gefunden werden.
+
+
+
+ Keine Treffer gefunden für "%1"
+
MapEditor
diff -r 08b3473cb7ab -r 64819498efbf lang/vym_en.ts
--- a/lang/vym_en.ts Thu Jul 13 08:40:03 2006 +0000
+++ b/lang/vym_en.ts Thu Jul 13 08:40:58 2006 +0000
@@ -863,10 +863,6 @@
-
-
-
-
@@ -1196,6 +1192,15 @@
+
+
+
+
+
+
+
+
MapEditor
diff -r 08b3473cb7ab -r 64819498efbf lang/vym_es.ts
--- a/lang/vym_es.ts Thu Jul 13 08:40:03 2006 +0000
+++ b/lang/vym_es.ts Thu Jul 13 08:40:58 2006 +0000
@@ -1173,10 +1173,6 @@
-
-
-
-
@@ -1494,6 +1490,15 @@
+
+
+
+
+
+
+
+
MapEditor
diff -r 08b3473cb7ab -r 64819498efbf lang/vym_it.ts
--- a/lang/vym_it.ts Thu Jul 13 08:40:03 2006 +0000
+++ b/lang/vym_it.ts Thu Jul 13 08:40:58 2006 +0000
@@ -1412,10 +1412,6 @@
-
-
-
-
@@ -1503,6 +1499,15 @@
+
+
+
+
+
+
+
+
MapEditor
diff -r 08b3473cb7ab -r 64819498efbf mainwindow.cpp
--- a/mainwindow.cpp Thu Jul 13 08:40:03 2006 +0000
+++ b/mainwindow.cpp Thu Jul 13 08:40:58 2006 +0000
@@ -2039,14 +2039,22 @@
//fd->setPreviewMode( QFileDialog::Contents );
fd->setCaption(__VYM " - " +tr("Export to")+" Open Office");
//fd->setDir (lastImageDir);
- fd->show();
+ if (fd->foundConfig())
+ {
+ fd->show();
- if ( fd->exec() == QDialog::Accepted )
+ if ( fd->exec() == QDialog::Accepted )
+ {
+ QString fn=fd->selectedFile();
+ //lastImageDir=fn.left(fn.findRev ("/"));
+ if (currentMapEditor())
+ currentMapEditor()->exportOOPresentation(fn,fd->selectedConfig());
+ }
+ } else
{
- QString fn=fd->selectedFile();
- //lastImageDir=fn.left(fn.findRev ("/"));
- if (currentMapEditor())
- currentMapEditor()->exportOOPresentation(fn,fd->selectedConfig());
+ QMessageBox::warning(0,
+ tr("Warning"),
+ tr("Couldn't find configuration for export to Open Office\n"));
}
}