r14031 by jghali - #8459 : invalid postscript is generated when spot color name use non latin chars

scribus-commit scribus-commit at lists.scribus.net
Wed Sep 23 20:45:19 CEST 2009


Revision: 14031
Author: jghali
Date: 2009-09-23T18:46:25.268952Z
Commit message: #8459 : invalid postscript is generated when spot color name use non latin chars

Changeset: 
M  /branches/Version133x/Scribus/scribus/pslib.cpp

Diffs:
Index: scribus/pslib.cpp
===================================================================
--- scribus/pslib.cpp	(revision 14030)
+++ scribus/pslib.cpp	(revision 14031)
@@ -84,6 +84,7 @@
 	FNamen = "%%DocumentCustomColors: ";
 	ColorList::Iterator itf;
 	int c, m, y, k;
+	int spotCount = 1;
 	bool erst = true;
 	colorsToUse = DocColors;
 	spotMap.clear();
@@ -93,7 +94,7 @@
 		if (((DocColors[itf.key()].isSpotColor()) || (DocColors[itf.key()].isRegistrationColor())) && (useSpotColors))
 		{
 			DocColors[itf.key()].getCMYK(&c, &m, &y, &k);
-			colorDesc += "/Spot"+PSEncode(itf.key())+" { [ /Separation (";
+			colorDesc += "/Spot"+QString::number(spotCount)+" { [ /Separation (";
 			if (DocColors[itf.key()].isRegistrationColor())
 				colorDesc += "All";
 			else
@@ -103,7 +104,8 @@
 			colorDesc += ToStr(static_cast<double>(m) / 255)+"\nmul exch dup ";
 			colorDesc += ToStr(static_cast<double>(y) / 255)+"\nmul exch ";
 			colorDesc += ToStr(static_cast<double>(k) / 255)+" mul }] setcolorspace setcolor} bind def\n";
-			spotMap.insert(itf.key(), "Spot"+PSEncode(itf.key()));
+			spotMap.insert(itf.key(), "Spot"+QString::number(spotCount));
+			++spotCount;
 		}
 		if ((itf.key() != "Cyan") && (itf.key() != "Magenta") && (itf.key() != "Yellow") && (itf.key() != "Black") && DocColors[itf.key()].isSpotColor())
 		{




More information about the scribus-commit mailing list