# HG changeset patch # User insilmaril # Date 1184671191 0 # Node ID 2913f96fd2337a2511640b97c745f502311065d6 # Parent 55236fe5a6301891c7d4f22e5dff79f6cb37024c 1.9.2 Bugfixes for exports diff -r 55236fe5a630 -r 2913f96fd233 demos/vym-projectplan.vym Binary file demos/vym-projectplan.vym has changed diff -r 55236fe5a630 -r 2913f96fd233 noteobj.cpp --- a/noteobj.cpp Tue Jul 17 11:19:50 2007 +0000 +++ b/noteobj.cpp Tue Jul 17 11:19:51 2007 +0000 @@ -48,32 +48,36 @@ { QString r=note; + // Remove all ... + QRegExp rx (".*"); + rx.setMinimal(true); + r.replace (rx,""); + // convert all "" to "\n" - QRegExp re(""); - re.setMinimal(true); - r.replace (re,"\n"); + rx.setPattern (""); + r.replace (rx,"\n"); // convert all "

" to "\n" - re.setPattern ("

"); - r.replace (re,"\n"); + rx.setPattern ("

"); + r.replace (rx,"\n"); // remove all remaining tags - re.setPattern ("<.*>"); - r.replace (re,""); + rx.setPattern ("<.*>"); + r.replace (rx,""); // If string starts with \n now, remove it. // It would be wrong in an OOo export for example while (r.at(0)=='\n') r.remove (0,1); // convert "&", "<" and ">" - re.setPattern (">"); - r.replace (re,">"); - re.setPattern ("<"); - r.replace (re,"<"); - re.setPattern ("&"); - r.replace (re,"&"); - re.setPattern ("""); - r.replace (re,"\""); + rx.setPattern (">"); + r.replace (rx,">"); + rx.setPattern ("<"); + r.replace (rx,"<"); + rx.setPattern ("&"); + r.replace (rx,"&"); + rx.setPattern ("""); + r.replace (rx,"\""); return r; } @@ -148,14 +152,38 @@ // QTextEdit may generate fontnames with unquoted &, like // in "Lucida B&H". This is invalid in XML and thus would crash // the XML parser - uint pos=0; + + // More invalid XML is generated with bullet lists: + // There are 2