r14655 by jghali - #8779 : imported styles are incorrect

scribus-commit scribus-commit at lists.scribus.net
Sun Feb 7 13:01:09 CET 2010


Revision: 14655
Author: jghali
Date: 2010-02-07T11:57:57.573742Z
Commit message: #8779 : imported styles are incorrect

Changeset: 
M  /branches/Version135/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
M  /branches/Version135/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
M  /branches/Version135/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp

Diffs:
Index: scribus/plugins/fileloader/scribus12format/scribus12format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus12format/scribus12format.cpp	(revision 14654)
+++ scribus/plugins/fileloader/scribus12format/scribus12format.cpp	(revision 14655)
@@ -1697,7 +1697,7 @@
 */
 bool Scribus12Format::readStyles(const QString& fileName, ScribusDoc* doc, StyleSet<ParagraphStyle> &docParagraphStyles)
 {
-	ParagraphStyle vg;
+	ParagraphStyle pstyle;
 	QDomDocument docu("scridoc");
 	QString tmpf, tmf;
 // 	DoFonts.clear();
@@ -1718,7 +1718,10 @@
 		{
 			QDomElement pg=PAGE.toElement();
 			if(pg.tagName()=="STYLE")
-				GetStyle(&pg, &vg, &docParagraphStyles, doc, false);
+			{
+				pstyle.erase();
+				GetStyle(&pg, &pstyle, &docParagraphStyles, doc, false);
+			}
 			PAGE=PAGE.nextSibling();
 		}
 		DOC=DOC.nextSibling();
Index: scribus/plugins/fileloader/scribus13format/scribus13format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus13format/scribus13format.cpp	(revision 14654)
+++ scribus/plugins/fileloader/scribus13format/scribus13format.cpp	(revision 14655)
@@ -3084,7 +3084,7 @@
 
 bool Scribus13Format::readStyles(const QString& fileName, ScribusDoc* doc, StyleSet<ParagraphStyle> &docParagraphStyles)
 {
-	ParagraphStyle vg;
+	ParagraphStyle pstyle;
 	QDomDocument docu("scridoc");
 	QString tmpf, tmf;
 	QString f (readSLA(fileName));
@@ -3104,7 +3104,10 @@
 		{
 			QDomElement pg=PAGE.toElement();
 			if(pg.tagName()=="STYLE")
-				GetStyle(&pg, &vg, &docParagraphStyles, doc, false);
+			{
+				pstyle.erase();
+				GetStyle(&pg, &pstyle, &docParagraphStyles, doc, false);
+			}
 			PAGE=PAGE.nextSibling();
 		}
 		DOC=DOC.nextSibling();
Index: scribus/plugins/fileloader/scribus134format/scribus134format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(revision 14654)
+++ scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(revision 14655)
@@ -3491,7 +3491,7 @@
 
 bool Scribus134Format::readStyles(const QString& fileName, ScribusDoc* doc, StyleSet<ParagraphStyle> &docParagraphStyles)
 {
-	ParagraphStyle vg;
+	ParagraphStyle pstyle;
 	QDomDocument docu("scridoc");
 	QString f (readSLA(fileName));
 	if (f.isEmpty())
@@ -3510,7 +3510,10 @@
 		{
 			QDomElement pg=PAGE.toElement();
 			if(pg.tagName()=="STYLE")
-				GetStyle(&pg, &vg, &docParagraphStyles, doc, false);
+			{
+				pstyle.erase();
+				GetStyle(&pg, &pstyle, &docParagraphStyles, doc, false);
+			}
 			PAGE=PAGE.nextSibling();
 		}
 		DOC=DOC.nextSibling();
@@ -3540,6 +3543,7 @@
 			QDomElement pg=PAGE.toElement();
 			if(pg.tagName()=="CHARSTYLE")
 			{
+				cstyle.erase();
 				GetCStyle(&pg, doc, cstyle);
 				docCharStyles.create(cstyle);
 			}




More information about the scribus-commit mailing list