mainwindow.cpp
changeset 364 7b74fa3772bf
parent 354 1c6c6a1c411f
child 366 e95081c21da2
     1.1 --- a/mainwindow.cpp	Fri Jun 16 10:29:37 2006 +0000
     1.2 +++ b/mainwindow.cpp	Tue Sep 05 09:47:13 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