r24618 by jghali - Some refactoring for PSLib's createPS()

scribus-commit scribus-commit at lists.scribus.net
Fri Apr 9 17:54:01 UTC 2021


Author: jghali
Date: Fri Apr  9 17:54:01 2021
New Revision: 24618

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24618
Log:
Some refactoring for PSLib's createPS()

Modified:
    trunk/Scribus/scribus/pslib.cpp

Modified: trunk/Scribus/scribus/pslib.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24618&path=/trunk/Scribus/scribus/pslib.cpp
==============================================================================
--- trunk/Scribus/scribus/pslib.cpp	(original)
+++ trunk/Scribus/scribus/pslib.cpp	Fri Apr  9 17:54:01 2021
@@ -1602,16 +1602,16 @@
 		return 1;
 
 	std::vector<int> &pageNs = Options.pageNumbers;
-	bool sep = Options.outputSeparations;
-	QString SepNam = Options.separationName;
-	QStringList spots = Options.allSeparations;
+	bool outputSep = Options.outputSeparations;
+	QString separationName = Options.separationName;
+	QStringList separations = Options.allSeparations;
 	bool Hm = Options.mirrorH;
 	bool Vm = Options.mirrorV;
 	bool doClip = Options.doClip;
 	int sepac;
 	int pagemult;
-	if ((sep) && (SepNam == "All"))
-		pagemult = spots.count();
+	if ((outputSep) && (separationName == "All"))
+		pagemult = separations.count();
 	else
 		pagemult = 1;
 //	QVector<double> dum;
@@ -1743,20 +1743,20 @@
 			PS_translate(0, page->height());
 			PS_scale(1, -1);
 		}
-		if (sep)
-		{
-			if (SepNam == "Black")
+		if (outputSep)
+		{
+			if (separationName == "Black")
 				PS_plate(0);
-			else if (SepNam == "Cyan")
+			else if (separationName == "Cyan")
 				PS_plate(1);
-			else if (SepNam == "Magenta")
+			else if (separationName == "Magenta")
 				PS_plate(2);
-			else if (SepNam == "Yellow")
+			else if (separationName == "Yellow")
 				PS_plate(3);
-			else if (SepNam == "All")
-				PS_plate(sepac, spots[sepac]);
+			else if (separationName == "All")
+				PS_plate(sepac, separations[sepac]);
 			else
-				PS_plate(4, SepNam);
+				PS_plate(4, separationName);
 		}
 		ScLayer ll;
 		ll.isPrintable = false;
@@ -1776,13 +1776,13 @@
 		}
 		if (!abortExport && !errorOccured)
 			PS_end_page();
-		if (sep)
-		{
-			if (SepNam != "All")
+		if (outputSep)
+		{
+			if (separationName != "All")
 				aa++;
 			else
 			{
-				if (sepac == static_cast<int>(spots.count() - 1))
+				if (sepac == static_cast<int>(separations.count() - 1))
 				{
 					aa++;
 					sepac = 0;




More information about the scribus-commit mailing list