r14543 by cbradney - #7767: Commit patch to track layer visibility vs printability
scribus-commit
scribus-commit at lists.scribus.net
Tue Jan 19 23:20:41 CET 2010
Revision: 14543
Author: cbradney
Date: 2010-01-19T22:19:11.515303Z
Commit message: #7767: Commit patch to track layer visibility vs printability
Changeset:
M /branches/Version135/Scribus/scribus/prefsmanager.cpp
M /branches/Version135/Scribus/scribus/tabcheckdoc.cpp
M /branches/Version135/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
M /branches/Version135/Scribus/scribus/checkDocument.cpp
M /branches/Version135/Scribus/scribus/prefsstructs.h
M /branches/Version135/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
M /branches/Version135/Scribus/scribus/tabcheckdoc.h
M /branches/Version135/Scribus/scribus/documentchecker.cpp
M /branches/Version135/Scribus/scribus/scribusstructs.h
Diffs:
Index: scribus/checkDocument.cpp
===================================================================
--- scribus/checkDocument.cpp (revision 14542)
+++ scribus/checkDocument.cpp (revision 14543)
@@ -386,6 +386,7 @@
// resultError = true;
bool hasError = false;
// globalGraveError = false;
+ bool layoutGraveError = false;
itemError = false;
// QTreeWidgetItem * pagep = 0;
// LAYERS **********************************************8
@@ -410,17 +411,29 @@
{
case Transparency:
errorText->setText(COLUMN_ITEM, tr("Transparency used"));
+ errorText->setIcon(COLUMN_ITEM, graveError );
+ layoutGraveError = true;
break;
case BlendMode:
errorText->setText(COLUMN_ITEM, tr("Blendmode used"));
+ errorText->setIcon(COLUMN_ITEM, graveError );
+ layoutGraveError = true;
break;
+ case OffConflictLayers:
+ errorText->setText(COLUMN_ITEM, tr("Print/Visible Mismatch"));
+ errorText->setIcon(COLUMN_ITEM, onlyWarning );
+ layoutGraveError = true;
+ break;
default:
break;
}
- errorText->setIcon(COLUMN_ITEM, graveError );
}
layer->setText(COLUMN_ITEM,tr("Layer \"%1\"").arg(doc->layerName(docLayerErrorsIt.key())));
- layer->setIcon(COLUMN_ITEM, graveError );
+// layer->setIcon(COLUMN_ITEM, graveError );
+ if (layoutGraveError)
+ layer->setIcon(COLUMN_ITEM, graveError );
+ else
+ layer->setIcon(COLUMN_ITEM, onlyWarning );
layer->setText(COLUMN_PROBLEM, tr("Issue(s): %1").arg(doc->docLayerErrors[docLayerErrorsIt.key()].count()));
layer->setExpanded(true);
// pagep = layer;
Index: scribus/prefsmanager.cpp
===================================================================
--- scribus/prefsmanager.cpp (revision 14542)
+++ scribus/prefsmanager.cpp (revision 14543)
@@ -1479,6 +1479,7 @@
dc79a.setAttribute("checkRasterPDF", static_cast<int>(itcp.value().checkRasterPDF));
dc79a.setAttribute("checkForGIF", static_cast<int>(itcp.value().checkForGIF));
dc79a.setAttribute("ignoreOffLayers", static_cast<int>(itcp.value().ignoreOffLayers));
+ dc79a.setAttribute("checkOffConflictLayers", static_cast<int>(itcp.value().checkOffConflictLayers));
dc79a.setAttribute("minResolution",ScCLocale::toQStringC(itcp.value().minResolution));
dc79a.setAttribute("maxResolution",ScCLocale::toQStringC(itcp.value().maxResolution));
elem.appendChild(dc79a);
@@ -2094,6 +2095,7 @@
checkerSettings.checkRasterPDF = static_cast<bool>(dc.attribute("checkRasterPDF", "1").toInt());
checkerSettings.checkForGIF = static_cast<bool>(dc.attribute("checkForGIF", "1").toInt());
checkerSettings.ignoreOffLayers = static_cast<bool>(dc.attribute("ignoreOffLayers", "0").toInt());
+ checkerSettings.checkOffConflictLayers = static_cast<bool>(dc.attribute("checkOffConflictLayers", "0").toInt());
appPrefs.checkerProfiles[name] = checkerSettings;
}
if (dc.tagName()=="PRINTER")
@@ -2400,6 +2402,7 @@
checkerSettings.checkRasterPDF = true;
checkerSettings.checkForGIF = true;
checkerSettings.ignoreOffLayers = false;
+ checkerSettings.checkOffConflictLayers = false;
checkerSettings.minResolution = 144.0;
checkerSettings.maxResolution = 2400.0;
//TODO Stop translating these into settings!!!!!!!!!
Index: scribus/prefsstructs.h
===================================================================
--- scribus/prefsstructs.h (revision 14542)
+++ scribus/prefsstructs.h (revision 14543)
@@ -35,6 +35,7 @@
bool checkRasterPDF;
bool checkForGIF;
bool ignoreOffLayers;
+ bool checkOffConflictLayers;
};
typedef QMap<QString, checkerPrefs> CheckerPrefsList;
Index: scribus/tabcheckdoc.h
===================================================================
--- scribus/tabcheckdoc.h (revision 14542)
+++ scribus/tabcheckdoc.h (revision 14543)
@@ -45,6 +45,7 @@
QCheckBox* rasterPDF;
QCheckBox* checkForGIF;
QCheckBox* ignoreOffLayers;
+ QCheckBox* checkOffConflictLayers;
QGroupBox* pictResolution;
QLabel* textLabel1;
QSpinBox* resolutionValue;
Index: scribus/documentchecker.cpp
===================================================================
--- scribus/documentchecker.cpp (revision 14542)
+++ scribus/documentchecker.cpp (revision 14543)
@@ -50,6 +50,7 @@
checkerSettings.checkRasterPDF = currDoc->checkerProfiles[currDoc->curCheckProfile].checkRasterPDF;
checkerSettings.checkForGIF = currDoc->checkerProfiles[currDoc->curCheckProfile].checkForGIF;
checkerSettings.ignoreOffLayers = currDoc->checkerProfiles[currDoc->curCheckProfile].ignoreOffLayers;
+ checkerSettings.checkOffConflictLayers = currDoc->checkerProfiles[currDoc->curCheckProfile].checkOffConflictLayers;
currDoc->docItemErrors.clear();
currDoc->masterItemErrors.clear();
currDoc->docLayerErrors.clear();
@@ -64,6 +65,8 @@
{
layerError.clear();
currDoc->Layers.levelToLayer(ll, Lnr);
+ if ((ll.isViewable != ll.isPrintable) && (checkerSettings.checkOffConflictLayers))
+ layerError.insert(OffConflictLayers, 0);
if ((!ll.isViewable) && (checkerSettings.ignoreOffLayers))
continue;
if ((!ll.isPrintable) && (checkerSettings.ignoreOffLayers))
Index: scribus/scribusstructs.h
===================================================================
--- scribus/scribusstructs.h (revision 14542)
+++ scribus/scribusstructs.h (revision 14543)
@@ -375,6 +375,7 @@
}
};
+//CB: Using 17 for OffConflictLayers as we moved onto 17 in 150svn
typedef enum {
MissingGlyph=1,
TextOverflow=2,
@@ -387,7 +388,8 @@
ImageDPITooHigh=9,
ImageIsGIF=10,
BlendMode=11,
- WrongFontInAnnotation=12
+ WrongFontInAnnotation=12,
+ OffConflictLayers=17
} PreflightError;
typedef QMap<PreflightError, int> errorCodes;
Index: scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp (revision 14542)
+++ scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp (revision 14543)
@@ -299,6 +299,7 @@
docu.writeAttribute("checkRasterPDF", static_cast<int>(itcp.value().checkRasterPDF));
docu.writeAttribute("checkForGIF", static_cast<int>(itcp.value().checkForGIF));
docu.writeAttribute("ignoreOffLayers", static_cast<int>(itcp.value().ignoreOffLayers));
+ docu.writeAttribute("checkOffConflictLayers", static_cast<int>(itcp.value().checkOffConflictLayers));
//docu.writeEndElement();
}
}
Index: scribus/plugins/fileloader/scribus134format/scribus134format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format.cpp (revision 14542)
+++ scribus/plugins/fileloader/scribus134format/scribus134format.cpp (revision 14543)
@@ -514,6 +514,7 @@
checkerSettings.checkRasterPDF = static_cast<bool>(pg.attribute("checkRasterPDF", "1").toInt());
checkerSettings.checkForGIF = static_cast<bool>(pg.attribute("checkForGIF", "1").toInt());
checkerSettings.ignoreOffLayers = static_cast<bool>(pg.attribute("ignoreOffLayers", "0").toInt());
+ checkerSettings.checkOffConflictLayers = static_cast<bool>(pg.attribute("checkOffConflictLayers", "0").toInt());
m_Doc->checkerProfiles[pg.attribute("Name")] = checkerSettings;
}
// 10/25/2004 pv - None is "reserved" color. cannot be defined in any file...
@@ -981,7 +982,8 @@
//m_Doc->Pages = &m_Doc->MasterPages;
m_Doc->setMasterPageMode(true);
}
- int docGc = m_Doc->GroupCounter, pagenr = -1;
+//CB comment out as no longer used int docGc = m_Doc->GroupCounter,
+ int pagenr = -1;
if ((!pg.attribute("OnMasterPage").isEmpty()) && (pg.tagName()=="MASTEROBJECT"))
{
m_Doc->setCurrentPage(m_Doc->MasterPages.at(m_Doc->MasterNames[pg.attribute("OnMasterPage")]));
@@ -1229,7 +1231,7 @@
{
QDomElement pite = pa.toElement();
m_Doc->setMasterPageMode(false);
- int docGc = m_Doc->GroupCounter;
+ //int docGc = m_Doc->GroupCounter;
/*m_Doc->GroupCounter = 0;*/
Neu = PasteItem(&pite, m_Doc, fileDir);
Neu->setRedrawBounding();
@@ -3004,7 +3006,7 @@
if (pg.attribute("NEXTITEM").toInt() != -1)
itemNextF[m_Doc->FrameItems->count()] = pg.attribute("NEXTITEM").toInt();
}*/
- int docGc = m_Doc->GroupCounter;
+ //int docGc = m_Doc->GroupCounter;
/*m_Doc->GroupCounter = 0;*/
Neu = PasteItem(&pg, m_Doc, fileDir);
Neu->moveBy(-pageX + Apage->xOffset(), - pageY + Apage->yOffset());
@@ -3219,7 +3221,7 @@
if (pg.attribute("NEXTITEM").toInt() != -1)
itemNextF[m_Doc->FrameItems->count()] = pg.attribute("NEXTITEM").toInt();
}*/
- int docGc = m_Doc->GroupCounter;
+ //int docGc = m_Doc->GroupCounter;
/*m_Doc->GroupCounter = 0;*/
Neu = PasteItem(&pite, m_Doc, fileDir);
Neu->setRedrawBounding();
Index: scribus/tabcheckdoc.cpp
===================================================================
--- scribus/tabcheckdoc.cpp (revision 14542)
+++ scribus/tabcheckdoc.cpp (revision 14543)
@@ -88,6 +88,9 @@
ignoreOffLayers = new QCheckBox( this );
ignoreOffLayers->setText( tr( "Ignore non-printable Layers" ) );
TabCheckDocLayout->addWidget( ignoreOffLayers );
+ checkOffConflictLayers = new QCheckBox( this );
+ checkOffConflictLayers->setText( tr( "Check for Visible/Printable Mismatch in Layers" ) );
+ TabCheckDocLayout->addWidget( checkOffConflictLayers );
layout1 = new QHBoxLayout;
layout1->setMargin(0);
layout1->setSpacing(5);
@@ -121,7 +124,7 @@
connect(resolutionValue, SIGNAL(valueChanged(int)), this, SLOT(putProfile()));
connect(resolutionValueM, SIGNAL(valueChanged(int)), this, SLOT(putProfile()));
connect(ignoreOffLayers, SIGNAL(clicked()), this, SLOT(putProfile()));
-
+ connect(checkOffConflictLayers, SIGNAL(clicked()), this, SLOT(putProfile()));
connect(removeProfile, SIGNAL(clicked()), this, SLOT(delProf()));
connect(addProfile, SIGNAL(clicked()), this, SLOT(addProf()));
}
@@ -147,6 +150,7 @@
rasterPDF->setChecked(checkerProfile[prefProfile].checkRasterPDF);
checkForGIF->setChecked(checkerProfile[prefProfile].checkForGIF);
ignoreOffLayers->setChecked(checkerProfile[prefProfile].ignoreOffLayers);
+ checkOffConflictLayers->setChecked(checkerProfile[prefProfile].checkOffConflictLayers);
resolutionValue->setValue( qRound(checkerProfile[prefProfile].minResolution) );
resolutionValueM->setValue( qRound(checkerProfile[prefProfile].maxResolution) );
currentProfile = prefProfile;
@@ -174,6 +178,7 @@
checkerProfile[currentProfile].checkRasterPDF = rasterPDF->isChecked();
checkerProfile[currentProfile].checkForGIF = checkForGIF->isChecked();
checkerProfile[currentProfile].ignoreOffLayers = ignoreOffLayers->isChecked();
+ checkerProfile[currentProfile].checkOffConflictLayers = checkOffConflictLayers->isChecked();
}
}
@@ -208,6 +213,7 @@
disconnect(checkForGIF, SIGNAL(clicked()), this, SLOT(putProfile()));
disconnect(useAnnotations, SIGNAL(clicked()), this, SLOT(putProfile()));
disconnect(ignoreOffLayers, SIGNAL(clicked()), this, SLOT(putProfile()));
+ disconnect(checkOffConflictLayers, SIGNAL(clicked()), this, SLOT(putProfile()));
ignoreErrors->setChecked(checkerProfile[name].ignoreErrors);
automaticCheck->setChecked(checkerProfile[name].autoCheck);
missingGlyphs->setChecked(checkerProfile[name].checkGlyphs);
@@ -222,6 +228,7 @@
rasterPDF->setChecked(checkerProfile[name].checkRasterPDF);
checkForGIF->setChecked(checkerProfile[name].checkForGIF);
ignoreOffLayers->setChecked(checkerProfile[name].ignoreOffLayers);
+ checkOffConflictLayers->setChecked(checkerProfile[name].checkOffConflictLayers);
currentProfile = name;
connect(ignoreErrors, SIGNAL(clicked()), this, SLOT(putProfile()));
connect(automaticCheck, SIGNAL(clicked()), this, SLOT(putProfile()));
@@ -236,6 +243,7 @@
connect(checkForGIF, SIGNAL(clicked()), this, SLOT(putProfile()));
connect(useAnnotations, SIGNAL(clicked()), this, SLOT(putProfile()));
connect(ignoreOffLayers, SIGNAL(clicked()), this, SLOT(putProfile()));
+ connect(checkOffConflictLayers, SIGNAL(clicked()), this, SLOT(putProfile()));
}
void TabCheckDoc::addProf()
@@ -255,6 +263,7 @@
checkerSettings.checkRasterPDF = rasterPDF->isChecked();
checkerSettings.checkForGIF = checkForGIF->isChecked();
checkerSettings.ignoreOffLayers = ignoreOffLayers->isChecked();
+ checkerSettings.checkOffConflictLayers = checkOffConflictLayers->isChecked();
checkerProfile.insert(tempNewProfileName, checkerSettings);
currentProfile = tempNewProfileName;
if (checkerProfile.count() > 1)
More information about the scribus-commit
mailing list