r22196 by jghali -
scribus-commit
scribus-commit at lists.scribus.net
Fri Oct 20 18:07:13 UTC 2017
Author: jghali
Date: Fri Oct 20 18:07:13 2017
New Revision: 22196
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22196
Log:
#13910: No PDF/X-4 preflight profile for old docs
Modified:
trunk/Scribus/scribus/prefsmanager.cpp
trunk/Scribus/scribus/prefsmanager.h
trunk/Scribus/scribus/scribus.cpp
Modified: trunk/Scribus/scribus/prefsmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22196&path=/trunk/Scribus/scribus/prefsmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.cpp (original)
+++ trunk/Scribus/scribus/prefsmanager.cpp Fri Oct 20 18:07:13 2017
@@ -436,7 +436,7 @@
// lorem ipsum defaults
appPrefs.miscPrefs.useStandardLI = false;
appPrefs.miscPrefs.paragraphsLI = 10;
- initDefaultCheckerPrefs(&appPrefs.verifierPrefs.checkerPrefsList);
+ initDefaultCheckerPrefs(appPrefs.verifierPrefs.checkerPrefsList);
appPrefs.verifierPrefs.curCheckProfile = CommonStrings::PDF_1_4;
appPrefs.verifierPrefs.showPagesWithoutErrors=false;
appPrefs.verifierPrefs.showNonPrintingLayerErrors=false;
@@ -943,7 +943,7 @@
ReadPrefsXML();
if (appPrefs.verifierPrefs.checkerPrefsList.count() == 0)
{
- initDefaultCheckerPrefs(&appPrefs.verifierPrefs.checkerPrefsList);
+ initDefaultCheckerPrefs(appPrefs.verifierPrefs.checkerPrefsList);
appPrefs.verifierPrefs.curCheckProfile = CommonStrings::PDF_1_4;
}
if (!appPrefs.uiPrefs.mainWinState.isEmpty())
@@ -2711,54 +2711,66 @@
return true;
}
-void PrefsManager::initDefaultCheckerPrefs(CheckerPrefsList* cp)
-{
- if (cp!=NULL)
- {
- struct CheckerPrefs checkerSettings;
- checkerSettings.ignoreErrors = false;
- checkerSettings.autoCheck = true;
- checkerSettings.checkGlyphs = true;
- checkerSettings.checkOrphans = true;
- checkerSettings.checkOverflow = true;
- checkerSettings.checkPictures = true;
- checkerSettings.checkResolution = true;
- checkerSettings.checkPartFilledImageFrames = false;
- checkerSettings.checkTransparency = true;
- checkerSettings.checkAnnotations = false;
- checkerSettings.checkRasterPDF = true;
- checkerSettings.checkForGIF = true;
- checkerSettings.ignoreOffLayers = false;
- checkerSettings.checkOffConflictLayers = false;
- checkerSettings.minResolution = 144.0;
- checkerSettings.maxResolution = 2400.0;
- checkerSettings.checkNotCMYKOrSpot = false;
- checkerSettings.checkDeviceColorsAndOutputIntent = false;
- checkerSettings.checkFontNotEmbedded = false;
- checkerSettings.checkFontIsOpenType = false;
- checkerSettings.checkAppliedMasterDifferentSide = true;
- checkerSettings.checkEmptyTextFrames = true;
- //TODO Stop translating these into settings!!!!!!!!!
- cp->insert( CommonStrings::PostScript, checkerSettings);
- checkerSettings.checkFontNotEmbedded = true;
- checkerSettings.checkFontIsOpenType = true;
- cp->insert( CommonStrings::PDF_1_3 , checkerSettings);
- checkerSettings.checkTransparency = false;
- cp->insert( CommonStrings::PDF_1_4 , checkerSettings);
- cp->insert( CommonStrings::PDF_1_5 , checkerSettings);
- checkerSettings.checkTransparency = true;
- checkerSettings.checkAnnotations = true;
- checkerSettings.minResolution = 144.0;
- checkerSettings.checkDeviceColorsAndOutputIntent = true;
- cp->insert( CommonStrings::PDF_X3 , checkerSettings);
- checkerSettings.checkNotCMYKOrSpot = true;
- checkerSettings.checkDeviceColorsAndOutputIntent = false;
- cp->insert( CommonStrings::PDF_X1a , checkerSettings);
- checkerSettings.checkNotCMYKOrSpot = false;
- checkerSettings.checkDeviceColorsAndOutputIntent = true;
- checkerSettings.checkTransparency = false;
- checkerSettings.checkFontIsOpenType = false;
- cp->insert( CommonStrings::PDF_X4 , checkerSettings);
+void PrefsManager::initDefaultCheckerPrefs(CheckerPrefsList& cp)
+{
+ struct CheckerPrefs checkerSettings;
+ checkerSettings.ignoreErrors = false;
+ checkerSettings.autoCheck = true;
+ checkerSettings.checkGlyphs = true;
+ checkerSettings.checkOrphans = true;
+ checkerSettings.checkOverflow = true;
+ checkerSettings.checkPictures = true;
+ checkerSettings.checkResolution = true;
+ checkerSettings.checkPartFilledImageFrames = false;
+ checkerSettings.checkTransparency = true;
+ checkerSettings.checkAnnotations = false;
+ checkerSettings.checkRasterPDF = true;
+ checkerSettings.checkForGIF = true;
+ checkerSettings.ignoreOffLayers = false;
+ checkerSettings.checkOffConflictLayers = false;
+ checkerSettings.minResolution = 144.0;
+ checkerSettings.maxResolution = 2400.0;
+ checkerSettings.checkNotCMYKOrSpot = false;
+ checkerSettings.checkDeviceColorsAndOutputIntent = false;
+ checkerSettings.checkFontNotEmbedded = false;
+ checkerSettings.checkFontIsOpenType = false;
+ checkerSettings.checkAppliedMasterDifferentSide = true;
+ checkerSettings.checkEmptyTextFrames = true;
+ //TODO Stop translating these into settings!!!!!!!!!
+ cp.insert(CommonStrings::PostScript, checkerSettings);
+ checkerSettings.checkFontNotEmbedded = true;
+ checkerSettings.checkFontIsOpenType = true;
+ cp.insert(CommonStrings::PDF_1_3 , checkerSettings);
+ checkerSettings.checkTransparency = false;
+ cp.insert(CommonStrings::PDF_1_4 , checkerSettings);
+ cp.insert(CommonStrings::PDF_1_5 , checkerSettings);
+ checkerSettings.checkTransparency = true;
+ checkerSettings.checkAnnotations = true;
+ checkerSettings.minResolution = 144.0;
+ checkerSettings.checkDeviceColorsAndOutputIntent = true;
+ cp.insert(CommonStrings::PDF_X3 , checkerSettings);
+ checkerSettings.checkNotCMYKOrSpot = true;
+ checkerSettings.checkDeviceColorsAndOutputIntent = false;
+ cp.insert(CommonStrings::PDF_X1a , checkerSettings);
+ checkerSettings.checkNotCMYKOrSpot = false;
+ checkerSettings.checkDeviceColorsAndOutputIntent = true;
+ checkerSettings.checkTransparency = false;
+ checkerSettings.checkFontIsOpenType = false;
+ cp.insert(CommonStrings::PDF_X4 , checkerSettings);
+}
+
+void PrefsManager::insertMissingCheckerProfiles(CheckerPrefsList& cp)
+{
+ CheckerPrefsList defaultList;
+ initDefaultCheckerPrefs(defaultList);
+
+ CheckerPrefsList::const_iterator it = defaultList.constBegin();
+ for (; it != defaultList.constEnd(); ++it)
+ {
+ QString name = it.key();
+ if (cp.contains(name))
+ continue;
+ cp.insert(name, it.value());
}
}
Modified: trunk/Scribus/scribus/prefsmanager.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22196&path=/trunk/Scribus/scribus/prefsmanager.h
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.h (original)
+++ trunk/Scribus/scribus/prefsmanager.h Fri Oct 20 18:07:13 2017
@@ -66,10 +66,16 @@
*/
void initDefaults();
void initDefaultGUIFont(const QFont&);
- void initDefaultCheckerPrefs(CheckerPrefsList* cp);
+ void initDefaultCheckerPrefs(CheckerPrefsList& cp);
void initDefaultActionKeys();
void applyLoadedShortCuts();
void initArrowStyles();
+
+ /*!
+ \brief Insert checker profiles not available in specified list
+ */
+ void insertMissingCheckerProfiles(CheckerPrefsList& cp);
+
/*!
\author Craig Bradney
\date Thu 18 Nov 2004
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22196&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Fri Oct 20 18:07:13 2017
@@ -3608,9 +3608,10 @@
HaveDoc++;
if (doc->checkerProfiles().count() == 0)
{
- m_prefsManager->initDefaultCheckerPrefs(&(doc->checkerProfiles()));
+ m_prefsManager->initDefaultCheckerPrefs(doc->checkerProfiles());
doc->setCurCheckProfile(CommonStrings::PDF_1_4);
}
+ m_prefsManager->insertMissingCheckerProfiles(doc->checkerProfiles());
if (doc->pdfOptions().LPISettings.count() == 0)
{
struct LPIData lpo;
More information about the scribus-commit
mailing list