r23911 by jghali - Minor refactoring

scribus-commit scribus-commit at lists.scribus.net
Fri Jul 3 21:04:55 UTC 2020


Author: jghali
Date: Fri Jul  3 21:04:55 2020
New Revision: 23911

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23911
Log:
Minor refactoring

Modified:
    trunk/Scribus/scribus/pdflib_core.cpp

Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23911&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp	(original)
+++ trunk/Scribus/scribus/pdflib_core.cpp	Fri Jul  3 21:04:55 2020
@@ -10730,51 +10730,45 @@
 					exportToCMYK = true;
 					cm = PDFOptions::Compression_JPEG;
 				}*/
-				else
-				{
-					if (compress_method == PDFOptions::Compression_JPEG)
-					{
-						if (realCMYK || !((Options.UseRGB) || (Options.UseProfiles2)))
-						{
-							exportToGrayscale = Options.isGrayscale;
-							if (exportToGrayscale)
-								exportToCMYK      = !Options.isGrayscale;
-							else
-								exportToCMYK      = !Options.UseRGB;
-						}
-						cm = PDFOptions::Compression_JPEG;
-					}
-					else
-						cm = PDFOptions::Compression_ZIP;
-				}
-			}
-			else
-			{
-				if ((compress_method == PDFOptions::Compression_JPEG) || (compress_method == PDFOptions::Compression_Auto))
+				else if (compress_method == PDFOptions::Compression_JPEG)
 				{
 					if (realCMYK || !((Options.UseRGB) || (Options.UseProfiles2)))
 					{
 						exportToGrayscale = Options.isGrayscale;
 						if (exportToGrayscale)
-							exportToCMYK      = !Options.isGrayscale;
+							exportToCMYK = !Options.isGrayscale;
 						else
-							exportToCMYK      = !Options.UseRGB;
+							exportToCMYK = !Options.UseRGB;
 					}
 					cm = PDFOptions::Compression_JPEG;
-					/*if (compress_method == PDFOptions::Compression_Auto)
+				}
+				else
+					cm = PDFOptions::Compression_ZIP;
+			}
+			else if ((compress_method == PDFOptions::Compression_JPEG) || (compress_method == PDFOptions::Compression_Auto))
+			{
+				if (realCMYK || !((Options.UseRGB) || (Options.UseProfiles2)))
+				{
+					exportToGrayscale = Options.isGrayscale;
+					if (exportToGrayscale)
+						exportToCMYK      = !Options.isGrayscale;
+					else
+						exportToCMYK      = !Options.UseRGB;
+				}
+				cm = PDFOptions::Compression_JPEG;
+				/*if (compress_method == PDFOptions::Compression_Auto)
+				{
+					QFileInfo fi(tmpFile);
+					if (fi.size() < im.size())
 					{
-						QFileInfo fi(tmpFile);
-						if (fi.size() < im.size())
-						{
-							im.resize(0);
-							if (!loadRawBytes(tmpFile, im))
-								return false;
-							cm = PDFOptions::Compression_JPEG;
-						}
-						else
-							cm = PDFOptions::Compression_ZIP;
-					}*/
-				}
+						im.resize(0);
+						if (!loadRawBytes(tmpFile, im))
+							return false;
+						cm = PDFOptions::Compression_JPEG;
+					}
+					else
+						cm = PDFOptions::Compression_ZIP;
+				}*/
 			}
 			if ((hasGrayProfile) && (doc.HasCMS) && (Options.UseProfiles2) && (!hasColorEffect))
 				exportToGrayscale = true;




More information about the scribus-commit mailing list