diff -r 1fc21685e3ea -r ab118b86bc54 exports.cpp --- a/exports.cpp Mon May 21 13:05:26 2007 +0000 +++ b/exports.cpp Wed May 30 15:23:07 2007 +0000 @@ -111,7 +111,6 @@ return r + " "; } - //////////////////////////////////////////////////////////////////////// void ExportASCII::doExport() { @@ -131,7 +130,6 @@ bo=mapCenter->first(); while (bo) { - cout << "export bo="<getHeading().ascii()<getDepth();i++) actIndent+= indentPerDepth; @@ -162,6 +160,50 @@ file.close(); } + +//////////////////////////////////////////////////////////////////////// +void ExportCSV::doExport() +{ + QFile file (outputFile); + if ( !file.open( QIODevice::WriteOnly ) ) + { + qWarning ("ExportBase::exportXML couldn't open "+outputFile); + return; + } + QTextStream ts( &file ); // use LANG decoding here... + + // Write header + ts << "\"Note\"" <first(); + while (bo) + { + // If necessary, write note + if (!bo->getNote().isEmpty()) + { + s =bo->getNoteASCII(); + s=s.replace ("\n","\n"+actIndent); + ts << ("\""+s+"\","); + } else + ts <<"\"\","; + + // Make indentstring + for (i=0;igetDepth();i++) actIndent+= "\"\","; + + // Write heading + ts << actIndent << "\"" << bo->getHeading()<<"\""<next(); + actIndent=""; + } + file.close(); +} + //////////////////////////////////////////////////////////////////////// void ExportKDEBookmarks::doExport() {