r15621 by fschmid - Fixed Bug #9421: "Error at parsing file", writing QChar variables directly into XML is not a good idea.

scribus-commit scribus-commit at lists.scribus.net
Fri Oct 22 18:31:37 CEST 2010


Author: fschmid
Date: Fri Oct 22 16:31:37 2010
New Revision: 15621

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=15621
Log:
Fixed Bug #9421: "Error at parsing file", writing QChar variables directly into XML is not a good idea.

Modified:
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15621&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Fri Oct 22 16:31:37 2010
@@ -1609,7 +1609,7 @@
 			newSection.reversed = attrs.valueAsBool("Reversed");
 			newSection.active = attrs.valueAsBool("Active");
 			if (attrs.hasAttribute("FillChar"))
-				newSection.pageNumberFillChar = attrs.valueAsString("FillChar").at(0);
+				newSection.pageNumberFillChar = QChar(attrs.valueAsInt("FillChar"));
 			else
 				newSection.pageNumberFillChar = QChar();
 			if (attrs.hasAttribute("FieldWidth"))

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15621&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp Fri Oct 22 16:31:37 2010
@@ -845,7 +845,7 @@
 		docu.writeAttribute("Start", (*it).sectionstartindex);
 		docu.writeAttribute("Reversed", (*it).reversed);
 		docu.writeAttribute("Active", (*it).active);
-		docu.writeAttribute("FillChar", (*it).pageNumberFillChar);
+		docu.writeAttribute("FillChar", (*it).pageNumberFillChar.unicode());
 		docu.writeAttribute("FieldWidth", (*it).pageNumberWidth);
 	}
 	docu.writeEndElement();




More information about the scribus-commit mailing list