r19663 by jghali - code style fixes

scribus-commit scribus-commit at lists.scribus.net
Sat Dec 13 22:02:31 UTC 2014


Author: jghali
Date: Sat Dec 13 22:02:31 2014
New Revision: 19663

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19663
Log:
code style fixes

Modified:
    branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
    branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp

Modified: branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19663&path=/branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp (original)
+++ branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp Sat Dec 13 22:02:31 2014
@@ -104,7 +104,7 @@
 bool Scribus134Format::fileSupported(QIODevice* /* file */, const QString & fileName) const
 {
 	QByteArray docBytes("");
-	if(fileName.right(2) == "gz")
+	if (fileName.right(2) == "gz")
 	{
 		if (!ScGzFile::readFromFile(fileName, docBytes, 4096))
 		{
@@ -134,7 +134,7 @@
 QString Scribus134Format::readSLA(const QString & fileName)
 {
 	QByteArray docBytes("");
-	if(fileName.right(2) == "gz")
+	if (fileName.right(2) == "gz")
 	{
 		if (!ScGzFile::readFromFile(fileName, docBytes))
 		{
@@ -246,7 +246,7 @@
 	TableItemsF.clear();
 	TableIDF.clear();
 	PrefsManager* prefsManager=PrefsManager::instance();
-	while(!DOC.isNull())
+	while (!DOC.isNull())
 	{
 		QDomElement dc=DOC.toElement();
 	/*
@@ -461,7 +461,7 @@
 		m_Doc->LastAuto = 0;
 		QDomNode PAGE=DOC.firstChild();
 		counter = 0;
-		while(!PAGE.isNull())
+		while (!PAGE.isNull())
 		{
 			ObCount++;
 			if (m_mwProgressBar!=0)
@@ -471,10 +471,10 @@
 			{
 				QDomNode PGS = PAGE.firstChild();
 				m_Doc->pageSets.clear();
-				while(!PGS.isNull())
+				while (!PGS.isNull())
 				{
 					QDomElement PgsAttr = PGS.toElement();
-					if(PgsAttr.tagName() == "Set")
+					if (PgsAttr.tagName() == "Set")
 					{
 						struct PageSet pageS;
 						pageS.Name = CommonStrings::untranslatePageSetString(PgsAttr.attribute("Name"));
@@ -486,10 +486,10 @@
 //						pageS.GapBelow = ScCLocale::toDoubleC( PgsAttr.attribute("GapBelow", "0"));
 						pageS.pageNames.clear();
 						QDomNode PGSN = PGS.firstChild();
-						while(!PGSN.isNull())
+						while (!PGSN.isNull())
 						{
 							QDomElement PgsAttrN = PGSN.toElement();
-							if(PgsAttrN.tagName() == "PageNames")
+							if (PgsAttrN.tagName() == "PageNames")
 								pageS.pageNames.append(CommonStrings::untranslatePageSetLocString(PgsAttrN.attribute("Name")));
 							PGSN = PGSN.nextSibling();
 						}
@@ -524,7 +524,7 @@
 				m_Doc->checkerProfiles[pg.attribute("Name")] = checkerSettings;
 			}
 			// 10/25/2004 pv - None is "reserved" color. cannot be defined in any file...
-			if(pg.tagName()=="COLOR" && pg.attribute("NAME")!=CommonStrings::None)
+			if (pg.tagName()=="COLOR" && pg.attribute("NAME")!=CommonStrings::None)
 			{
 				if (pg.hasAttribute("CMYK"))
 					lf.setNamedColor(pg.attribute("CMYK"));
@@ -541,14 +541,14 @@
 				QString name = pg.attribute("NAME");
 				m_Doc->PageColors.insert((name.isEmpty()) ? lf.name() : name, lf);
 			}
-			if(pg.tagName()=="STYLE")
+			if (pg.tagName()=="STYLE")
 			{
 				readParagraphStyle(vg, pg, m_Doc);
 				StyleSet<ParagraphStyle>tmp;
 				tmp.create(vg);
 				m_Doc->redefineStyles(tmp, false);
 			}
-			if(pg.tagName()=="CHARSTYLE")
+			if (pg.tagName()=="CHARSTYLE")
 			{
 				CharStyle cstyle;
 				readCharacterStyle(cstyle, pg, m_Doc);
@@ -556,9 +556,9 @@
 				temp.create(cstyle);
 				m_Doc->redefineCharStyles(temp, false);
 			}
-			if(pg.tagName()=="JAVA")
+			if (pg.tagName()=="JAVA")
 				m_Doc->JavaScripts[pg.attribute("NAME")] = pg.attribute("SCRIPT");
-			if(pg.tagName()=="LAYERS")
+			if (pg.tagName()=="LAYERS")
 			{
 				int lnr   = pg.attribute("NUMMER").toInt();
 				int level = pg.attribute("LEVEL").toInt();
@@ -574,7 +574,7 @@
 					la.markerColor =  QColor(pg.attribute("LAYERC","#000000"));
 				m_Doc->Layers.append(la);
 			}
-/*			if(pg.tagName()=="Bookmark")
+/*			if (pg.tagName()=="Bookmark")
 			{
 				bok.Title = pg.attribute("Title");
 				bok.Text = pg.attribute("Text");
@@ -589,11 +589,11 @@
 				bok.Parent = pg.attribute("Parent").toInt();
 				m_Doc->BookMarks.append(bok);
 			} */
-			if(pg.tagName()=="MultiLine")
+			if (pg.tagName()=="MultiLine")
 			{
 				multiLine ml;
 				QDomNode MuLn = PAGE.firstChild();
-				while(!MuLn.isNull())
+				while (!MuLn.isNull())
 				{
 					QDomElement MuL = MuLn.toElement();
 					struct SingleLine sl;
@@ -609,7 +609,7 @@
 				}
 				m_Doc->MLineStyles.insert(pg.attribute("Name"), ml);
 			}
-			if(pg.tagName()=="Arrows")
+			if (pg.tagName()=="Arrows")
 			{
 				struct ArrowDesc arrow;
 				arrow.name = pg.attribute("Name");
@@ -625,7 +625,7 @@
 				}
 				m_Doc->arrowStyles.append(arrow);
 			}
-			if(pg.tagName()=="Printer")
+			if (pg.tagName()=="Printer")
 			{
 				m_Doc->Print_Options.firstUse = static_cast<bool>(pg.attribute("firstUse").toInt());
 				m_Doc->Print_Options.toFile = static_cast<bool>(pg.attribute("toFile").toInt());
@@ -660,15 +660,15 @@
 				m_Doc->Print_Options.printerCommand = pg.attribute("printerCommand");
 				m_Doc->Print_Options.copies = 1;
 				QDomNode PFO = PAGE.firstChild();
-				while(!PFO.isNull())
+				while (!PFO.isNull())
 				{
 					QDomElement pdfF = PFO.toElement();
-					if(pdfF.tagName() == "Separation")
+					if (pdfF.tagName() == "Separation")
 						m_Doc->Print_Options.allSeparations.append(pdfF.attribute("Name"));
 					PFO = PFO.nextSibling();
 				}
 			}
-			if(pg.tagName()=="PDF")
+			if (pg.tagName()=="PDF")
 			{
 				m_Doc->PDF_Options.Articles = static_cast<bool>(pg.attribute("Articles").toInt());
 				m_Doc->PDF_Options.Thumbnails = static_cast<bool>(pg.attribute("Thumbnails").toInt());
@@ -745,10 +745,10 @@
 				m_Doc->PDF_Options.PageLayout = pg.attribute("PageLayout", "0").toInt();
 				m_Doc->PDF_Options.openAction = pg.attribute("openAction", "");
 				QDomNode PFO = PAGE.firstChild();
-				while(!PFO.isNull())
+				while (!PFO.isNull())
 				{
 					QDomElement pdfF = PFO.toElement();
-					if(pdfF.tagName() == "LPI")
+					if (pdfF.tagName() == "LPI")
 					{
 						struct LPIData lpo;
 						lpo.Angle = pdfF.attribute("Angle").toInt();
@@ -756,17 +756,17 @@
 						lpo.SpotFunc = pdfF.attribute("SpotFunction").toInt();
 						m_Doc->PDF_Options.LPISettings[pdfF.attribute("Color")] = lpo;
 					}
-					if(pdfF.tagName() == "Fonts")
+					if (pdfF.tagName() == "Fonts")
 					{
 						if (!m_Doc->PDF_Options.EmbedList.contains(pdfF.attribute("Name")))
 							m_Doc->PDF_Options.EmbedList.append(pdfF.attribute("Name"));
 					}
-					if(pdfF.tagName() == "Subset")
+					if (pdfF.tagName() == "Subset")
 					{
 						if (!m_Doc->PDF_Options.SubsetList.contains(pdfF.attribute("Name")))
 							m_Doc->PDF_Options.SubsetList.append(pdfF.attribute("Name"));
 					}
-					if(pdfF.tagName() == "Effekte")
+					if (pdfF.tagName() == "Effekte")
 					{
 						struct PDFPresentationData ef;
 						ef.pageEffectDuration = pdfF.attribute("pageEffectDuration").toInt();
@@ -780,14 +780,14 @@
 					PFO = PFO.nextSibling();
 				}
 			}
-			if(pg.tagName()=="DocItemAttributes")
+			if (pg.tagName()=="DocItemAttributes")
 			{
 				QDomNode DIA = PAGE.firstChild();
 				m_Doc->docItemAttributes.clear();
-				while(!DIA.isNull())
+				while (!DIA.isNull())
 				{
 					QDomElement itemAttr = DIA.toElement();
-					if(itemAttr.tagName() == "ItemAttribute")
+					if (itemAttr.tagName() == "ItemAttribute")
 					{
 						ObjectAttribute objattr;
 						objattr.name=itemAttr.attribute("Name");
@@ -802,14 +802,14 @@
 					DIA = DIA.nextSibling();
 				}
 			}
-			if(pg.tagName()=="TablesOfContents")
+			if (pg.tagName()=="TablesOfContents")
 			{
 				QDomNode TOC = PAGE.firstChild();
 				m_Doc->docToCSetups.clear();
-				while(!TOC.isNull())
+				while (!TOC.isNull())
 				{
 					QDomElement tocElem = TOC.toElement();
-					if(tocElem.tagName() == "TableOfContents")
+					if (tocElem.tagName() == "TableOfContents")
 					{
 						ToCSetup tocsetup;
 						tocsetup.name=tocElem.attribute("Name");
@@ -829,13 +829,13 @@
 					TOC = TOC.nextSibling();
 				}
 			}
-			if(pg.tagName()=="Sections")
+			if (pg.tagName()=="Sections")
 			{
 				QDomNode Section = PAGE.firstChild();
-				while(!Section.isNull())
+				while (!Section.isNull())
 				{
 					QDomElement sectionElem = Section.toElement();
-					if(sectionElem.tagName() == "Section")
+					if (sectionElem.tagName() == "Section")
 					{
 						struct DocumentSection newSection;
 						newSection.number=sectionElem.attribute("Number").toInt();
@@ -865,7 +865,7 @@
 			if (pg.tagName()=="HYPHEN")
 			{
 				QDomNode hyelm = pg.firstChild();
-				while(!hyelm.isNull())
+				while (!hyelm.isNull())
 				{
 					QDomElement hyElem = hyelm.toElement();
 					if (hyElem.tagName()=="EXCEPTION")
@@ -1013,7 +1013,7 @@
 					m_AvailableFonts->findFont(tmpf, m_Doc);
 					QDomNode IT=pg.firstChild();
 					LastStyles * last = new LastStyles();
-					while(!IT.isNull())
+					while (!IT.isNull())
 					{
 						QDomElement it=IT.toElement();
 						if (it.tagName()=="CSTOP")
@@ -1079,14 +1079,14 @@
 						}
 
 						//CB PageItemAttributes
-						if(it.tagName()=="PageItemAttributes")
+						if (it.tagName()=="PageItemAttributes")
 						{
 							QDomNode PIA = it.firstChild();
 							ObjAttrVector pageItemAttributes;
-							while(!PIA.isNull())
+							while (!PIA.isNull())
 							{
 								QDomElement itemAttr = PIA.toElement();
-								if(itemAttr.tagName() == "ItemAttribute")
+								if (itemAttr.tagName() == "ItemAttribute")
 								{
 									ObjectAttribute objattr;
 									objattr.name=itemAttr.attribute("Name");
@@ -1204,10 +1204,10 @@
 			PAGE=PAGE.nextSibling();
 		}
 		PAGE=DOC.firstChild();
-		while(!PAGE.isNull())
+		while (!PAGE.isNull())
 		{
 			QDomElement pg=PAGE.toElement();
-			if(pg.tagName()=="Bookmark")
+			if (pg.tagName()=="Bookmark")
 			{
 				int elem = pg.attribute("Element").toInt();
 				if (elem < m_Doc->Items->count())
@@ -1225,7 +1225,7 @@
 					m_Doc->BookMarks.append(bok);
 				}
 			}
-			if(pg.tagName()=="Pattern")
+			if (pg.tagName()=="Pattern")
 			{
 				QMap<PageItem*, int> groupID2;
 				QMap<int,int> TableID2;
@@ -1237,7 +1237,7 @@
 				bool savedAlignGuides = m_Doc->SnapGuides;
 				m_Doc->useRaster = false;
 				m_Doc->SnapGuides = false;
-				while(!pa.isNull())
+				while (!pa.isNull())
 				{
 					QDomElement pite = pa.toElement();
 					m_Doc->setMasterPageMode(false);
@@ -1253,7 +1253,7 @@
 					m_AvailableFonts->findFont(tmpf, m_Doc);
 					QDomNode IT=pite.firstChild();
 					LastStyles * last = new LastStyles();
-					while(!IT.isNull())
+					while (!IT.isNull())
 					{
 						QDomElement it=IT.toElement();
 						if (it.tagName()=="CSTOP")
@@ -1318,14 +1318,14 @@
 							last->Style = newStyle;
 						}
 						
-						if(it.tagName()=="PageItemAttributes")
+						if (it.tagName()=="PageItemAttributes")
 						{
 							QDomNode PIA = it.firstChild();
 							ObjAttrVector pageItemAttributes;
-							while(!PIA.isNull())
+							while (!PIA.isNull())
 							{
 								QDomElement itemAttr = PIA.toElement();
-								if(itemAttr.tagName() == "ItemAttribute")
+								if (itemAttr.tagName() == "ItemAttribute")
 								{
 									ObjectAttribute objattr;
 									objattr.name=itemAttr.attribute("Name");
@@ -2057,7 +2057,7 @@
 		QList<ParagraphStyle::TabRecord> tbs;
 		vg.resetTabValues();
 		QDomNode IT = pg.firstChild();
-		while(!IT.isNull())
+		while (!IT.isNull())
 		{
 			QDomElement it = IT.toElement();
 			if (it.tagName()=="Tabs")
@@ -2149,7 +2149,7 @@
 		//	currItem->PictureIsAvailable = true;
 			currItem->invalid = true;
 			IT = obj->firstChild();
-			while(!IT.isNull())
+			while (!IT.isNull())
 			{
 				QDomElement it = IT.toElement();
 				if (it.tagName()=="LATEX")
@@ -2209,7 +2209,7 @@
 		currItem->pixm.imgInfo.lowResType = obj->attribute("ImageRes", "1").toInt();
 		currItem->pixm.imgInfo.actualPageNumber = obj->attribute("Pagenumber", "0").toInt();
 		IT = obj->firstChild();
-		while(!IT.isNull())
+		while (!IT.isNull())
 		{
 			QDomElement it = IT.toElement();
 			if (it.tagName()=="ImageEffect")
@@ -2246,7 +2246,7 @@
 		{
 			bool found = false;
 			IT = obj->firstChild();
-			while(!IT.isNull())
+			while (!IT.isNull())
 			{
 				QDomElement it = IT.toElement();
 				if (it.tagName() == "PSDLayer")
@@ -2510,9 +2510,9 @@
 	currItem->BaseOffs = ScCLocale::toDoubleC( obj->attribute("BASEOF"), 0.0);
 	currItem->textPathType =  obj->attribute("textPathType", "0").toInt();
 	currItem->textPathFlipped = static_cast<bool>(obj->attribute("textPathFlipped", "0").toInt());
-	if ( obj->hasAttribute("TEXTFLOWMODE") )
+	if (obj->hasAttribute("TEXTFLOWMODE") )
 		currItem->setTextFlowMode((PageItem::TextFlowMode) obj->attribute("TEXTFLOWMODE", "0").toInt());
-	else if ( obj->attribute("TEXTFLOW").toInt() )
+	else if (obj->attribute("TEXTFLOW").toInt() )
 	{
 		if (obj->attribute("TEXTFLOW2", "0").toInt())
 			currItem->setTextFlowMode(PageItem::TextFlowUsesBoundingBox);
@@ -2591,7 +2591,7 @@
 	else
 	{
 		IT = obj->firstChild();
-		while(!IT.isNull())
+		while (!IT.isNull())
 		{
 			QDomElement it = IT.toElement();
 			if (it.tagName()=="Tabs")
@@ -2811,14 +2811,14 @@
 	QDomNode DOC=elem.firstChild();
 	counter = m_Doc->Items->count();
 //	PrefsManager* prefsManager=PrefsManager::instance();
-	while(!DOC.isNull())
+	while (!DOC.isNull())
 	{
 		QDomElement dc=DOC.toElement();
 		QDomNode PAGE=DOC.firstChild();
-		while(!PAGE.isNull())
+		while (!PAGE.isNull())
 		{
 			QDomElement pg=PAGE.toElement();
-			if(pg.tagName()=="COLOR" && pg.attribute("NAME")!=CommonStrings::None)
+			if (pg.tagName()=="COLOR" && pg.attribute("NAME")!=CommonStrings::None)
 			{
 				ScColor lf;
 				if (pg.hasAttribute("CMYK"))
@@ -2836,14 +2836,14 @@
 				QString name = pg.attribute("NAME");
 				m_Doc->PageColors.insert((name.isEmpty()) ? lf.name() : name, lf);
 			}
-			if(pg.tagName()=="STYLE")
+			if (pg.tagName()=="STYLE")
 			{
 				GetStyle(&pg, &vg, NULL, m_Doc, true);
 				VorLFound = true;
 			}
-			if(pg.tagName()=="JAVA")
+			if (pg.tagName()=="JAVA")
 				m_Doc->JavaScripts[pg.attribute("NAME")] = pg.attribute("SCRIPT");
-			if(pg.tagName()=="LAYERS")
+			if (pg.tagName()=="LAYERS")
 			{
 				int lnr   = pg.attribute("NUMMER").toInt();
 				int level = pg.attribute("LEVEL").toInt();
@@ -2870,11 +2870,11 @@
 					m_Doc->Layers.append(la);
 				}
 			}
-			if(pg.tagName()=="MultiLine")
+			if (pg.tagName()=="MultiLine")
 			{
 				multiLine ml;
 				QDomNode MuLn = PAGE.firstChild();
-				while(!MuLn.isNull())
+				while (!MuLn.isNull())
 				{
 					QDomElement MuL = MuLn.toElement();
 					struct SingleLine sl;
@@ -2902,7 +2902,7 @@
 				}
 				m_Doc->MLineStyles.insert(Nam2, ml);
 			}
-			if(pg.tagName()=="Arrows")
+			if (pg.tagName()=="Arrows")
 			{
 				struct ArrowDesc arrow;
 				arrow.name = pg.attribute("Name");
@@ -3043,7 +3043,7 @@
 					m_AvailableFonts->findFont(tmpf, m_Doc);
 					QDomNode IT=pg.firstChild();
 					LastStyles * last = new LastStyles();
-					while(!IT.isNull())
+					while (!IT.isNull())
 					{
 						QDomElement it=IT.toElement();
 						if (it.tagName()=="CSTOP")
@@ -3108,14 +3108,14 @@
 							last->Style = newStyle;
 						}
 						
-						if(it.tagName()=="PageItemAttributes")
+						if (it.tagName()=="PageItemAttributes")
 						{
 							QDomNode PIA = it.firstChild();
 							ObjAttrVector pageItemAttributes;
-							while(!PIA.isNull())
+							while (!PIA.isNull())
 							{
 								QDomElement itemAttr = PIA.toElement();
-								if(itemAttr.tagName() == "ItemAttribute")
+								if (itemAttr.tagName() == "ItemAttribute")
 								{
 									ObjectAttribute objattr;
 									objattr.name=itemAttr.attribute("Name");
@@ -3187,10 +3187,10 @@
 			PAGE=PAGE.nextSibling();
 		}
 		PAGE=DOC.firstChild();
-		while(!PAGE.isNull())
+		while (!PAGE.isNull())
 		{
 			QDomElement pg=PAGE.toElement();
-			if(pg.tagName()=="Bookmark")
+			if (pg.tagName()=="Bookmark")
 			{
 				int elem = pg.attribute("Element").toInt();
 				if (elem < m_Doc->Items->count())
@@ -3208,7 +3208,7 @@
 					m_Doc->BookMarks.append(bok);
 				}
 			}
-			if(pg.tagName()=="Pattern")
+			if (pg.tagName()=="Pattern")
 			{
 				ScPattern pat;
 				QDomNode pa = PAGE.firstChild();
@@ -3217,7 +3217,7 @@
 				bool savedAlignGuides = m_Doc->SnapGuides;
 				m_Doc->useRaster = false;
 				m_Doc->SnapGuides = false;
-				while(!pa.isNull())
+				while (!pa.isNull())
 				{
 					QDomElement pite = pa.toElement();
 					m_Doc->setMasterPageMode(false);
@@ -3254,7 +3254,7 @@
 					m_AvailableFonts->findFont(tmpf, m_Doc);
 					QDomNode IT=pite.firstChild();
 					LastStyles * last = new LastStyles();
-					while(!IT.isNull())
+					while (!IT.isNull())
 					{
 						QDomElement it=IT.toElement();
 						if (it.tagName()=="CSTOP")
@@ -3267,14 +3267,14 @@
 						}
 						if (it.tagName()=="ITEXT")
 							GetItemText(&it, m_Doc, Neu, last);
-						if(it.tagName()=="PageItemAttributes")
+						if (it.tagName()=="PageItemAttributes")
 						{
 							QDomNode PIA = it.firstChild();
 							ObjAttrVector pageItemAttributes;
-							while(!PIA.isNull())
+							while (!PIA.isNull())
 							{
 								QDomElement itemAttr = PIA.toElement();
-								if(itemAttr.tagName() == "ItemAttribute")
+								if (itemAttr.tagName() == "ItemAttribute")
 								{
 									ObjectAttribute objattr;
 									objattr.name=itemAttr.attribute("Name");
@@ -3515,20 +3515,20 @@
 	QString f (readSLA(fileName));
 	if (f.isEmpty())
 		return false;
-	if(!docu.setContent(f))
+	if (!docu.setContent(f))
 		return false;
 	QDomElement elem=docu.documentElement();
 	if (elem.tagName() != "SCRIBUSUTF8NEW")
 		return false;
 	QDomNode DOC=elem.firstChild();
-	while(!DOC.isNull())
+	while (!DOC.isNull())
 	{
 		QDomElement dc=DOC.toElement();
 		QDomNode PAGE=DOC.firstChild();
-		while(!PAGE.isNull())
+		while (!PAGE.isNull())
 		{
 			QDomElement pg=PAGE.toElement();
-			if(pg.tagName()=="STYLE")
+			if (pg.tagName()=="STYLE")
 			{
 				pstyle.erase();
 				GetStyle(&pg, &pstyle, &docParagraphStyles, doc, false);
@@ -3547,20 +3547,20 @@
 	QString f (readSLA(fileName));
 	if (f.isEmpty())
 		return false;
-	if(!docu.setContent(f))
+	if (!docu.setContent(f))
 		return false;
 	QDomElement elem=docu.documentElement();
 	if (elem.tagName() != "SCRIBUSUTF8NEW")
 		return false;
 	QDomNode DOC=elem.firstChild();
-	while(!DOC.isNull())
+	while (!DOC.isNull())
 	{
 		QDomElement dc=DOC.toElement();
 		QDomNode PAGE=DOC.firstChild();
-		while(!PAGE.isNull())
+		while (!PAGE.isNull())
 		{
 			QDomElement pg=PAGE.toElement();
-			if(pg.tagName()=="CHARSTYLE")
+			if (pg.tagName()=="CHARSTYLE")
 			{
 				cstyle.erase();
 				readCharacterStyle(cstyle, pg, doc);
@@ -3579,24 +3579,24 @@
 	QString f(readSLA(fileName));
 	if (f.isEmpty())
 		return false;
-	if(!docu.setContent(f))
+	if (!docu.setContent(f))
 		return false;
 	QDomElement elem=docu.documentElement();
 	if (elem.tagName() != "SCRIBUSUTF8NEW")
 		return false;
 	QDomNode DOC=elem.firstChild();
-	while(!DOC.isNull())
+	while (!DOC.isNull())
 	{
 		QDomElement dc=DOC.toElement();
 		QDomNode PAGE=DOC.firstChild();
-		while(!PAGE.isNull())
+		while (!PAGE.isNull())
 		{
 			QDomElement pg=PAGE.toElement();
-			if(pg.tagName()=="MultiLine")
+			if (pg.tagName()=="MultiLine")
 			{
 				multiLine ml;
 				QDomNode MuLn = PAGE.firstChild();
-				while(!MuLn.isNull())
+				while (!MuLn.isNull())
 				{
 					QDomElement MuL = MuLn.toElement();
 					struct SingleLine sl;
@@ -3637,7 +3637,7 @@
 	if (f.isEmpty())
 		return false;
 	QDomDocument docu("scridoc");
-	if(!docu.setContent(f))
+	if (!docu.setContent(f))
 		return false;
 	colors.clear();
 	ScColor lf = ScColor();
@@ -3645,15 +3645,15 @@
 	if (elem.tagName() != "SCRIBUSUTF8NEW")
 		return false;
 	QDomNode DOC=elem.firstChild();
-	while(!DOC.isNull())
+	while (!DOC.isNull())
 	{
 		QDomElement dc=DOC.toElement();
 		QDomNode PAGE=DOC.firstChild();
-		while(!PAGE.isNull())
+		while (!PAGE.isNull())
 		{
 			QDomElement pg=PAGE.toElement();
 			// 10/25/2004 pv - None is "reserved" color. cannot be defined in any file...
-			if(pg.tagName()=="COLOR" && pg.attribute("NAME")!=CommonStrings::None)
+			if (pg.tagName()=="COLOR" && pg.attribute("NAME")!=CommonStrings::None)
 			{
 				if (pg.hasAttribute("CMYK"))
 					lf.setNamedColor(pg.attribute("CMYK"));
@@ -3686,22 +3686,22 @@
 	QString f(readSLA(fileName));
 	if (f.isEmpty())
 		return false;
-	if(!docu.setContent(f))
+	if (!docu.setContent(f))
 		return false;
 	QDomElement elem=docu.documentElement();
 	if (elem.tagName() != "SCRIBUSUTF8NEW")
 		return false;
 	QDomNode DOC=elem.firstChild();
-	while(!DOC.isNull())
+	while (!DOC.isNull())
 	{
 		QDomNode PAGE=DOC.firstChild();
-		while(!PAGE.isNull())
+		while (!PAGE.isNull())
 		{
 			QDomElement pg=PAGE.toElement();
 			PgNam = pg.attribute("NAM", "");
-			if(pg.tagName()=="PAGE")
+			if (pg.tagName()=="PAGE")
 				counter++;
-			if(pg.tagName()=="MASTERPAGE")
+			if (pg.tagName()=="MASTERPAGE")
 			{
 				counter2++;
 				masterPageNames.append(PgNam);

Modified: branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19663&path=/branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp (original)
+++ branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp Sat Dec 13 22:02:31 2014
@@ -93,7 +93,7 @@
 	docu.writeAttribute("PAGESIZE"    , m_Doc->m_pageSize);
 	docu.writeAttribute("FIRSTNUM"    , m_Doc->FirstPnum);
 	docu.writeAttribute("BOOK"        , m_Doc->currentPageLayout);
-	if(m_Doc->usesAutomaticTextFrames())
+	if (m_Doc->usesAutomaticTextFrames())
 		docu.writeAttribute("AUTOTEXT", 1);
 	docu.writeAttribute("AUTOSPALTEN" ,m_Doc->PageSp);
 	docu.writeAttribute("ABSTSPALTEN" ,m_Doc->PageSpa);
@@ -431,52 +431,52 @@
 		docu.writeStartElement(nodeName);
 	else
 		docu.writeEmptyElement(nodeName);
-	if ( ! style.name().isEmpty() )
+	if (!style.name().isEmpty())
 		docu.writeAttribute("NAME", style.name());
-	if ( ! style.parent().isEmpty())
+	if (!style.parent().isEmpty())
 		docu.writeAttribute("PARENT", style.parent());
-	if ( style.isDefaultStyle())
+	if (style.isDefaultStyle())
 		docu.writeAttribute("DefaultStyle", style.isDefaultStyle());
 	
-	if ( ! style.isInhAlignment())
+	if (!style.isInhAlignment())
 		docu.writeAttribute("ALIGN", style.alignment());
-	if ( ! style.isInhLineSpacingMode())
+	if (!style.isInhLineSpacingMode())
 		docu.writeAttribute("LINESPMode", style.lineSpacingMode());
-	if ( ! style.isInhLineSpacing())
+	if (!style.isInhLineSpacing())
 		docu.writeAttribute("LINESP", style.lineSpacing());
-	if ( ! style.isInhLeftMargin())
+	if (!style.isInhLeftMargin())
 		docu.writeAttribute("INDENT", style.leftMargin());
-	if ( ! style.isInhRightMargin())
+	if (!style.isInhRightMargin())
 		docu.writeAttribute("RMARGIN", style.rightMargin());
-	if ( ! style.isInhFirstIndent())
+	if (!style.isInhFirstIndent())
 		docu.writeAttribute("FIRST", style.firstIndent());
-	if ( ! style.isInhGapBefore())
+	if (!style.isInhGapBefore())
 		docu.writeAttribute("VOR", style.gapBefore());
-	if ( ! style.isInhGapAfter())
+	if (!style.isInhGapAfter())
 		docu.writeAttribute("NACH", style.gapAfter());
-	if ( ! style.isInhHasDropCap())
+	if (!style.isInhHasDropCap())
 		docu.writeAttribute("DROP", static_cast<int>(style.hasDropCap()));
-	if ( ! style.isInhDropCapLines())
+	if (!style.isInhDropCapLines())
 		docu.writeAttribute("DROPLIN", style.dropCapLines());
-	if ( ! style.isInhDropCapOffset())
+	if (!style.isInhDropCapOffset())
 		docu.writeAttribute("DROPDIST", style.dropCapOffset());
-	if ( ! style.isInhOpticalMargins())
+	if (!style.isInhOpticalMargins())
 		docu.writeAttribute("OpticalMargins", style.opticalMargins());
-	if ( ! style.isInhHyphenationMode())
+	if (!style.isInhHyphenationMode())
 		docu.writeAttribute("HyphenationMode", style.hyphenationMode());
-	if ( ! style.isInhMinWordTracking())
+	if (!style.isInhMinWordTracking())
 		docu.writeAttribute("MinWordTrack", style.minWordTracking());
-	if ( ! style.isInhMinGlyphExtension())
+	if (!style.isInhMinGlyphExtension())
 		docu.writeAttribute("MinGlyphShrink", style.minGlyphExtension());
-	if ( ! style.isInhMaxGlyphExtension())
+	if (!style.isInhMaxGlyphExtension())
 		docu.writeAttribute("MaxGlyphExtend", style.maxGlyphExtension());
 
-	if ( ! style.shortcut().isEmpty() )
+	if (!style.shortcut().isEmpty() )
 		docu.writeAttribute("PSHORTCUT", style.shortcut()); // shortcuts won't be inherited
 
 	putCStyle(docu, style.charStyle());
 
-	if ( ! style.isInhTabValues())
+	if (!style.isInhTabValues())
 	{
 		for (int a = 0; a < style.tabValues().count(); ++a)
 		{
@@ -535,57 +535,57 @@
 
 void Scribus134Format::putCStyle(ScXmlStreamWriter & docu, const CharStyle & style)
 {
-	if ( ! style.parent().isEmpty() )
+	if (!style.parent().isEmpty() )
 		docu.writeAttribute("CPARENT", style.parent());
-	if ( ! style.isInhFont())	
+	if (!style.isInhFont())	
 		docu.writeAttribute("FONT", style.font().scName());
-	if ( ! style.isInhFontSize())
+	if (!style.isInhFontSize())
 		docu.writeAttribute("FONTSIZE", style.fontSize() / 10.0);
-	if ( ! style.isInhFeatures())
+	if (!style.isInhFeatures())
 		docu.writeAttribute("FEATURES", style.features().join(" "));
-	if ( ! style.isInhFillColor())
+	if (!style.isInhFillColor())
 		docu.writeAttribute("FCOLOR", style.fillColor());
-	if ( ! style.isInhFillShade())
+	if (!style.isInhFillShade())
 		docu.writeAttribute("FSHADE", style.fillShade());
-	if ( ! style.isInhStrokeColor())
+	if (!style.isInhStrokeColor())
 		docu.writeAttribute("SCOLOR", style.strokeColor());
-	if ( ! style.isInhStrokeShade())
+	if (!style.isInhStrokeShade())
 		docu.writeAttribute("SSHADE", style.strokeShade());
-	if ( ! style.isInhShadowXOffset())
+	if (!style.isInhShadowXOffset())
 		docu.writeAttribute("TXTSHX", style.shadowXOffset() / 10.0);
-	if ( ! style.isInhShadowYOffset())
+	if (!style.isInhShadowYOffset())
 		docu.writeAttribute("TXTSHY", style.shadowYOffset() / 10.0);
-	if ( ! style.isInhOutlineWidth())
+	if (!style.isInhOutlineWidth())
 		docu.writeAttribute("TXTOUT", style.outlineWidth() / 10.0);
-	if ( ! style.isInhUnderlineOffset())
+	if (!style.isInhUnderlineOffset())
 		docu.writeAttribute("TXTULP", style.underlineOffset() / 10.0);
-	if ( ! style.isInhUnderlineWidth())
+	if (!style.isInhUnderlineWidth())
 		docu.writeAttribute("TXTULW", style.underlineWidth() / 10.0);
-	if ( ! style.isInhStrikethruOffset())
+	if (!style.isInhStrikethruOffset())
 		docu.writeAttribute("TXTSTP", style.strikethruOffset() / 10.0);
-	if ( ! style.isInhStrikethruWidth())
+	if (!style.isInhStrikethruWidth())
 		docu.writeAttribute("TXTSTW", style.strikethruWidth() / 10.0);
-	if ( ! style.isInhScaleH())
+	if (!style.isInhScaleH())
 		docu.writeAttribute("SCALEH", style.scaleH() / 10.0);
-	if ( ! style.isInhScaleV())
+	if (!style.isInhScaleV())
 		docu.writeAttribute("SCALEV", style.scaleV() / 10.0);
-	if ( ! style.isInhBaselineOffset())
+	if (!style.isInhBaselineOffset())
 		docu.writeAttribute("BASEO", style.baselineOffset() / 10.0);
-	if ( ! style.isInhTracking())
+	if (!style.isInhTracking())
 		docu.writeAttribute("KERN", style.tracking() / 10.0); 
-	if ( ! style.isInhWordTracking())
+	if (!style.isInhWordTracking())
 		docu.writeAttribute("wordTrack", style.wordTracking());
-	if ( ! style.isInhLanguage())
+	if (!style.isInhLanguage())
 		docu.writeAttribute("LANGUAGE", style.language());
-	if ( ! style.shortcut().isEmpty() )
+	if (!style.shortcut().isEmpty() )
 		docu.writeAttribute("SHORTCUT", style.shortcut()); // shortcuts won't be inherited
 }
 
 void Scribus134Format::putNamedCStyle(ScXmlStreamWriter& docu, const CharStyle & style)
 {
-	if ( ! style.name().isEmpty() )
+	if (!style.name().isEmpty() )
 		docu.writeAttribute("CNAME", style.name());
-	if ( style.hasName() && style.isDefaultStyle())
+	if (style.hasName() && style.isDefaultStyle())
 		docu.writeAttribute("DefaultStyle", style.isDefaultStyle());
 	putCStyle(docu, style);
 }
@@ -1069,7 +1069,7 @@
 		lastPos = k + 1;
 	}
 	// write pending chars
-	if ( item->itemText.length() - lastPos > 0)
+	if (item->itemText.length() - lastPos > 0)
 	{
 		docu.writeEmptyElement("ITEXT");
 		/*if (item->asPathText())
@@ -1297,53 +1297,53 @@
 	docu.writeAttribute("PWIDTH",item->lineWidth());
 	docu.writeAttribute("PCOLOR",item->fillColor());
 	docu.writeAttribute("PCOLOR2",item->lineColor());
-	if ( ! item->itemText.defaultStyle().charStyle().isInhFillColor())
+	if (!item->itemText.defaultStyle().charStyle().isInhFillColor())
 		docu.writeAttribute("TXTFILL",item->itemText.defaultStyle().charStyle().fillColor());
-	if ( ! item->itemText.defaultStyle().charStyle().isInhStrokeColor())
+	if (!item->itemText.defaultStyle().charStyle().isInhStrokeColor())
 		docu.writeAttribute("TXTSTROKE",item->itemText.defaultStyle().charStyle().strokeColor());
-	if ( ! item->itemText.defaultStyle().charStyle().isInhStrokeShade())
+	if (!item->itemText.defaultStyle().charStyle().isInhStrokeShade())
 		docu.writeAttribute("TXTSTRSH",item->itemText.defaultStyle().charStyle().strokeShade());
-	if ( ! item->itemText.defaultStyle().charStyle().isInhFillShade())
+	if (!item->itemText.defaultStyle().charStyle().isInhFillShade())
 		docu.writeAttribute("TXTFILLSH",item->itemText.defaultStyle().charStyle().fillShade());
-	if ( ! item->itemText.defaultStyle().charStyle().isInhScaleH())
+	if (!item->itemText.defaultStyle().charStyle().isInhScaleH())
 		docu.writeAttribute("TXTSCALE",item->itemText.defaultStyle().charStyle().scaleH() / 10.0);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhScaleV())
+	if (!item->itemText.defaultStyle().charStyle().isInhScaleV())
 		docu.writeAttribute("TXTSCALEV",item->itemText.defaultStyle().charStyle().scaleV() / 10.0);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhBaselineOffset())
+	if (!item->itemText.defaultStyle().charStyle().isInhBaselineOffset())
 		docu.writeAttribute("TXTBASE",item->itemText.defaultStyle().charStyle().baselineOffset() / 10.0);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhShadowXOffset())
+	if (!item->itemText.defaultStyle().charStyle().isInhShadowXOffset())
 		docu.writeAttribute("TXTSHX",item->itemText.defaultStyle().charStyle().shadowXOffset() / 10.0);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhShadowYOffset())
+	if (!item->itemText.defaultStyle().charStyle().isInhShadowYOffset())
 		docu.writeAttribute("TXTSHY",item->itemText.defaultStyle().charStyle().shadowYOffset() / 10.0);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhOutlineWidth())
+	if (!item->itemText.defaultStyle().charStyle().isInhOutlineWidth())
 		docu.writeAttribute("TXTOUT",item->itemText.defaultStyle().charStyle().outlineWidth() / 10.0);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhUnderlineOffset())
+	if (!item->itemText.defaultStyle().charStyle().isInhUnderlineOffset())
 		docu.writeAttribute("TXTULP",item->itemText.defaultStyle().charStyle().underlineOffset() / 10.0);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhUnderlineWidth())
+	if (!item->itemText.defaultStyle().charStyle().isInhUnderlineWidth())
 		docu.writeAttribute("TXTULW",item->itemText.defaultStyle().charStyle().underlineWidth() / 10.0);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhStrikethruOffset())
+	if (!item->itemText.defaultStyle().charStyle().isInhStrikethruOffset())
 		docu.writeAttribute("TXTSTP",item->itemText.defaultStyle().charStyle().strikethruOffset() / 10.0);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhStrikethruWidth())
+	if (!item->itemText.defaultStyle().charStyle().isInhStrikethruWidth())
 		docu.writeAttribute("TXTSTW",item->itemText.defaultStyle().charStyle().strikethruWidth() / 10.0);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhTracking())
+	if (!item->itemText.defaultStyle().charStyle().isInhTracking())
 		docu.writeAttribute("TXTKERN",item->itemText.defaultStyle().charStyle().tracking() / 10.0);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhWordTracking())
+	if (!item->itemText.defaultStyle().charStyle().isInhWordTracking())
 		docu.writeAttribute("wordTrack",item->itemText.defaultStyle().charStyle().wordTracking());
-	if ( ! item->itemText.defaultStyle().isInhMinWordTracking())
+	if (!item->itemText.defaultStyle().isInhMinWordTracking())
 		docu.writeAttribute("MinWordTrack", item->itemText.defaultStyle().minWordTracking());
-	if ( ! item->itemText.defaultStyle().isInhMinGlyphExtension())
+	if (!item->itemText.defaultStyle().isInhMinGlyphExtension())
 		docu.writeAttribute("MinGlyphShrink", item->itemText.defaultStyle().minGlyphExtension());
-	if ( ! item->itemText.defaultStyle().isInhMaxGlyphExtension())
+	if (!item->itemText.defaultStyle().isInhMaxGlyphExtension())
 		docu.writeAttribute("MaxGlyphExtend", item->itemText.defaultStyle().maxGlyphExtension());
-	if ( ! item->itemText.defaultStyle().isInhOpticalMargins())
+	if (!item->itemText.defaultStyle().isInhOpticalMargins())
 		docu.writeAttribute("OpticalMargins", item->itemText.defaultStyle().opticalMargins());
-	if ( ! item->itemText.defaultStyle().isInhHyphenationMode())
+	if (!item->itemText.defaultStyle().isInhHyphenationMode())
 		docu.writeAttribute("HyphenationMode", item->itemText.defaultStyle().hyphenationMode());
-	if ( ! item->itemText.defaultStyle().isInhLeftMargin() )
+	if (!item->itemText.defaultStyle().isInhLeftMargin() )
 		docu.writeAttribute("leftMargin", item->itemText.defaultStyle().leftMargin());
-	if ( ! item->itemText.defaultStyle().isInhRightMargin())
+	if (!item->itemText.defaultStyle().isInhRightMargin())
 		docu.writeAttribute("rightMargin", item->itemText.defaultStyle().rightMargin());
-	if ( ! item->itemText.defaultStyle().isInhFirstIndent())
+	if (!item->itemText.defaultStyle().isInhFirstIndent())
 		docu.writeAttribute("firstIndent", item->itemText.defaultStyle().firstIndent());
 	docu.writeAttribute("COLUMNS", item->columns());
 	docu.writeAttribute("COLGAP", item->columnGap());
@@ -1355,9 +1355,9 @@
 	docu.writeAttribute("PLINEART",item->PLineArt);
 	docu.writeAttribute("PLINEEND", item->PLineEnd);
 	docu.writeAttribute("PLINEJOIN", item->PLineJoin);
-	if ( ! item->itemText.defaultStyle().isInhLineSpacing())
+	if (!item->itemText.defaultStyle().isInhLineSpacing())
 		docu.writeAttribute("LINESP",item->itemText.defaultStyle().lineSpacing());
-	if ( ! item->itemText.defaultStyle().isInhLineSpacingMode())
+	if (!item->itemText.defaultStyle().isInhLineSpacingMode())
 		docu.writeAttribute("LINESPMode", item->itemText.defaultStyle().lineSpacingMode());
 	docu.writeAttribute("LOCALSCX",item->imageXScale());
 	docu.writeAttribute("LOCALSCY",item->imageYScale());
@@ -1372,14 +1372,14 @@
 	docu.writeAttribute("FLIPPEDV", item->imageFlippedV());
 /*	docu.writeAttribute("BBOXX",item->BBoxX);
 	docu.writeAttribute("BBOXH",item->BBoxH); */
-	if ( ! item->itemText.defaultStyle().charStyle().isInhFont())
+	if (!item->itemText.defaultStyle().charStyle().isInhFont())
 		docu.writeAttribute("IFONT",item->itemText.defaultStyle().charStyle().font().scName());
-	if ( ! item->itemText.defaultStyle().charStyle().isInhFontSize())
+	if (!item->itemText.defaultStyle().charStyle().isInhFontSize())
 		docu.writeAttribute("ISIZE",item->itemText.defaultStyle().charStyle().fontSize() / 10.0 );
 	docu.writeAttribute("SCALETYPE", item->ScaleType ? 1 : 0);
 	docu.writeAttribute("RATIO", item->AspectRatio ? 1 : 0);
 	docu.writeAttribute("PRINTABLE", item->printEnabled() ? 1 : 0);
-	if(item->isAnnotation())
+	if (item->isAnnotation())
 	{
 		docu.writeAttribute("ANNOTATION",1);
 		docu.writeAttribute("ANTYPE", item->annotation().Type());
@@ -1535,7 +1535,7 @@
 	for (nx = item->Groups.begin(); nx != item->Groups.end(); ++nx)
 		glp += tmp.setNum((*nx)) + " ";
 	docu.writeAttribute("GROUPS", glp);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhLanguage())
+	if (!item->itemText.defaultStyle().charStyle().isInhLanguage())
 		docu.writeAttribute("LANGUAGE", item->itemText.defaultStyle().charStyle().language());
 	docu.writeAttribute("startArrowIndex", item->startArrowIndex());
 	docu.writeAttribute("endArrowIndex", item->endArrowIndex());




More information about the scribus-commit mailing list