r23815 by jghali - Fix bad Postscript being generated in the case where a pattern contains an image

scribus-commit scribus-commit at lists.scribus.net
Sun May 17 17:12:05 UTC 2020


Author: jghali
Date: Sun May 17 17:12:04 2020
New Revision: 23815

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23815
Log:
Fix bad Postscript being generated in the case where a pattern contains an image

Modified:
    trunk/Scribus/scribus/pslib.cpp

Modified: trunk/Scribus/scribus/pslib.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23815&path=/trunk/Scribus/scribus/pslib.cpp
==============================================================================
--- trunk/Scribus/scribus/pslib.cpp	(original)
+++ trunk/Scribus/scribus/pslib.cpp	Sun May 17 17:12:04 2020
@@ -39,6 +39,7 @@
 #include "commonstrings.h"
 #include "scconfig.h"
 #include "pluginapi.h"
+#include "pageitemiterator.h"
 #include "pageitem_latexframe.h"
 #include "pageitem_table.h"
 #include "prefsmanager.h"
@@ -643,9 +644,9 @@
 	{
 		QString patternName = patterns.at(i);
 		ScPattern pa = m_Doc->docPatterns[patternName];
-		for (int j = 0; j < pa.items.count(); ++j)
-		{
-			PageItem* item = pa.items.at(j);
+		for (PageItemIterator it(pa.items); *it; ++it)
+		{
+			PageItem* item = *it;
 			if ((item->isImageFrame()) && (item->imageIsAvailable) && (!item->Pfile.isEmpty()) && (item->printEnabled()) && (!Options.outputSeparations) && (Options.useColor))
 			{
 				if (!PS_ImageData(item, item->Pfile, item->itemName(), item->ImageProfile, item->UseEmbedded))
@@ -2319,7 +2320,7 @@
 				PageItem* embed = pat.items.at(em);
 				PS_save();
 				PS_translate(embed->gXpos, item->height() - embed->gYpos);
-				ProcessItem(page, embed, PNr, master, true);
+				ProcessItem(page, embed, PNr, master, true, useTemplate);
 				PS_restore();
 			}
 			PS_restore();
@@ -2346,7 +2347,7 @@
 			PageItem* embed = item->groupItemList.at(em);
 			PS_save();
 			PS_translate(embed->gXpos, item->height() - embed->gYpos);
-			ProcessItem(page, embed, PNr, master, true);
+			ProcessItem(page, embed, PNr, master, true, useTemplate);
 			PS_restore();
 		}
 		PS_restore();




More information about the scribus-commit mailing list