r22557 by jghali - Stop using translated separation names in pslib

scribus-commit scribus-commit at lists.scribus.net
Thu May 24 18:37:10 UTC 2018


Author: jghali
Date: Thu May 24 18:37:10 2018
New Revision: 22557

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22557
Log:
Stop using translated separation names in pslib

Modified:
    trunk/Scribus/scribus/pslib.cpp
    trunk/Scribus/scribus/scprintengine_gdi.cpp
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/ui/preview.cpp
    trunk/Scribus/scribus/ui/printdialog.cpp

Modified: trunk/Scribus/scribus/pslib.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22557&path=/trunk/Scribus/scribus/pslib.cpp
==============================================================================
--- trunk/Scribus/scribus/pslib.cpp	(original)
+++ trunk/Scribus/scribus/pslib.cpp	Thu May 24 18:37:10 2018
@@ -1511,7 +1511,7 @@
 	bool doClip = options.doClip;
 	int sepac;
 	int pagemult;
-	if ((sep) && (SepNam == QObject::tr("All")))
+	if ((sep) && (SepNam == "All"))
 		pagemult = spots.count();
 	else
 		pagemult = 1;
@@ -1707,15 +1707,15 @@
 		}
 		if (sep)
 		{
-			if (SepNam == QObject::tr("Black"))
+			if (SepNam == "Black")
 				PS_plate(0);
-			else if (SepNam == QObject::tr("Cyan"))
+			else if (SepNam == "Cyan")
 				PS_plate(1);
-			else if (SepNam == QObject::tr("Magenta"))
+			else if (SepNam == "Magenta")
 				PS_plate(2);
-			else if (SepNam == QObject::tr("Yellow"))
+			else if (SepNam == "Yellow")
 				PS_plate(3);
-			else if (SepNam == QObject::tr("All"))
+			else if (SepNam == "All")
 				PS_plate(sepac, spots[sepac]);
 			else
 				PS_plate(4, SepNam);
@@ -1740,7 +1740,7 @@
 			PS_end_page();
 		if (sep)
 		{
-			if (SepNam != QObject::tr("All"))
+			if (SepNam != "All")
 				aa++;
 			else
 			{

Modified: trunk/Scribus/scribus/scprintengine_gdi.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22557&path=/trunk/Scribus/scribus/scprintengine_gdi.cpp
==============================================================================
--- trunk/Scribus/scribus/scprintengine_gdi.cpp	(original)
+++ trunk/Scribus/scribus/scprintengine_gdi.cpp	Thu May 24 18:37:10 2018
@@ -483,7 +483,7 @@
 {
 	bool succeed = true;
 	QStringList separations;
-	if (options.separationName != QObject::tr("All"))
+	if (options.separationName != "All")
 		separations.append(options.separationName);
 	else
 		separations += options.allSeparations;

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22557&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Thu May 24 18:37:10 2018
@@ -7013,7 +7013,7 @@
 	PrintOptions options;
 	options.pageNumbers.push_back(doc->currentPage()->pageNr()+1);
 	options.outputSeparations = false;
-	options.separationName = tr("All");
+	options.separationName = "All";
 	options.allSeparations = spots;
 	options.useColor = true;
 	options.mirrorH = false;

Modified: trunk/Scribus/scribus/ui/preview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22557&path=/trunk/Scribus/scribus/ui/preview.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/preview.cpp	(original)
+++ trunk/Scribus/scribus/ui/preview.cpp	Thu May 24 18:37:10 2018
@@ -564,7 +564,7 @@
 		PrintOptions options;
 		options.pageNumbers.push_back(Seite+1);
 		options.outputSeparations = false;
-		options.separationName = tr("All");
+		options.separationName = "All";
 		options.allSeparations = QStringList();
 		options.useColor = !useGray->isChecked();
 		options.mirrorH = MirrorHor->isChecked();
@@ -679,7 +679,7 @@
 		PrintOptions options;
 		options.pageNumbers.push_back(Seite+1);
 		options.outputSeparations = false;
-		options.separationName = tr("All");
+		options.separationName = "All";
 		options.allSeparations = QStringList();
 		options.useColor = !useGray->isChecked();
 		options.mirrorH = MirrorHor->isChecked();
@@ -1158,9 +1158,11 @@
 		}
 		else
 		{
-			int w = qRound(b);
-			int w2 = 4*w;
+			int w  = qRound(b);
 			int h2 = qRound(h);
+			if (doc->Pages->at(Seite)->orientation() == 1)
+				std::swap(w, h2);
+			int w2 = 4 * w;
 			image = QImage(w, h2, QImage::Format_ARGB32);
 			QByteArray imgc(w2, ' ');
 			QFile f(ScPaths::tempFileDir()+"/sc.png");

Modified: trunk/Scribus/scribus/ui/printdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22557&path=/trunk/Scribus/scribus/ui/printdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/printdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/printdialog.cpp	Thu May 24 18:37:10 2018
@@ -593,6 +593,16 @@
 
 QString PrintDialog::separationName()
 {
+	if (SepArt->currentIndex() == 0)
+		return QString("All");
+	if (SepArt->currentIndex() == 1)
+		return QString("Cyan");
+	if (SepArt->currentIndex() == 2)
+		return QString("Magenta");
+	if (SepArt->currentIndex() == 3)
+		return QString("Yellow");
+	if (SepArt->currentIndex() == 4)
+		return QString("Black");
 	return SepArt->currentText();
 }
 




More information about the scribus-commit mailing list