r17642 by jghali - fix a few build warnings

scribus-commit scribus-commit at lists.scribus.net
Tue Jun 26 21:00:21 UTC 2012


Author: jghali
Date: Tue Jun 26 21:00:21 2012
New Revision: 17642

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17642
Log:
fix a few build warnings

Modified:
    trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
    trunk/Scribus/scribus/scpageoutput.cpp
    trunk/Scribus/scribus/text/storytext.cpp

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17642&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp Tue Jun 26 21:00:21 2012
@@ -188,8 +188,6 @@
 	struct ScribusDoc::BookMa bok;
 	QMap<int, ScribusDoc::BookMa> bookmarks;
 
-	bool newVersion = false;
-
 	QMap<int,PageItem*> TableID;
 	QMap<int,PageItem*> TableIDM;
 	QMap<int,PageItem*> TableIDF;
@@ -277,8 +275,6 @@
 				success = false;
 				break;
 			}
-			if (attrs.hasAttribute("Version"))
-				newVersion = true;
 			firstElement = false;
 		}
 		if (tagName == "DOCUMENT")
@@ -3065,7 +3061,6 @@
 	QList<PageItem*> TableItems;
 	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;
@@ -3124,8 +3119,6 @@
 				success = false;
 				break;
 			}
-			if (attrs.hasAttribute("Version"))
-				newVersion = true;
 			firstElement = false;
 		}
 
@@ -3539,7 +3532,7 @@
 			docCharStyles.create(cstyle);
 		}
 	}
-	return true;
+	return success;
 }
 
 bool Scribus134Format::readLineStyles(const QString& fileName, QHash<QString,multiLine> *styles)
@@ -3588,7 +3581,7 @@
 			styles->insert(mlName2, ml);
 		}
 	}
-	return true;
+	return success;
 }
 
 bool Scribus134Format::readColors(const QString& fileName, ColorList & colors)

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17642&path=/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp Tue Jun 26 21:00:21 2012
@@ -170,7 +170,6 @@
 	ParagraphStyle vg;
 	struct ScribusDoc::BookMa bok;
 	int counter;//, Pgc;
-	bool newVersion = false;
 	QString tmp, tmpf, tmp2, tmp3, tmp4, PgNam, Defont, tmf;
 	QFont fo;
 	QMap<int,int> TableID;
@@ -216,8 +215,6 @@
 	QDomElement elem=docu.documentElement();
 	if (elem.tagName() != "SCRIBUSUTF8NEW")
 		return false;
-	if (elem.hasAttribute("Version"))
-		newVersion = true;
 	QDomNode DOC=elem.firstChild();
 	if (m_mwProgressBar!=0)
 	{
@@ -2009,9 +2006,8 @@
 	newReplacement = false;
 	QMap<int,int> TableID;
 	QList<PageItem*> TableItems;
-	int a, counter, baseobj;
+	int a, counter;
 	double pageX = 0, pageY = 0;
-	bool newVersion = false;
 	bool VorLFound = false;
 	QMap<int,int> layerTrans;
 	int maxLayer = 0;
@@ -2049,11 +2045,8 @@
 	QDomElement elem=docu.documentElement();
 	if (elem.tagName() != "SCRIBUSUTF8NEW")
 		return false;
-	if (elem.hasAttribute("Version"))
-		newVersion = true;
 	QDomNode DOC=elem.firstChild();
 	counter = m_Doc->Items->count();
-	baseobj = counter;
 	while(!DOC.isNull())
 	{
 		QDomElement dc=DOC.toElement();

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17642&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 Tue Jun 26 21:00:21 2012
@@ -179,7 +179,6 @@
 bool Scribus150Format::loadElements(const QString & data, QString fileDir, int toLayer, double Xp_in, double Yp_in, bool loc)
 {
 	ParagraphStyle vg;
-	bool newVersion = false;
 	isNewFormat = false;
 	LayerToPaste = toLayer;
 	Xp = Xp_in;
@@ -241,8 +240,6 @@
 					GrX = attrs.valueAsDouble("XP");
 					GrY = attrs.valueAsDouble("YP");
 				}
-				if (attrs.hasAttribute("Version"))
-					newVersion = true;
 			}
 			else
 			{
@@ -1160,7 +1157,6 @@
 	struct ScribusDoc::BookMa bok;
 	QMap<int, ScribusDoc::BookMa> bookmarks;
 
-	bool newVersion = false;
 	isNewFormat = false;
 
 	QMap<int,PageItem*> TableID;
@@ -1252,8 +1248,6 @@
 				success = false;
 				break;
 			}
-			if (attrs.hasAttribute("Version"))
-				newVersion = true;
 			firstElement = false;
 		}
 		if (tagName == "DOCUMENT")
@@ -5143,7 +5137,6 @@
 	QStack< QList<PageItem*> > groupStackP;
 	QStack<int> groupStack2;
 	double pageX = 0, pageY = 0;
-	bool newVersion = false;
 	QMap<int,int> layerTrans;
 	int maxLayer = 0, maxLevel = 0, a = 0;
 
@@ -5198,8 +5191,6 @@
 				success = false;
 				break;
 			}
-			if (attrs.hasAttribute("Version"))
-				newVersion = true;
 			firstElement = false;
 		}
 
@@ -5876,7 +5867,7 @@
 			styles->insert(mlName2, ml);
 		}
 	}
-	return true;
+	return success;
 }
 
 bool Scribus150Format::readColors(const QString& fileName, ColorList & colors)
@@ -5914,7 +5905,7 @@
 			}
 		}
 	}
-	return true;
+	return success;
 }
 
 bool Scribus150Format::readPageCount(const QString& fileName, int *num1, int *num2, QStringList & masterPageNames)

Modified: trunk/Scribus/scribus/scpageoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17642&path=/trunk/Scribus/scribus/scpageoutput.cpp
==============================================================================
--- trunk/Scribus/scribus/scpageoutput.cpp (original)
+++ trunk/Scribus/scribus/scpageoutput.cpp Tue Jun 26 21:00:21 2012
@@ -1624,9 +1624,6 @@
 			painter->scale(1, -1);
 		}
 
-		//automatic line spacing factor (calculated once)
-		double autoLS = static_cast<double>(m_doc->typographicPrefs().autoLineSpacing) / 100.0;
-
 		for (uint ll=0; ll < item->itemText.lines(); ++ll)
 		{
 			LineSpec ls = item->itemText.line(ll);

Modified: trunk/Scribus/scribus/text/storytext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17642&path=/trunk/Scribus/scribus/text/storytext.cpp
==============================================================================
--- trunk/Scribus/scribus/text/storytext.cpp (original)
+++ trunk/Scribus/scribus/text/storytext.cpp Tue Jun 26 21:00:21 2012
@@ -122,17 +122,7 @@
 	StoryText result(doc);
 	*(result.d) = *d;
 	return result;
-//	qDebug() << QString("StoryText::copy:");
-	QListIterator<ScText*> it( *(result.d) );
-	ScText* elem;
-	while ( it.hasNext() ) {
-		elem = it.next();
-//		qDebug() << QString("\tchar '%1' size %2 (orig %3)").arg(elem->ch).arg(elem->fontSize()).arg(charStyle(i++).fontSize());
-	}
-	
-	return result;
-}
-
+}
 
 StoryText& StoryText::operator= (const StoryText & other)
 {




More information about the scribus-commit mailing list