1.1 --- a/exports.cpp Wed Feb 01 16:14:55 2006 +0000
1.2 +++ b/exports.cpp Tue Feb 21 16:18:23 2006 +0000
1.3 @@ -4,7 +4,6 @@
1.4 #include "file.h"
1.5 #include "linkablemapobj.h"
1.6 #include "misc.h"
1.7 -#include "texteditor.h"
1.8 #include "mainwindow.h"
1.9
1.10 extern Main *mainWindow;
1.11 @@ -31,6 +30,7 @@
1.12
1.13 QString ExportBase::getSectionString(BranchObj *bostart)
1.14 {
1.15 + // Make prefix like "2.5.3" for "bo:2,bo:5,bo:3"
1.16 QString r;
1.17 BranchObj *bo=bostart;
1.18 int depth=bo->getDepth();
1.19 @@ -69,8 +69,6 @@
1.20 // Make indentstring
1.21 for (i=0;i<bo->getDepth();i++) actIndent+= indentPerDepth;
1.22
1.23 - // Write heading
1.24 - // write (actIndent + getSectionString(bo) + bo->getHeading()+ "\n");
1.25 if (bo->getDepth()==0)
1.26 {
1.27 ts << (bo->getHeading()+ "\n");
1.28 @@ -106,8 +104,8 @@
1.29 // that makes a full LaTex document.
1.30 QFile file (outputFile);
1.31 if ( !file.open( IO_WriteOnly ) ) {
1.32 - // FIXME
1.33 - cout << "Export::exportMap couldn't open "<<outputFile<<endl;
1.34 + QMessageBox::critical (0,QObject::tr("Critical Export Error"),QObject::tr("Could not write %1").arg(outputFile));
1.35 + mainWindow->statusMessage(QString(QObject::tr("Export failed.")));
1.36 return;
1.37 }
1.38 QTextStream ts( &file ); // use LANG decoding here...
1.39 @@ -247,7 +245,8 @@
1.40 QFile f (contentFile);
1.41 if ( !f.open( IO_WriteOnly ) )
1.42 {
1.43 - mainWindow->statusMessage(QString(QObject::tr("Could not write to %1")).arg(contentFile));
1.44 + QMessageBox::critical (0,QObject::tr("Critical Export Error"),QObject::tr("Could not write %1").arg(contentFile));
1.45 + mainWindow->statusMessage(QString(QObject::tr("Export failed.")));
1.46 return;
1.47 }
1.48