r13786 by jghali - scribus150format : more legacy code cleanup

scribus-commit scribus-commit at lists.scribus.net
Tue Jul 21 08:45:28 CEST 2009


Revision: 13786
Author: jghali
Date: 2009-07-21T06:43:03.818563Z
Commit message: scribus150format : more legacy code cleanup

Changeset: 
M  /trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
M  /trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h

Diffs:
Index: scribus/plugins/fileloader/scribus150format/scribus150format.h
===================================================================
--- scribus/plugins/fileloader/scribus150format/scribus150format.h	(revision 13785)
+++ scribus/plugins/fileloader/scribus150format/scribus150format.h	(revision 13786)
@@ -94,7 +94,7 @@
 		void readCharacterStyleAttrs(ScribusDoc *doc, ScXmlStreamAttributes& attrs, CharStyle & newStyle);
 		bool readDocItemAttributes(ScribusDoc *doc, ScXmlStreamReader& reader);
 		bool readHyphen(ScribusDoc *doc, ScXmlStreamReader& reader);
-		bool readItemText(PageItem* item, ScXmlStreamAttributes& attrs, LastStyles* last, bool impo=false, bool VorLFound=false);
+		bool readItemText(PageItem* item, ScXmlStreamAttributes& attrs, LastStyles* last);
 		bool readLatexInfo(PageItem_LatexFrame* item, ScXmlStreamReader& reader);
 		void readLayers(ScLayer& layer, ScXmlStreamAttributes& attrs);
 		bool readMultiline(multiLine& ml, ScXmlStreamReader& reader);
@@ -148,8 +148,6 @@
 
 		int itemCount;
 		int itemCountM;
-		QMap<uint,QString> DoVorl;
-		uint VorlC;
 };
 
 extern "C" PLUGIN_API int scribus150format_getPluginAPIVersion();
Index: scribus/plugins/fileloader/scribus150format/scribus150format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(revision 13785)
+++ scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(revision 13786)
@@ -1979,7 +1979,7 @@
 	return success;
 }
 
-bool Scribus150Format::readItemText(PageItem *obj, ScXmlStreamAttributes& attrs, LastStyles* last, bool impo, bool VorLFound)
+bool Scribus150Format::readItemText(PageItem *obj, ScXmlStreamAttributes& attrs, LastStyles* last)
 {
 	QString tmp2;
 	CharStyle newStyle;
@@ -2716,7 +2716,6 @@
 	QMap<PageItem*, int> groupID;
 	double pageX = 0, pageY = 0;
 	bool newVersion = false;
-	bool vorLFound  = false;
 	QMap<int,int> layerTrans;
 	int maxLayer = 0, maxLevel = 0, a = 0;
 
@@ -2738,14 +2737,6 @@
 	itemRemapF.clear();
 	itemNextF.clear();
 
-	DoVorl.clear();
-	DoVorl[0] = "0";
-	DoVorl[1] = "1";
-	DoVorl[2] = "2";
-	DoVorl[3] = "3";
-	DoVorl[4] = "4";
-	VorlC = 5;
-
  	QString f(readSLA(fileName));
 	if (f.isEmpty())
 		return false;
@@ -2844,7 +2835,6 @@
 		if(tagName == "STYLE")
 		{
 			getStyle(vg, reader, NULL, m_Doc, true);
-			vorLFound = true;
 		}
 		if (((tagName == "PAGE") || (tagName == "MASTERPAGE")) && (attrs.valueAsInt("NUM") == pageNumber))
 		{
@@ -3077,11 +3067,6 @@
 		{
 			if (style.equiv((*docParagraphStyles)[xx]))
 			{
-				if (fl)
-				{
-					DoVorl[VorlC] = tmV.setNum(xx);
-					VorlC++;
-				}
 				fou = true;
 			}
 			else
@@ -3092,19 +3077,14 @@
 			break;
 		}
 	}
-	if (!fou)
+	if (!fou && fl)
 	{
 		for (int xx=0; xx< docParagraphStyles->count(); ++xx)
 		{
-			if (style.equiv((*docParagraphStyles)[xx]) && fl)
+			if (style.equiv((*docParagraphStyles)[xx]))
 			{
 				style.setName((*docParagraphStyles)[xx].name());
 				fou = true;
-// 				if (fl)
-				{
-					DoVorl[VorlC] = tmV.setNum(xx);
-					VorlC++;
-				}
 				break;
 			}
 		}
@@ -3119,11 +3099,6 @@
 			tmp.create(style);
 			doc->redefineStyles(tmp, false);
 		}
-		if (fl)
-		{
-			DoVorl[VorlC] = tmV.setNum(docParagraphStyles->count()-1);
-			VorlC++;
-		}
 	}
 }
 




More information about the scribus-commit mailing list