r18490 by craig - Add checking of master page location vs the pages's location to prefs

scribus-commit scribus-commit at lists.scribus.net
Mon Sep 23 20:09:46 UTC 2013


Author: craig
Date: Mon Sep 23 20:09:46 2013
New Revision: 18490

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18490
Log:
Add checking of master page location vs the pages's location to prefs

Modified:
    trunk/Scribus/scribus/documentchecker.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
    trunk/Scribus/scribus/prefsmanager.cpp
    trunk/Scribus/scribus/prefsstructs.h
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/ui/prefs_preflightverifier.cpp
    trunk/Scribus/scribus/ui/prefs_preflightverifierbase.ui

Modified: trunk/Scribus/scribus/documentchecker.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18490&path=/trunk/Scribus/scribus/documentchecker.cpp
==============================================================================
--- trunk/Scribus/scribus/documentchecker.cpp (original)
+++ trunk/Scribus/scribus/documentchecker.cpp Mon Sep 23 20:09:46 2013
@@ -71,6 +71,7 @@
 	checkerSettings.checkFontNotEmbedded = currDoc->checkerProfiles()[currDoc->curCheckProfile()].checkFontNotEmbedded;
 	checkerSettings.checkFontIsOpenType = currDoc->checkerProfiles()[currDoc->curCheckProfile()].checkFontIsOpenType;
 	checkerSettings.checkOppositePageMaster = currDoc->checkerProfiles()[currDoc->curCheckProfile()].checkOppositePageMaster;
+	checkerSettings.checkAppliedMasterDifferentSide = currDoc->checkerProfiles()[currDoc->curCheckProfile()].checkAppliedMasterDifferentSide;
 	currDoc->pageErrors.clear();
 	currDoc->docItemErrors.clear();
 	currDoc->masterItemErrors.clear();
@@ -92,28 +93,31 @@
 	for (int i=0; i < currDoc->DocPages.count(); ++i )
 	{
 		pageError.clear();
-		PageLocation pageLoc=currDoc->locationOfPage(i);
-		int masterPageNumber = currDoc->MasterNames[currDoc->DocPages[i]->MPageNam];
-		int masterPageLocation=currDoc->MasterPages[masterPageNumber]->LeftPg;
-		bool error=0;
-		if (currDoc->pagePositioning() == singlePage)
+		if (checkerSettings.checkAppliedMasterDifferentSide)
 		{
-			if (!(pageLoc==LeftPage && masterPageLocation==0))
-				error=1;
+			PageLocation pageLoc=currDoc->locationOfPage(i);
+			int masterPageNumber = currDoc->MasterNames[currDoc->DocPages[i]->MPageNam];
+			int masterPageLocation=currDoc->MasterPages[masterPageNumber]->LeftPg;
+			bool error=0;
+			if (currDoc->pagePositioning() == singlePage)
+			{
+				if (!(pageLoc==LeftPage && masterPageLocation==0))
+					error=1;
+			}
+			else
+			{
+				if (pageLoc==LeftPage && masterPageLocation==1)
+					error=0;
+				else if (pageLoc==RightPage && masterPageLocation==0)
+					error=0;
+				else if (pageLoc==MiddlePage && masterPageLocation==2)
+					error=0;
+				else
+					error=1;
+			}
+			if (error)
+				pageError.insert(AppliedMasterDifferentSide,0);
 		}
-		else
-		{
-			if (pageLoc==LeftPage && masterPageLocation==1)
-				error=0;
-			else if (pageLoc==RightPage && masterPageLocation==0)
-				error=0;
-			else if (pageLoc==MiddlePage && masterPageLocation==2)
-				error=0;
-			else
-				error=1;
-		}
-		if (error)
-			pageError.insert(AppliedMasterDifferentSide,0);
 		if (pageError.count() != 0)
 			currDoc->pageErrors.insert(i, pageError);
 	}

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18490&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp Mon Sep 23 20:09:46 2013
@@ -1120,6 +1120,7 @@
 	checkerSettings.checkDeviceColorsAndOutputIntent = attrs.valueAsBool("checkDeviceColorsAndOutputIntent", false);
 	checkerSettings.checkFontNotEmbedded = attrs.valueAsBool("checkFontNotEmbedded", false);
 	checkerSettings.checkFontIsOpenType  = attrs.valueAsBool("checkFontIsOpenType", false);
+	checkerSettings.checkAppliedMasterDifferentSide = attrs.valueAsBool("checkAppliedMasterDifferentSide", true);
 	doc->set1CheckerProfile(profileName, checkerSettings);
 	return true;
 }

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18490&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Mon Sep 23 20:09:46 2013
@@ -2341,6 +2341,7 @@
 	checkerSettings.checkDeviceColorsAndOutputIntent = attrs.valueAsBool("checkDeviceColorsAndOutputIntent", false);
 	checkerSettings.checkFontNotEmbedded = attrs.valueAsBool("checkFontNotEmbedded", false);
 	checkerSettings.checkFontIsOpenType  = attrs.valueAsBool("checkFontIsOpenType", false);
+	checkerSettings.checkAppliedMasterDifferentSide  = attrs.valueAsBool("checkAppliedMasterDifferentSide", true);
 	doc->set1CheckerProfile(profileName, checkerSettings);
 	return true;
 }

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18490&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp Mon Sep 23 20:09:46 2013
@@ -454,6 +454,7 @@
 		docu.writeAttribute("checkDeviceColorsAndOutputIntent", static_cast<int>(itcp.value().checkDeviceColorsAndOutputIntent));
 		docu.writeAttribute("checkFontNotEmbedded", static_cast<int>(itcp.value().checkFontNotEmbedded));
 		docu.writeAttribute("checkFontIsOpenType", static_cast<int>(itcp.value().checkFontIsOpenType));
+		docu.writeAttribute("checkAppliedMasterDifferentSide", static_cast<int>(itcp.value().checkAppliedMasterDifferentSide));
 	}
 }
 

Modified: trunk/Scribus/scribus/prefsmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18490&path=/trunk/Scribus/scribus/prefsmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.cpp (original)
+++ trunk/Scribus/scribus/prefsmanager.cpp Mon Sep 23 20:09:46 2013
@@ -1619,6 +1619,7 @@
 		dcVerifierProfile.setAttribute("CheckDeviceColorsAndOutputIntent", static_cast<int>(itcp.value().checkDeviceColorsAndOutputIntent));
 		dcVerifierProfile.setAttribute("CheckFontNotEmbedded", static_cast<int>(itcp.value().checkFontNotEmbedded));
 		dcVerifierProfile.setAttribute("CheckFontIsOpenType", static_cast<int>(itcp.value().checkFontIsOpenType));
+		dcVerifierProfile.setAttribute("CheckAppliedMasterDifferentSide", static_cast<int>(itcp.value().checkAppliedMasterDifferentSide));
 		elem.appendChild(dcVerifierProfile);
 	}
 	QDomElement dcColorManagement=docu.createElement("ColorManagement");
@@ -2327,6 +2328,7 @@
 			checkerSettings.checkDeviceColorsAndOutputIntent = static_cast<bool>(dc.attribute("CheckDeviceColorsAndOutputIntent", "0").toInt());
 			checkerSettings.checkFontNotEmbedded = static_cast<bool>(dc.attribute("CheckFontNotEmbedded", "0").toInt());
 			checkerSettings.checkFontIsOpenType = static_cast<bool>(dc.attribute("CheckFontIsOpenType", "0").toInt());
+			checkerSettings.checkAppliedMasterDifferentSide = static_cast<bool>(dc.attribute("CheckAppliedMasterDifferentSide", "1").toInt());
 			appPrefs.verifierPrefs.checkerPrefsList[name] = checkerSettings;
 		}
 		if (dc.tagName()=="Printer")
@@ -2642,6 +2644,7 @@
 		checkerSettings.checkDeviceColorsAndOutputIntent = false;
 		checkerSettings.checkFontNotEmbedded = false;
 		checkerSettings.checkFontIsOpenType = false;
+		checkerSettings.checkAppliedMasterDifferentSide = true;
 		//TODO Stop translating these into settings!!!!!!!!!
 		cp->insert( CommonStrings::PostScript, checkerSettings);
 		checkerSettings.checkFontNotEmbedded = true;

Modified: trunk/Scribus/scribus/prefsstructs.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18490&path=/trunk/Scribus/scribus/prefsstructs.h
==============================================================================
--- trunk/Scribus/scribus/prefsstructs.h (original)
+++ trunk/Scribus/scribus/prefsstructs.h Mon Sep 23 20:09:46 2013
@@ -53,6 +53,7 @@
 	bool checkFontIsOpenType; // embedded PDF might use OpenType font program (only allowed in PDF/X-4 and PDF 1.6)
 	bool checkPartFilledImageFrames;
 	bool checkOppositePageMaster;
+	bool checkAppliedMasterDifferentSide;
 };
 
 typedef QMap<QString, CheckerPrefs> CheckerPrefsList;

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18490&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Mon Sep 23 20:09:46 2013
@@ -11593,7 +11593,7 @@
 	d.setMinimumSize(300, 200);
 	d.setMaximumSize(300, 200);
 	d.setFocusPolicy(Qt::TabFocus);
-	qqv.setSource(QUrl::fromLocalFile("//Users/craig/scribus/PostTrunk/Scribus/scribus/ui/qtq_test1.qml"));
+	qqv.setSource(QUrl::fromLocalFile("//Users/craig/scribus/PostTrunk/trunkqt5/Scribus/scribus/ui/qtq_test1.qml"));
 	layout->addWidget(container);
 	d.exec();
 	*/

Modified: trunk/Scribus/scribus/ui/prefs_preflightverifier.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18490&path=/trunk/Scribus/scribus/ui/prefs_preflightverifier.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_preflightverifier.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_preflightverifier.cpp Mon Sep 23 20:09:46 2013
@@ -36,6 +36,7 @@
 	connect(checkVisiblePrintableLayersCheckBox, SIGNAL(clicked()), this, SLOT(putProfile()));
 	connect(removeProfilePushButton, SIGNAL(clicked()), this, SLOT(delProf()));
 	connect(addProfilePushButton, SIGNAL(clicked()), this, SLOT(addProf()));
+	connect(checkAppliedMasterPageLocationCheckBox, SIGNAL(clicked()), this, SLOT(putProfile()));
 }
 
 Prefs_PreflightVerifier::~Prefs_PreflightVerifier()
@@ -72,6 +73,7 @@
 	checkGIFsCheckBox->setChecked(checkerProfile[prefProfile].checkForGIF);
 	checkNonPrintableLayersCheckBox->setChecked(checkerProfile[prefProfile].ignoreOffLayers);
 	checkVisiblePrintableLayersCheckBox->setChecked(checkerProfile[prefProfile].checkOffConflictLayers);
+	checkAppliedMasterPageLocationCheckBox->setChecked(checkerProfile[prefProfile].checkAppliedMasterDifferentSide);
 	minimumResolutionSpinBox->setValue( qRound(checkerProfile[prefProfile].minResolution) );
 	maximumResolutionSpinBox->setValue( qRound(checkerProfile[prefProfile].maxResolution) );
 	currentProfile = prefProfile;
@@ -87,7 +89,6 @@
 	prefsData->verifierPrefs.showNonPrintingLayerErrors=showNonPrintingLayerErrorsCheckBox->isChecked();
 	prefsData->verifierPrefs.checkerPrefsList = checkerProfile;
 	prefsData->verifierPrefs.curCheckProfile = currentProfileComboBox->currentText();
-
 }
 
 void Prefs_PreflightVerifier::putProfile()
@@ -110,6 +111,7 @@
 		checkerProfile[currentProfile].checkForGIF = checkGIFsCheckBox->isChecked();
 		checkerProfile[currentProfile].ignoreOffLayers = checkNonPrintableLayersCheckBox->isChecked();
 		checkerProfile[currentProfile].checkOffConflictLayers = checkVisiblePrintableLayersCheckBox->isChecked();
+		checkerProfile[currentProfile].checkAppliedMasterDifferentSide = checkAppliedMasterPageLocationCheckBox->isChecked();
 	}
 }
 

Modified: trunk/Scribus/scribus/ui/prefs_preflightverifierbase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18490&path=/trunk/Scribus/scribus/ui/prefs_preflightverifierbase.ui
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_preflightverifierbase.ui (original)
+++ trunk/Scribus/scribus/ui/prefs_preflightverifierbase.ui Mon Sep 23 20:09:46 2013
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>623</width>
-    <height>711</height>
+    <height>757</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -89,7 +89,7 @@
         <x>0</x>
         <y>0</y>
         <width>597</width>
-        <height>545</height>
+        <height>591</height>
        </rect>
       </property>
       <layout class="QVBoxLayout" name="verticalLayout_2">
@@ -333,6 +333,13 @@
         </widget>
        </item>
        <item>
+        <widget class="QCheckBox" name="checkAppliedMasterPageLocationCheckBox">
+         <property name="text">
+          <string>Check if applied master page location is the same as each page's location</string>
+         </property>
+        </widget>
+       </item>
+       <item>
         <spacer name="verticalSpacer_2">
          <property name="orientation">
           <enum>Qt::Vertical</enum>




More information about the scribus-commit mailing list