1.1 --- a/mainwindow.cpp Fri Jun 16 10:29:37 2006 +0000
1.2 +++ b/mainwindow.cpp Thu Jul 13 08:40:58 2006 +0000
1.3 @@ -2039,14 +2039,22 @@
1.4 //fd->setPreviewMode( QFileDialog::Contents );
1.5 fd->setCaption(__VYM " - " +tr("Export to")+" Open Office");
1.6 //fd->setDir (lastImageDir);
1.7 - fd->show();
1.8 + if (fd->foundConfig())
1.9 + {
1.10 + fd->show();
1.11
1.12 - if ( fd->exec() == QDialog::Accepted )
1.13 + if ( fd->exec() == QDialog::Accepted )
1.14 + {
1.15 + QString fn=fd->selectedFile();
1.16 + //lastImageDir=fn.left(fn.findRev ("/"));
1.17 + if (currentMapEditor())
1.18 + currentMapEditor()->exportOOPresentation(fn,fd->selectedConfig());
1.19 + }
1.20 + } else
1.21 {
1.22 - QString fn=fd->selectedFile();
1.23 - //lastImageDir=fn.left(fn.findRev ("/"));
1.24 - if (currentMapEditor())
1.25 - currentMapEditor()->exportOOPresentation(fn,fd->selectedConfig());
1.26 + QMessageBox::warning(0,
1.27 + tr("Warning"),
1.28 + tr("Couldn't find configuration for export to Open Office\n"));
1.29 }
1.30 }
1.31