r16233 by fschmid - Fixed Bug #9655: "opening older 1.5svn .SLAs shows empty groups"

scribus-commit scribus-commit at lists.scribus.net
Sun Jan 9 20:40:12 CET 2011


Author: fschmid
Date: Sun Jan  9 19:40:12 2011
New Revision: 16233

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16233
Log:
Fixed Bug #9655: "opening older 1.5svn .SLAs shows empty groups"

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.info/websvn/diff.php?repname=Scribus&rev=16233&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 Sun Jan  9 19:40:12 2011
@@ -448,7 +448,7 @@
 			if (groupStack.count() > 0)
 			{
 				groupStack.top().append(itemInfo.item);
-				if (static_cast<int>(itemInfo.item->ItemNr) == groupStack2.top())
+				while (static_cast<int>(itemInfo.item->ItemNr) == groupStack2.top())
 				{
 					if (tagName == "PAGEOBJECT")
 						groupStackP.push(groupStack.pop());
@@ -457,6 +457,8 @@
 					else
 						groupStackM.push(groupStack.pop());
 					groupStack2.pop();
+					if (groupStack2.count() == 0)
+						break;
 				}
 			}
 			if (itemInfo.isGroupFlag)
@@ -2054,10 +2056,12 @@
 		if (groupStack.count() > 0)
 		{
 			groupStack.top().append(itemInfo.item);
-			if (static_cast<int>(itemInfo.item->ItemNr) == groupStack2.top())
+			while (static_cast<int>(itemInfo.item->ItemNr) == groupStack2.top())
 			{
 				groupStackP.push(groupStack.pop());
 				groupStack2.pop();
+				if (groupStack2.count() == 0)
+					break;
 			}
 		}
 		if (itemInfo.isGroupFlag)
@@ -2535,6 +2539,8 @@
 		doc->GroupCounter++;
 		break;
 	case PageItem::Symbol:
+	case PageItem::RegularPolygon:
+	case PageItem::Arc:
 	case PageItem::Multiple:
 		Q_ASSERT(false);
 		break;

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16233&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 Sun Jan  9 19:40:12 2011
@@ -316,7 +316,7 @@
 			if (groupStack.count() > 0)
 			{
 				groupStack.top().append(itemInfo.item);
-				if (static_cast<int>(itemInfo.item->ItemNr) == groupStack2.top())
+				while (static_cast<int>(itemInfo.item->ItemNr) == groupStack2.top())
 				{
 					if ((tagName == "PAGEOBJECT") || (tagName == "ITEM"))
 						groupStackP.push(groupStack.pop());
@@ -325,6 +325,8 @@
 					else
 						groupStackM.push(groupStack.pop());
 					groupStack2.pop();
+					if (groupStack2.count() == 0)
+						break;
 				}
 			}
 			if (itemInfo.isGroupFlag)
@@ -687,7 +689,7 @@
 			if (groupStack.count() > 0)
 			{
 				groupStack.top().append(itemInfo.item);
-				if (static_cast<int>(itemInfo.item->ItemNr) == groupStack2.top())
+				while (static_cast<int>(itemInfo.item->ItemNr) == groupStack2.top())
 				{
 					if (tagName == "PAGEOBJECT")
 						groupStackP.push(groupStack.pop());
@@ -696,6 +698,8 @@
 					else
 						groupStackM.push(groupStack.pop());
 					groupStack2.pop();
+					if (groupStack2.count() == 0)
+						break;
 				}
 			}
 			if (itemInfo.isGroupFlag)
@@ -1196,7 +1200,7 @@
 			if (groupStack.count() > 0)
 			{
 				groupStack.top().append(itemInfo.item);
-				if (static_cast<int>(itemInfo.item->ItemNr) == groupStack2.top())
+				while (static_cast<int>(itemInfo.item->ItemNr) == groupStack2.top())
 				{
 					if (tagName == "PAGEOBJECT")
 						groupStackP.push(groupStack.pop());
@@ -1205,6 +1209,8 @@
 					else
 						groupStackM.push(groupStack.pop());
 					groupStack2.pop();
+					if (groupStack2.count() == 0)
+						break;
 				}
 			}
 			if (itemInfo.isGroupFlag)
@@ -2957,10 +2963,12 @@
 		if (groupStack.count() > 0)
 		{
 			groupStack.top().append(itemInfo.item);
-			if (static_cast<int>(itemInfo.item->ItemNr) == groupStack2.top())
+			while (static_cast<int>(itemInfo.item->ItemNr) == groupStack2.top())
 			{
 				groupStackP.push(groupStack.pop());
 				groupStack2.pop();
+				if (groupStack2.count() == 0)
+					break;
 			}
 		}
 		if (itemInfo.isGroupFlag)
@@ -4165,7 +4173,7 @@
 				if (groupStack.count() > 0)
 				{
 					groupStack.top().append(itemInfo.item);
-					if (static_cast<int>(itemInfo.item->ItemNr) == groupStack2.top())
+					while (static_cast<int>(itemInfo.item->ItemNr) == groupStack2.top())
 					{
 						if (tagName == "PAGEOBJECT")
 							groupStackP.push(groupStack.pop());
@@ -4174,6 +4182,8 @@
 						else
 							groupStack.pop();
 						groupStack2.pop();
+						if (groupStack2.count() == 0)
+							break;
 					}
 				}
 				if (itemInfo.isGroupFlag)




More information about the scribus-commit mailing list