r20200 by jghali - remove some unnecessary levels of indentation

scribus-commit scribus-commit at lists.scribus.net
Wed Jun 24 00:24:37 UTC 2015


Author: jghali
Date: Wed Jun 24 00:24:37 2015
New Revision: 20200

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20200
Log:
remove some unnecessary levels of indentation

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

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20200&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 Wed Jun 24 00:24:37 2015
@@ -663,69 +663,65 @@
 				gItem->groupItemList = gpL;
 		}
 	}
-	if (groupStackF.count() > 0)
-	{
-		while (groupStackF.count() > 0)
-		{
-			bool isTableIt = false;
-			QList<PageItem*> gpL = groupStackF.pop();
-			PageItem* gItem = gpL.takeFirst();
-			for (int id = 0; id < gpL.count(); id++)
-			{
-				PageItem* cItem = gpL.at(id);
-				isTableIt = cItem->isTableItem;
-				cItem->gXpos = cItem->xPos() - gItem->xPos();
-				cItem->gYpos = cItem->yPos() - gItem->yPos();
-				cItem->Parent = gItem;
-				if (gItem->rotation() != 0)
-				{
-					QTransform ma;
-					ma.rotate(-gItem->rotation());
-					FPoint n = FPoint(cItem->gXpos, cItem->gYpos);
-					cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
-					cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
-					cItem->setRotation(cItem->rotation() - gItem->rotation());
-				}
-				m_Doc->FrameItems.remove(m_Doc->FrameItems.key(cItem));
-			}
-			bool converted = false;
-			if (isTableIt)
-				converted = convertOldTable(m_Doc, gItem, gpL, &groupStackF, NULL);
-			if (!converted)
-				gItem->groupItemList = gpL;
-		}
-	}
-	if (groupStackM.count() > 0)
-	{
-		while (groupStackM.count() > 0)
-		{
-			bool isTableIt = false;
-			QList<PageItem*> gpL = groupStackM.pop();
-			PageItem* gItem = gpL.takeFirst();
-			for (int id = 0; id < gpL.count(); id++)
-			{
-				PageItem* cItem = gpL.at(id);
-				isTableIt = cItem->isTableItem;
-				cItem->gXpos = cItem->xPos() - gItem->xPos();
-				cItem->gYpos = cItem->yPos() - gItem->yPos();
-				cItem->Parent = gItem;
-				if (gItem->rotation() != 0)
-				{
-					QTransform ma;
-					ma.rotate(-gItem->rotation());
-					FPoint n = FPoint(cItem->gXpos, cItem->gYpos);
-					cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
-					cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
-					cItem->setRotation(cItem->rotation() - gItem->rotation());
-				}
-				m_Doc->MasterItems.removeOne(cItem);
-			}
-			bool converted = false;
-			if (isTableIt)
-				converted = convertOldTable(m_Doc, gItem, gpL, &groupStackM, &m_Doc->MasterItems);
-			if (!converted)
-				gItem->groupItemList = gpL;
-		}
+
+	while (groupStackF.count() > 0)
+	{
+		bool isTableIt = false;
+		QList<PageItem*> gpL = groupStackF.pop();
+		PageItem* gItem = gpL.takeFirst();
+		for (int id = 0; id < gpL.count(); id++)
+		{
+			PageItem* cItem = gpL.at(id);
+			isTableIt = cItem->isTableItem;
+			cItem->gXpos = cItem->xPos() - gItem->xPos();
+			cItem->gYpos = cItem->yPos() - gItem->yPos();
+			cItem->Parent = gItem;
+			if (gItem->rotation() != 0)
+			{
+				QTransform ma;
+				ma.rotate(-gItem->rotation());
+				FPoint n = FPoint(cItem->gXpos, cItem->gYpos);
+				cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
+				cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
+				cItem->setRotation(cItem->rotation() - gItem->rotation());
+			}
+			m_Doc->FrameItems.remove(m_Doc->FrameItems.key(cItem));
+		}
+		bool converted = false;
+		if (isTableIt)
+			converted = convertOldTable(m_Doc, gItem, gpL, &groupStackF, NULL);
+		if (!converted)
+			gItem->groupItemList = gpL;
+	}
+
+	while (groupStackM.count() > 0)
+	{
+		bool isTableIt = false;
+		QList<PageItem*> gpL = groupStackM.pop();
+		PageItem* gItem = gpL.takeFirst();
+		for (int id = 0; id < gpL.count(); id++)
+		{
+			PageItem* cItem = gpL.at(id);
+			isTableIt = cItem->isTableItem;
+			cItem->gXpos = cItem->xPos() - gItem->xPos();
+			cItem->gYpos = cItem->yPos() - gItem->yPos();
+			cItem->Parent = gItem;
+			if (gItem->rotation() != 0)
+			{
+				QTransform ma;
+				ma.rotate(-gItem->rotation());
+				FPoint n = FPoint(cItem->gXpos, cItem->gYpos);
+				cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
+				cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
+				cItem->setRotation(cItem->rotation() - gItem->rotation());
+			}
+			m_Doc->MasterItems.removeOne(cItem);
+		}
+		bool converted = false;
+		if (isTableIt)
+			converted = convertOldTable(m_Doc, gItem, gpL, &groupStackM, &m_Doc->MasterItems);
+		if (!converted)
+			gItem->groupItemList = gpL;
 	}
 	
 	// reestablish first/lastAuto

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20200&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 Wed Jun 24 00:24:37 2015
@@ -574,102 +574,97 @@
 			}
 		}
 	}
-	if (groupStackP.count() > 0)
-	{
-		while (groupStackP.count() > 0)
-		{
-			bool isTableIt = false;
-			QList<PageItem*> gpL = groupStackP.pop();
-			PageItem* gItem = gpL.takeFirst();
-			for (int id = 0; id < gpL.count(); id++)
-			{
-				PageItem* cItem = gpL.at(id);
-				isTableIt = cItem->isTableItem;
-				cItem->gXpos = cItem->xPos() - gItem->xPos();
-				cItem->gYpos = cItem->yPos() - gItem->yPos();
-				cItem->Parent = gItem;
-				if (gItem->rotation() != 0)
-				{
-					QTransform ma;
-					ma.rotate(-gItem->rotation());
-					FPoint n = FPoint(cItem->gXpos, cItem->gYpos);
-					cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
-					cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
-					cItem->setRotation(cItem->rotation() - gItem->rotation());
-				}
-				m_Doc->DocItems.removeOne(cItem);
-			}
-			bool converted = false;
-			if (isTableIt)
-				converted = convertOldTable(m_Doc, gItem, gpL, &groupStackP, &m_Doc->DocItems);
-			if (!converted)
-				gItem->groupItemList = gpL;
-		}
-	}
-	if (groupStackF.count() > 0)
-	{
-		while (groupStackF.count() > 0)
-		{
-			bool isTableIt = false;
-			QList<PageItem*> gpL = groupStackF.pop();
-			PageItem* gItem = gpL.takeFirst();
-			for (int id = 0; id < gpL.count(); id++)
-			{
-				PageItem* cItem = gpL.at(id);
-				isTableIt = cItem->isTableItem;
-				cItem->gXpos = cItem->xPos() - gItem->xPos();
-				cItem->gYpos = cItem->yPos() - gItem->yPos();
-				cItem->Parent = gItem;
-				if (gItem->rotation() != 0)
-				{
-					QTransform ma;
-					ma.rotate(-gItem->rotation());
-					FPoint n = FPoint(cItem->gXpos, cItem->gYpos);
-					cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
-					cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
-					cItem->setRotation(cItem->rotation() - gItem->rotation());
-				}
-				m_Doc->FrameItems.remove(m_Doc->FrameItems.key(cItem));
-			}
-			bool converted = false;
-			if (isTableIt)
-				converted = convertOldTable(m_Doc, gItem, gpL, &groupStackF, NULL);
-			if (!converted)
-				gItem->groupItemList = gpL;
-		}
-	}
-	if (groupStackM.count() > 0)
-	{
-		while (groupStackM.count() > 0)
-		{
-			bool isTableIt = false;
-			QList<PageItem*> gpL = groupStackM.pop();
-			PageItem* gItem = gpL.takeFirst();
-			for (int id = 0; id < gpL.count(); id++)
-			{
-				PageItem* cItem = gpL.at(id);
-				isTableIt = cItem->isTableItem;
-				cItem->gXpos = cItem->xPos() - gItem->xPos();
-				cItem->gYpos = cItem->yPos() - gItem->yPos();
-				cItem->Parent = gItem;
-				if (gItem->rotation() != 0)
-				{
-					QTransform ma;
-					ma.rotate(-gItem->rotation());
-					FPoint n = FPoint(cItem->gXpos, cItem->gYpos);
-					cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
-					cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
-					cItem->setRotation(cItem->rotation() - gItem->rotation());
-				}
-				m_Doc->MasterItems.removeOne(cItem);
-			}
-			bool converted = false;
-			if (isTableIt)
-				converted = convertOldTable(m_Doc, gItem, gpL, &groupStackM, &m_Doc->MasterItems);
-			if (!converted)
-				gItem->groupItemList = gpL;
-		}
-	}
+
+	while (groupStackP.count() > 0)
+	{
+		bool isTableIt = false;
+		QList<PageItem*> gpL = groupStackP.pop();
+		PageItem* gItem = gpL.takeFirst();
+		for (int id = 0; id < gpL.count(); id++)
+		{
+			PageItem* cItem = gpL.at(id);
+			isTableIt = cItem->isTableItem;
+			cItem->gXpos = cItem->xPos() - gItem->xPos();
+			cItem->gYpos = cItem->yPos() - gItem->yPos();
+			cItem->Parent = gItem;
+			if (gItem->rotation() != 0)
+			{
+				QTransform ma;
+				ma.rotate(-gItem->rotation());
+				FPoint n = FPoint(cItem->gXpos, cItem->gYpos);
+				cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
+				cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
+				cItem->setRotation(cItem->rotation() - gItem->rotation());
+			}
+			m_Doc->DocItems.removeOne(cItem);
+		}
+		bool converted = false;
+		if (isTableIt)
+			converted = convertOldTable(m_Doc, gItem, gpL, &groupStackP, &m_Doc->DocItems);
+		if (!converted)
+			gItem->groupItemList = gpL;
+	}
+
+	while (groupStackF.count() > 0)
+	{
+		bool isTableIt = false;
+		QList<PageItem*> gpL = groupStackF.pop();
+		PageItem* gItem = gpL.takeFirst();
+		for (int id = 0; id < gpL.count(); id++)
+		{
+			PageItem* cItem = gpL.at(id);
+			isTableIt = cItem->isTableItem;
+			cItem->gXpos = cItem->xPos() - gItem->xPos();
+			cItem->gYpos = cItem->yPos() - gItem->yPos();
+			cItem->Parent = gItem;
+			if (gItem->rotation() != 0)
+			{
+				QTransform ma;
+				ma.rotate(-gItem->rotation());
+				FPoint n = FPoint(cItem->gXpos, cItem->gYpos);
+				cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
+				cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
+				cItem->setRotation(cItem->rotation() - gItem->rotation());
+			}
+			m_Doc->FrameItems.remove(m_Doc->FrameItems.key(cItem));
+		}
+		bool converted = false;
+		if (isTableIt)
+			converted = convertOldTable(m_Doc, gItem, gpL, &groupStackF, NULL);
+		if (!converted)
+			gItem->groupItemList = gpL;
+	}
+
+	while (groupStackM.count() > 0)
+	{
+		bool isTableIt = false;
+		QList<PageItem*> gpL = groupStackM.pop();
+		PageItem* gItem = gpL.takeFirst();
+		for (int id = 0; id < gpL.count(); id++)
+		{
+			PageItem* cItem = gpL.at(id);
+			isTableIt = cItem->isTableItem;
+			cItem->gXpos = cItem->xPos() - gItem->xPos();
+			cItem->gYpos = cItem->yPos() - gItem->yPos();
+			cItem->Parent = gItem;
+			if (gItem->rotation() != 0)
+			{
+				QTransform ma;
+				ma.rotate(-gItem->rotation());
+				FPoint n = FPoint(cItem->gXpos, cItem->gYpos);
+				cItem->gXpos = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
+				cItem->gYpos = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
+				cItem->setRotation(cItem->rotation() - gItem->rotation());
+			}
+			m_Doc->MasterItems.removeOne(cItem);
+		}
+		bool converted = false;
+		if (isTableIt)
+			converted = convertOldTable(m_Doc, gItem, gpL, &groupStackM, &m_Doc->MasterItems);
+		if (!converted)
+			gItem->groupItemList = gpL;
+	}
+
 	return true;
 }
 




More information about the scribus-commit mailing list