Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 1260 → Rev 1261

/branches/Version13x/Scribus/scribus/fileloader.cpp
393,18 → 393,8
doc->guidesSettings.before = static_cast<bool>(QStoInt(dc.attribute("BACKG","1")));
doc->guidesSettings.guideRad = QStoInt(dc.attribute("GuideRad","10"));
doc->guidesSettings.grabRad = QStoInt(dc.attribute("GRAB","4"));
if (dc.hasAttribute("checkGlyphs"))
{
doc->checkerSettings.ignoreErrors = static_cast<bool>(QStoInt(dc.attribute("ignoreErrors", "0")));
doc->checkerSettings.autoCheck = static_cast<bool>(QStoInt(dc.attribute("autoCheck", "1")));
doc->checkerSettings.checkGlyphs = static_cast<bool>(QStoInt(dc.attribute("checkGlyphs", "1")));
doc->checkerSettings.checkOrphans = static_cast<bool>(QStoInt(dc.attribute("checkOrphans", "1")));
doc->checkerSettings.checkOverflow = static_cast<bool>(QStoInt(dc.attribute("checkOverflow", "1")));
doc->checkerSettings.checkPictures = static_cast<bool>(QStoInt(dc.attribute("checkPictures", "1")));
doc->checkerSettings.checkResolution = static_cast<bool>(QStoInt(dc.attribute("checkResolution", "1")));
doc->checkerSettings.checkTransparency = static_cast<bool>(QStoInt(dc.attribute("checkTransparency", "1")));
doc->checkerSettings.minResolution = QStodouble(dc.attribute("minResolution","72"));
}
if (dc.hasAttribute("currentProfile"))
doc->curCheckProfile = dc.attribute("currentProfile");
doc->LastAuto = 0;
QDomNode PAGE=DOC.firstChild();
counter = 0;
413,6 → 403,20
ObCount++;
dia2->setProgress(ObCount);
QDomElement pg=PAGE.toElement();
if (pg.tagName()=="CheckProfile")
{
struct checkerPrefs checkerSettings;
checkerSettings.ignoreErrors = static_cast<bool>(QStoInt(pg.attribute("ignoreErrors", "0")));
checkerSettings.autoCheck = static_cast<bool>(QStoInt(pg.attribute("autoCheck", "1")));
checkerSettings.checkGlyphs = static_cast<bool>(QStoInt(pg.attribute("checkGlyphs", "1")));
checkerSettings.checkOrphans = static_cast<bool>(QStoInt(pg.attribute("checkOrphans", "1")));
checkerSettings.checkOverflow = static_cast<bool>(QStoInt(pg.attribute("checkOverflow", "1")));
checkerSettings.checkPictures = static_cast<bool>(QStoInt(pg.attribute("checkPictures", "1")));
checkerSettings.checkResolution = static_cast<bool>(QStoInt(pg.attribute("checkResolution", "1")));
checkerSettings.checkTransparency = static_cast<bool>(QStoInt(pg.attribute("checkTransparency", "1")));
checkerSettings.minResolution = QStodouble(pg.attribute("minResolution","72"));
doc->checkerProfiles[pg.attribute("Name")] = checkerSettings;
}
// 10/25/2004 pv - None is "reserved" color. cannot be defined in any file...
if(pg.tagName()=="COLOR" && pg.attribute("NAME")!="None")
{
/branches/Version13x/Scribus/scribus/checkDocument.cpp
4,7 → 4,6
#include <qvariant.h>
#include <qheader.h>
#include <qlistview.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
11,6 → 10,8
#include <qimage.h>
#include <qpixmap.h>
#include <qmap.h>
#include <qlabel.h>
#include <qcombobox.h>
#include "scribusdoc.h"
#include "page.h"
extern QPixmap loadIcon(QString nam);
118,6 → 119,14
setIcon(loadIcon("AppIcon.png"));
checkDocumentLayout = new QVBoxLayout( this, 10, 5, "checkDocumentLayout");
 
layout1 = new QHBoxLayout( 0, 0, 5, "layout1");
textLabel1 = new QLabel( this, "textLabel1" );
textLabel1->setText( tr( "Current Profile:" ) );
layout1->addWidget( textLabel1 );
curCheckProfile = new QComboBox( true, this, "Profiles" );
curCheckProfile->setEditable(false);
layout1->addWidget( curCheckProfile );
checkDocumentLayout->addLayout( layout1 );
reportDisplay = new QListView( this, "reportDisplay" );
reportDisplay->addColumn( tr( "Items" ) );
reportDisplay->header()->setClickEnabled( false, reportDisplay->header()->count() - 1 );
127,18 → 136,11
reportDisplay->header()->setResizeEnabled( false, reportDisplay->header()->count() - 1 );
reportDisplay->setSorting(-1);
checkDocumentLayout->addWidget( reportDisplay );
layout1 = new QHBoxLayout( 0, 0, 5, "layout1");
// okButton = new QPushButton( this, "okButton" );
// layout1->addWidget( okButton );
newCheck = new QPushButton( this, "newCheck" );
newCheck->setEnabled(false);
layout1->addWidget( newCheck );
checkDocumentLayout->addLayout( layout1 );
languageChange();
itemMap.clear();
resize( QSize(306, 259).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished );
connect(newCheck, SIGNAL(clicked()), this, SLOT(newScan()));
connect(curCheckProfile, SIGNAL(activated(const QString&)), this, SLOT(newScan(const QString&)));
}
 
void CheckDocument::closeEvent(QCloseEvent *ce)
163,9 → 165,10
}
}
 
void CheckDocument::newScan()
void CheckDocument::newScan(const QString& name)
{
clearErrorList();
document->curCheckProfile = name;
emit rescan();
}
 
175,17 → 178,25
reportDisplay->clear();
itemMap.clear();
pageMap.clear();
newCheck->setEnabled(false);
}
 
void CheckDocument::buildErrorList(ScribusDoc *doc)
{
document = doc;
disconnect(curCheckProfile, SIGNAL(activated(const QString&)), this, SLOT(newScan(const QString&)));
curCheckProfile->clear();
QMap<QString, checkerPrefs>::Iterator it;
for (it = doc->checkerProfiles.begin(); it != doc->checkerProfiles.end(); ++it)
{
curCheckProfile->insertItem(it.key());
}
curCheckProfile->setCurrentText(doc->curCheckProfile);
connect(curCheckProfile, SIGNAL(activated(const QString&)), this, SLOT(newScan(const QString&)));
QString missingGlyph = tr("Glyphs missing");
QString textOverflow = tr("Text overflow");
QString notOnPage = tr("Object is not on a Page");
QString missingImg = tr("Missing Image");
QString lowDPI = tr("Image has a DPI-Value less than %1 DPI").arg(qRound(doc->checkerSettings.minResolution));
QString lowDPI = tr("Image has a DPI-Value less than %1 DPI").arg(qRound(doc->checkerProfiles[doc->curCheckProfile].minResolution));
QString transpar = tr("Object has transparency");
reportDisplay->clear();
reportDisplay->setSorting(-1);
547,7 → 558,6
item->setText( 1, tr( "Problems found" ) );
item->setOpen( true );
}
newCheck->setEnabled(true);
connect(reportDisplay, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(slotSelect(QListViewItem*)));
}
 
560,7 → 570,5
setCaption( tr( "Preflight Verifier" ) );
reportDisplay->header()->setLabel( 0, tr( "Items" ) );
reportDisplay->header()->setLabel( 1, tr( "Problems" ) );
// okButton->setText( tr( "Close" ) );
newCheck->setText( tr( "Check again" ) );
}
 
/branches/Version13x/Scribus/scribus/libprefs/prefs.cpp
367,7 → 367,7
tabHyphenator->maxCount->setValue(prefsData->HyCount);
addItem( tr("Hyphenator"), loadIcon("hyphenate.png"), tabHyphenator);
 
tabDocChecker = new TabCheckDoc( prefsWidgets, &prefsData->checkerSettings);
tabDocChecker = new TabCheckDoc( prefsWidgets, prefsData->checkerProfiles, prefsData->curCheckProfile);
addItem( tr("Doc-Checker"), loadIcon("checkdoc.png"), tabDocChecker);
 
if (CMSavail)
/branches/Version13x/Scribus/scribus/reformdoc.cpp
314,7 → 314,7
tabHyphenator->maxCount->setValue(doc->docHyphenator->HyCount);
addItem( tr("Hyphenator"), loadIcon("hyphenate.png"), tabHyphenator);
 
tabDocChecker = new TabCheckDoc( prefsWidgets, &doc->checkerSettings);
tabDocChecker = new TabCheckDoc( prefsWidgets, doc->checkerProfiles, doc->curCheckProfile);
addItem( tr("Doc-Checker"), loadIcon("checkdoc.png"), tabDocChecker);
 
int cmsTab = 0;
/branches/Version13x/Scribus/scribus/scribusdoc.cpp
109,15 → 109,8
toolSettings.magMin = prefsData->toolSettings.magMin;
toolSettings.magMax = prefsData->toolSettings.magMax;
toolSettings.magStep = prefsData->toolSettings.magStep;
checkerSettings.ignoreErrors = prefsData->checkerSettings.ignoreErrors;
checkerSettings.autoCheck = prefsData->checkerSettings.autoCheck;
checkerSettings.checkGlyphs = prefsData->checkerSettings.checkGlyphs;
checkerSettings.checkOrphans = prefsData->checkerSettings.checkOrphans;
checkerSettings.checkOverflow = prefsData->checkerSettings.checkOverflow;
checkerSettings.checkPictures = prefsData->checkerSettings.checkPictures;
checkerSettings.checkResolution = prefsData->checkerSettings.checkResolution;
checkerSettings.checkTransparency = prefsData->checkerSettings.checkTransparency;
checkerSettings.minResolution = prefsData->checkerSettings.minResolution;
checkerProfiles = prefsData->checkerProfiles;
curCheckProfile = prefsData->curCheckProfile;
docUnitIndex = prefsData->docUnitIndex;
marginColored = prefsData->marginColored;
Language = prefsData->Language;
/branches/Version13x/Scribus/scribus/scribusXml.cpp
2578,15 → 2578,23
dc.setAttribute("PAGEC",doc->papColor.name());
dc.setAttribute("MARGC",doc->guidesSettings.margColor.name());
dc.setAttribute("RANDF", static_cast<int>(doc->marginColored));
dc.setAttribute("ignoreErrors", static_cast<int>(doc->checkerSettings.ignoreErrors));
dc.setAttribute("autoCheck", static_cast<int>(doc->checkerSettings.autoCheck));
dc.setAttribute("checkGlyphs", static_cast<int>(doc->checkerSettings.checkGlyphs));
dc.setAttribute("checkOrphans", static_cast<int>(doc->checkerSettings.checkOrphans));
dc.setAttribute("checkOverflow", static_cast<int>(doc->checkerSettings.checkOverflow));
dc.setAttribute("checkPictures", static_cast<int>(doc->checkerSettings.checkPictures));
dc.setAttribute("checkResolution", static_cast<int>(doc->checkerSettings.checkResolution));
dc.setAttribute("checkTransparency", static_cast<int>(doc->checkerSettings.checkTransparency));
dc.setAttribute("minResolution",doc->checkerSettings.minResolution);
dc.setAttribute("currentProfile", doc->curCheckProfile);
QMap<QString, checkerPrefs>::Iterator itcp;
for (itcp = doc->checkerProfiles.begin(); itcp != doc->checkerProfiles.end(); ++itcp)
{
QDomElement dc79a=docu.createElement("CheckProfile");
dc79a.setAttribute("Name",itcp.key());
dc79a.setAttribute("ignoreErrors", static_cast<int>(itcp.data().ignoreErrors));
dc79a.setAttribute("autoCheck", static_cast<int>(itcp.data().autoCheck));
dc79a.setAttribute("checkGlyphs", static_cast<int>(itcp.data().checkGlyphs));
dc79a.setAttribute("checkOrphans", static_cast<int>(itcp.data().checkOrphans));
dc79a.setAttribute("checkOverflow", static_cast<int>(itcp.data().checkOverflow));
dc79a.setAttribute("checkPictures", static_cast<int>(itcp.data().checkPictures));
dc79a.setAttribute("checkResolution", static_cast<int>(itcp.data().checkResolution));
dc79a.setAttribute("checkTransparency", static_cast<int>(itcp.data().checkTransparency));
dc79a.setAttribute("minResolution",itcp.data().minResolution);
dc.appendChild(dc79a);
}
QMap<QString,multiLine>::Iterator itMU;
for (itMU = doc->MLineStyles.begin(); itMU != doc->MLineStyles.end(); ++itMU)
{
2981,16 → 2989,24
dc79.setAttribute("VISIBLE", static_cast<int>(Vor->checkPalSettings.visible));
dc79.setAttribute("XPOS",Vor->checkPalSettings.xPosition);
dc79.setAttribute("YPOS",Vor->checkPalSettings.yPosition);
dc79.setAttribute("ignoreErrors", static_cast<int>(Vor->checkerSettings.ignoreErrors));
dc79.setAttribute("autoCheck", static_cast<int>(Vor->checkerSettings.autoCheck));
dc79.setAttribute("checkGlyphs", static_cast<int>(Vor->checkerSettings.checkGlyphs));
dc79.setAttribute("checkOrphans", static_cast<int>(Vor->checkerSettings.checkOrphans));
dc79.setAttribute("checkOverflow", static_cast<int>(Vor->checkerSettings.checkOverflow));
dc79.setAttribute("checkPictures", static_cast<int>(Vor->checkerSettings.checkPictures));
dc79.setAttribute("checkResolution", static_cast<int>(Vor->checkerSettings.checkResolution));
dc79.setAttribute("checkTransparency", static_cast<int>(Vor->checkerSettings.checkTransparency));
dc79.setAttribute("minResolution",Vor->checkerSettings.minResolution);
dc79.setAttribute("currentProfile", Vor->curCheckProfile);
elem.appendChild(dc79);
QMap<QString, checkerPrefs>::Iterator itcp;
for (itcp = Vor->checkerProfiles.begin(); itcp != Vor->checkerProfiles.end(); ++itcp)
{
QDomElement dc79a=docu.createElement("CheckProfile");
dc79a.setAttribute("Name",itcp.key());
dc79a.setAttribute("ignoreErrors", static_cast<int>(itcp.data().ignoreErrors));
dc79a.setAttribute("autoCheck", static_cast<int>(itcp.data().autoCheck));
dc79a.setAttribute("checkGlyphs", static_cast<int>(itcp.data().checkGlyphs));
dc79a.setAttribute("checkOrphans", static_cast<int>(itcp.data().checkOrphans));
dc79a.setAttribute("checkOverflow", static_cast<int>(itcp.data().checkOverflow));
dc79a.setAttribute("checkPictures", static_cast<int>(itcp.data().checkPictures));
dc79a.setAttribute("checkResolution", static_cast<int>(itcp.data().checkResolution));
dc79a.setAttribute("checkTransparency", static_cast<int>(itcp.data().checkTransparency));
dc79a.setAttribute("minResolution",itcp.data().minResolution);
elem.appendChild(dc79a);
}
QDomElement dc8=docu.createElement("MEASUREMENTS");
dc8.setAttribute("VISIBLE", static_cast<int>(Vor->mPaletteSettings.visible));
dc8.setAttribute("XPOS",Vor->mPaletteSettings.xPosition);
3317,16 → 3333,22
Vorein->checkPalSettings.visible = static_cast<bool>(QStoInt(dc.attribute("VISIBLE", "1")));
Vorein->checkPalSettings.xPosition = QStoInt(dc.attribute("XPOS"));
Vorein->checkPalSettings.yPosition = QStoInt(dc.attribute("YPOS"));
Vorein->checkerSettings.ignoreErrors = static_cast<bool>(QStoInt(dc.attribute("ignoreErrors", "0")));
Vorein->checkerSettings.autoCheck = static_cast<bool>(QStoInt(dc.attribute("autoCheck", "1")));
Vorein->checkerSettings.checkGlyphs = static_cast<bool>(QStoInt(dc.attribute("checkGlyphs", "1")));
Vorein->checkerSettings.checkOrphans = static_cast<bool>(QStoInt(dc.attribute("checkOrphans", "1")));
Vorein->checkerSettings.checkOverflow = static_cast<bool>(QStoInt(dc.attribute("checkOverflow", "1")));
Vorein->checkerSettings.checkPictures = static_cast<bool>(QStoInt(dc.attribute("checkPictures", "1")));
Vorein->checkerSettings.checkResolution = static_cast<bool>(QStoInt(dc.attribute("checkResolution", "1")));
Vorein->checkerSettings.checkTransparency = static_cast<bool>(QStoInt(dc.attribute("checkTransparency", "1")));
Vorein->checkerSettings.minResolution = QStodouble(dc.attribute("minResolution","72"));
Vorein->curCheckProfile = dc.attribute("currentProfile", tr("Postscript"));
}
if (dc.tagName()=="CheckProfile")
{
struct checkerPrefs checkerSettings;
checkerSettings.ignoreErrors = static_cast<bool>(QStoInt(dc.attribute("ignoreErrors", "0")));
checkerSettings.autoCheck = static_cast<bool>(QStoInt(dc.attribute("autoCheck", "1")));
checkerSettings.checkGlyphs = static_cast<bool>(QStoInt(dc.attribute("checkGlyphs", "1")));
checkerSettings.checkOrphans = static_cast<bool>(QStoInt(dc.attribute("checkOrphans", "1")));
checkerSettings.checkOverflow = static_cast<bool>(QStoInt(dc.attribute("checkOverflow", "1")));
checkerSettings.checkPictures = static_cast<bool>(QStoInt(dc.attribute("checkPictures", "1")));
checkerSettings.checkResolution = static_cast<bool>(QStoInt(dc.attribute("checkResolution", "1")));
checkerSettings.checkTransparency = static_cast<bool>(QStoInt(dc.attribute("checkTransparency", "1")));
checkerSettings.minResolution = QStodouble(dc.attribute("minResolution","72"));
Vorein->checkerProfiles[dc.attribute("Name")] = checkerSettings;
}
if (dc.tagName()=="PRINTER")
{
Vorein->PrinterName = dc.attribute("NAME");
/branches/Version13x/Scribus/scribus/scribusstructs.h
435,7 → 435,8
guidesPrefs guidesSettings;
typoPrefs typographicSetttings;
toolPrefs toolSettings;
checkerPrefs checkerSettings;
QMap<QString, checkerPrefs> checkerProfiles;
QString curCheckProfile;
int docUnitIndex;
windowPrefs mainToolBarSettings;
windowPrefs pdfToolBarSettings;
/branches/Version13x/Scribus/scribus/scribusdoc.h
177,7 → 177,8
typoPrefs typographicSetttings;
guidesPrefs guidesSettings;
toolPrefs toolSettings;
checkerPrefs checkerSettings;
QMap<QString, checkerPrefs> checkerProfiles;
QString curCheckProfile;
/** Letztes Element fuer AutoTextrahmen */
PageItem *LastAuto;
/** Erstes Element fuer AutoTextrahmen */
/branches/Version13x/Scribus/scribus/libabout/about.cpp
65,7 → 65,7
tabLayout1->addWidget( pixmapLabel1 );
buildID = new QLabel( tab, "BB" );
buildID->setAlignment(Qt::AlignCenter);
QString bu = tr("%1. %2 %3 ").arg("23").arg("January").arg("2005");
QString bu = tr("%1. %2 %3 ").arg("24").arg("January").arg("2005");
#ifdef HAVE_CMS
bu += "C";
#else
/branches/Version13x/Scribus/scribus/scribus.cpp
527,15 → 527,24
Prefs.ScratchRight = 100;
Prefs.ScratchTop = 20;
Prefs.ScratchBottom = 20;
Prefs.checkerSettings.ignoreErrors = false;
Prefs.checkerSettings.autoCheck = true;
Prefs.checkerSettings.checkGlyphs = true;
Prefs.checkerSettings.checkOrphans = true;
Prefs.checkerSettings.checkOverflow = true;
Prefs.checkerSettings.checkPictures = true;
Prefs.checkerSettings.checkResolution = true;
Prefs.checkerSettings.checkTransparency = true;
Prefs.checkerSettings.minResolution = 72.0;
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.checkTransparency = true;
checkerSettings.minResolution = 72.0;
Prefs.checkerProfiles.insert( tr("Postscript"), checkerSettings);
Prefs.checkerProfiles.insert( tr("PDF-1.3"), checkerSettings);
checkerSettings.checkTransparency = false;
Prefs.checkerProfiles.insert( tr("PDF-1.4"), checkerSettings);
checkerSettings.checkTransparency = true;
checkerSettings.minResolution = 144.0;
Prefs.checkerProfiles.insert( tr("PDF/X-3"), checkerSettings);
Prefs.curCheckProfile = tr("Postscript");
}
 
 
1240,7 → 1249,7
connect( scrActions["toolsPages"], SIGNAL(activated()) , this, SLOT(ToggleSepal()) );
connect( scrActions["toolsBookmarks"], SIGNAL(activated()) , this, SLOT(ToggleBookpal()) );
connect( scrActions["toolsActionHistory"], SIGNAL(activated()) , this, SLOT(ToggleUndoPalette()) );
connect( scrActions["toolsPreflightVerifier"], SIGNAL(activated()) , this, SLOT(ToggleCheckPal()) );
connect( scrActions["toolsPreflightVerifier"], SIGNAL(activated()) , this, SLOT(slotCheckDoc()) );
connect( scrActions["toolsToolbarTools"], SIGNAL(activated()) , this, SLOT(ToggleTools()) );
connect( scrActions["toolsToolbarPDF"], SIGNAL(activated()) , this, SLOT(TogglePDFTools()) );
3042,15 → 3051,8
doc->guidesSettings.margColor = dia->tabGuides->colorMargin;
doc->guidesSettings.guideColor = dia->tabGuides->colorGuides;
doc->guidesSettings.baseColor = dia->tabGuides->colorBaselineGrid;
doc->checkerSettings.ignoreErrors = dia->tabDocChecker->ignoreErrors->isChecked();
doc->checkerSettings.autoCheck = dia->tabDocChecker->automaticCheck->isChecked();
doc->checkerSettings.checkGlyphs = dia->tabDocChecker->missingGlyphs->isChecked();
doc->checkerSettings.checkOrphans = dia->tabDocChecker->checkOrphans->isChecked();
doc->checkerSettings.checkOverflow = dia->tabDocChecker->textOverflow->isChecked();
doc->checkerSettings.checkPictures = dia->tabDocChecker->missingPictures->isChecked();
doc->checkerSettings.checkResolution = dia->tabDocChecker->pictResolution->isChecked();
doc->checkerSettings.checkTransparency = dia->tabDocChecker->tranparentObjects->isChecked();
doc->checkerSettings.minResolution = dia->tabDocChecker->resolutionValue->value();
doc->checkerProfiles = dia->tabDocChecker->checkerProfile;
doc->curCheckProfile = dia->tabDocChecker->curCheckProfile->currentText();
doc->typographicSetttings.valueSuperScript = dia->tabTypo->superDisplacement->value();
doc->typographicSetttings.scalingSuperScript = dia->tabTypo->superScaling->value();
doc->typographicSetttings.valueSubScript = dia->tabTypo->subDisplacement->value();
4790,7 → 4792,7
//int Nr;
//bool fil, sep, farbe, PSfile, mirrorH, mirrorV, useICC, DoGCR;
//PSfile = false;
if ((doc->checkerSettings.autoCheck) && (!doc->checkerSettings.ignoreErrors))
if ((doc->checkerProfiles[doc->curCheckProfile].autoCheck) && (!doc->checkerProfiles[doc->curCheckProfile].ignoreErrors))
{
scanDocument();
if ((doc->docItemErrors.count() != 0) || (doc->masterItemErrors.count() != 0))
7671,15 → 7673,8
Prefs.guidesSettings.margColor = dia->tabGuides->colorMargin;
Prefs.guidesSettings.guideColor = dia->tabGuides->colorGuides;
Prefs.guidesSettings.baseColor = dia->tabGuides->colorBaselineGrid;
Prefs.checkerSettings.ignoreErrors = dia->tabDocChecker->ignoreErrors->isChecked();
Prefs.checkerSettings.autoCheck = dia->tabDocChecker->automaticCheck->isChecked();
Prefs.checkerSettings.checkGlyphs = dia->tabDocChecker->missingGlyphs->isChecked();
Prefs.checkerSettings.checkOrphans = dia->tabDocChecker->checkOrphans->isChecked();
Prefs.checkerSettings.checkOverflow = dia->tabDocChecker->textOverflow->isChecked();
Prefs.checkerSettings.checkPictures = dia->tabDocChecker->missingPictures->isChecked();
Prefs.checkerSettings.checkResolution = dia->tabDocChecker->pictResolution->isChecked();
Prefs.checkerSettings.checkTransparency = dia->tabDocChecker->tranparentObjects->isChecked();
Prefs.checkerSettings.minResolution = dia->tabDocChecker->resolutionValue->value();
Prefs.checkerProfiles = dia->tabDocChecker->checkerProfile;
Prefs.curCheckProfile = dia->tabDocChecker->curCheckProfile->currentText();
Prefs.typographicSetttings.valueSuperScript = dia->tabTypo->superDisplacement->value();
Prefs.typographicSetttings.scalingSuperScript = dia->tabTypo->superScaling->value();
Prefs.typographicSetttings.valueSubScript = dia->tabTypo->subDisplacement->value();
7875,7 → 7870,6
}
}
 
 
void ScribusApp::ReadPrefs()
{
ScriXmlDoc *ss = new ScriXmlDoc();
7925,7 → 7919,6
}
}
 
 
void ScribusApp::ShowSubs()
{
QString mess;
8014,7 → 8007,7
void ScribusApp::SaveAsEps()
{
QString fna;
if ((doc->checkerSettings.autoCheck) && (!doc->checkerSettings.ignoreErrors))
if ((doc->checkerProfiles[doc->curCheckProfile].autoCheck) && (!doc->checkerProfiles[doc->curCheckProfile].ignoreErrors))
{
scanDocument();
if ((doc->docItemErrors.count() != 0) || (doc->masterItemErrors.count() != 0))
8090,7 → 8083,7
void ScribusApp::SaveAsPDF()
{
QString fn;
if ((doc->checkerSettings.autoCheck) && (!doc->checkerSettings.ignoreErrors))
if ((doc->checkerProfiles[doc->curCheckProfile].autoCheck) && (!doc->checkerProfiles[doc->curCheckProfile].ignoreErrors))
{
scanDocument();
if ((doc->docItemErrors.count() != 0) || (doc->masterItemErrors.count() != 0))
9997,6 → 9990,16
{
PageItem* it;
QString chx;
struct checkerPrefs checkerSettings;
checkerSettings.ignoreErrors = doc->checkerProfiles[doc->curCheckProfile].ignoreErrors;
checkerSettings.autoCheck = doc->checkerProfiles[doc->curCheckProfile].autoCheck;
checkerSettings.checkGlyphs = doc->checkerProfiles[doc->curCheckProfile].checkGlyphs;
checkerSettings.checkOrphans = doc->checkerProfiles[doc->curCheckProfile].checkOrphans;
checkerSettings.checkOverflow = doc->checkerProfiles[doc->curCheckProfile].checkOverflow;
checkerSettings.checkPictures = doc->checkerProfiles[doc->curCheckProfile].checkPictures;
checkerSettings.checkResolution = doc->checkerProfiles[doc->curCheckProfile].checkResolution;
checkerSettings.checkTransparency = doc->checkerProfiles[doc->curCheckProfile].checkTransparency;
checkerSettings.minResolution = doc->checkerProfiles[doc->curCheckProfile].minResolution;
doc->docItemErrors.clear();
doc->masterItemErrors.clear();
errorCodes itemError;
10004,24 → 10007,24
{
it = doc->MasterItems.at(d);
itemError.clear();
if (((it->TranspStroke != 0.0) || (it->TranspStroke != 0.0)) && (doc->checkerSettings.checkTransparency))
if (((it->TranspStroke != 0.0) || (it->TranspStroke != 0.0)) && (checkerSettings.checkTransparency))
itemError.insert(6, 0);
if ((it->OwnPage == -1) && (doc->checkerSettings.checkOrphans))
if ((it->OwnPage == -1) && (checkerSettings.checkOrphans))
itemError.insert(3, 0);
if (it->PType == 2)
{
if ((!it->PicAvail) && (doc->checkerSettings.checkPictures))
if ((!it->PicAvail) && (checkerSettings.checkPictures))
itemError.insert(4, 0);
else
{
if ((((72.0 / it->LocalScX) < doc->checkerSettings.minResolution) || ((72.0 / it->LocalScY) < doc->checkerSettings.minResolution))
&& (it->isRaster) && (doc->checkerSettings.checkResolution))
if ((((72.0 / it->LocalScX) < checkerSettings.minResolution) || ((72.0 / it->LocalScY) < checkerSettings.minResolution))
&& (it->isRaster) && (checkerSettings.checkResolution))
itemError.insert(5, 0);
}
}
if ((it->PType == 4) || (it->PType == 8))
{
if ((it->itemText.count() > it->MaxChars) && (doc->checkerSettings.checkOverflow))
if ((it->itemText.count() > it->MaxChars) && (checkerSettings.checkOverflow))
itemError.insert(2, 0);
for (uint e = 0; e < it->itemText.count(); ++e)
{
10039,12 → 10042,12
{
for (uint numco = 0x30; numco < 0x3A; ++numco)
{
if ((!(*doc->AllFonts)[it->itemText.at(e)->cfont]->CharWidth.contains(numco)) && (doc->checkerSettings.checkGlyphs))
if ((!(*doc->AllFonts)[it->itemText.at(e)->cfont]->CharWidth.contains(numco)) && (checkerSettings.checkGlyphs))
itemError.insert(1, 0);
}
continue;
}
if ((!(*doc->AllFonts)[it->itemText.at(e)->cfont]->CharWidth.contains(chr)) && (doc->checkerSettings.checkGlyphs))
if ((!(*doc->AllFonts)[it->itemText.at(e)->cfont]->CharWidth.contains(chr)) && (checkerSettings.checkGlyphs))
itemError.insert(1, 0);
}
}
10055,24 → 10058,24
{
it = doc->Items.at(d);
itemError.clear();
if (((it->Transparency != 0.0) || (it->TranspStroke != 0.0)) && (doc->checkerSettings.checkTransparency))
if (((it->Transparency != 0.0) || (it->TranspStroke != 0.0)) && (checkerSettings.checkTransparency))
itemError.insert(6, 0);
if ((it->OwnPage == -1) && (doc->checkerSettings.checkOrphans))
if ((it->OwnPage == -1) && (checkerSettings.checkOrphans))
itemError.insert(3, 0);
if (it->PType == 2)
{
if ((!it->PicAvail) && (doc->checkerSettings.checkPictures))
if ((!it->PicAvail) && (checkerSettings.checkPictures))
itemError.insert(4, 0);
else
{
if ((((72.0 / it->LocalScX) < doc->checkerSettings.minResolution) || ((72.0 / it->LocalScY) < doc->checkerSettings.minResolution))
&& (it->isRaster) && (doc->checkerSettings.checkResolution))
if ((((72.0 / it->LocalScX) < checkerSettings.minResolution) || ((72.0 / it->LocalScY) < checkerSettings.minResolution))
&& (it->isRaster) && (checkerSettings.checkResolution))
itemError.insert(5, 0);
}
}
if ((it->PType == 4) || (it->PType == 8))
{
if ((it->itemText.count() > it->MaxChars) && (doc->checkerSettings.checkOverflow))
if ((it->itemText.count() > it->MaxChars) && (checkerSettings.checkOverflow))
itemError.insert(2, 0);
for (uint e = 0; e < it->itemText.count(); ++e)
{
10090,12 → 10093,12
{
for (uint numco = 0x30; numco < 0x3A; ++numco)
{
if ((!(*doc->AllFonts)[it->itemText.at(e)->cfont]->CharWidth.contains(numco)) && (doc->checkerSettings.checkGlyphs))
if ((!(*doc->AllFonts)[it->itemText.at(e)->cfont]->CharWidth.contains(numco)) && (checkerSettings.checkGlyphs))
itemError.insert(1, 0);
}
continue;
}
if ((!(*doc->AllFonts)[it->itemText.at(e)->cfont]->CharWidth.contains(chr)) && (doc->checkerSettings.checkGlyphs))
if ((!(*doc->AllFonts)[it->itemText.at(e)->cfont]->CharWidth.contains(chr)) && (checkerSettings.checkGlyphs))
itemError.insert(1, 0);
}
}
/branches/Version13x/Scribus/scribus/tabcheckdoc.cpp
8,44 → 8,46
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "scribusstructs.h"
#include <qcombobox.h>
 
TabCheckDoc::TabCheckDoc( QWidget* parent, struct checkerPrefs *prefsData ) : QWidget( parent, "tabcheckDoc", 0 )
TabCheckDoc::TabCheckDoc( QWidget* parent, QMap<QString, checkerPrefs> prefsData, QString prefProfile ) : QWidget( parent, "tabcheckDoc", 0 )
{
checkerProfile = prefsData;
TabCheckDocLayout = new QVBoxLayout( this, 10, 5, "TabCheckDocLayout");
TabCheckDocLayout->setAlignment( Qt::AlignTop );
curCheckProfile = new QComboBox( true, this, "Profiles" );
curCheckProfile->setEditable(false);
QMap<QString, checkerPrefs>::Iterator it;
for (it = checkerProfile.begin(); it != checkerProfile.end(); ++it)
{
curCheckProfile->insertItem(it.key());
}
curCheckProfile->setCurrentText(prefProfile);
TabCheckDocLayout->addWidget( curCheckProfile );
ignoreErrors = new QCheckBox( this, "ignoreErrors" );
ignoreErrors->setText( tr( "Ignore all Errors" ) );
ignoreErrors->setChecked(prefsData->ignoreErrors);
TabCheckDocLayout->addWidget( ignoreErrors );
automaticCheck = new QCheckBox( this, "automaticCheck" );
automaticCheck->setText( tr( "Automatic Check before Printing or Exporting" ) );
automaticCheck->setChecked(prefsData->autoCheck);
TabCheckDocLayout->addWidget( automaticCheck );
missingGlyphs = new QCheckBox( this, "missingGlyphs" );
missingGlyphs->setText( tr( "Check for missing Glyphs" ) );
missingGlyphs->setChecked(prefsData->checkGlyphs);
TabCheckDocLayout->addWidget( missingGlyphs );
checkOrphans = new QCheckBox( this, "checkOrphans" );
checkOrphans->setText( tr( "Check for Objects not on a Page" ) );
checkOrphans->setChecked(prefsData->checkOrphans);
TabCheckDocLayout->addWidget( checkOrphans );
textOverflow = new QCheckBox( this, "textOverflow" );
textOverflow->setText( tr( "Check for overflow in Textframes" ) );
textOverflow->setChecked(prefsData->checkOverflow);
TabCheckDocLayout->addWidget( textOverflow );
tranparentObjects = new QCheckBox( this, "tranparentObjects" );
tranparentObjects->setText( tr( "Check for Transparencys used" ) );
tranparentObjects->setChecked(prefsData->checkTransparency);
TabCheckDocLayout->addWidget( tranparentObjects );
missingPictures = new QCheckBox( this, "missingPictures" );
missingPictures->setText( tr( "Check for missing Images" ) );
missingPictures->setChecked(prefsData->checkPictures);
TabCheckDocLayout->addWidget( missingPictures );
pictResolution = new QGroupBox( this, "pictResolution" );
pictResolution->setTitle( tr( "Check Image Resolution" ) );
pictResolution->setCheckable( true );
pictResolution->setChecked(prefsData->checkResolution);
pictResolution->setColumnLayout(0, Qt::Vertical );
pictResolution->layout()->setSpacing( 5 );
pictResolution->layout()->setMargin( 10 );
57,9 → 59,71
resolutionValue = new QSpinBox( pictResolution, "resolutionValue" );
resolutionValue->setMaxValue( 3600 );
resolutionValue->setMinValue( 10 );
resolutionValue->setValue( qRound(prefsData->minResolution) );
resolutionValue->setSuffix( tr( " dpi" ) );
pictResolutionLayout->addWidget( resolutionValue );
TabCheckDocLayout->addWidget( pictResolution );
ignoreErrors->setChecked(checkerProfile[prefProfile].ignoreErrors);
automaticCheck->setChecked(checkerProfile[prefProfile].autoCheck);
missingGlyphs->setChecked(checkerProfile[prefProfile].checkGlyphs);
checkOrphans->setChecked(checkerProfile[prefProfile].checkOrphans);
textOverflow->setChecked(checkerProfile[prefProfile].checkOverflow);
tranparentObjects->setChecked(checkerProfile[prefProfile].checkTransparency);
missingPictures->setChecked(checkerProfile[prefProfile].checkPictures);
pictResolution->setChecked(checkerProfile[prefProfile].checkResolution);
resolutionValue->setValue( qRound(checkerProfile[prefProfile].minResolution) );
currentProfile = prefProfile;
connect(curCheckProfile, SIGNAL(activated(const QString&)), this, SLOT(setProfile(const QString&)));
connect(ignoreErrors, SIGNAL(clicked()), this, SLOT(putProfile()));
connect(automaticCheck, SIGNAL(clicked()), this, SLOT(putProfile()));
connect(missingGlyphs, SIGNAL(clicked()), this, SLOT(putProfile()));
connect(checkOrphans, SIGNAL(clicked()), this, SLOT(putProfile()));
connect(missingPictures, SIGNAL(clicked()), this, SLOT(putProfile()));
connect(pictResolution, SIGNAL(toggled(bool)), this, SLOT(putProfile()));
connect(tranparentObjects, SIGNAL(clicked()), this, SLOT(putProfile()));
connect(resolutionValue, SIGNAL(valueChanged(int)), this, SLOT(putProfile()));
clearWState( WState_Polished );
}
 
void TabCheckDoc::putProfile()
{
checkerProfile[currentProfile].ignoreErrors = ignoreErrors->isChecked();
checkerProfile[currentProfile].autoCheck = automaticCheck->isChecked();
checkerProfile[currentProfile].checkGlyphs = missingGlyphs->isChecked();
checkerProfile[currentProfile].checkOrphans = checkOrphans->isChecked();
checkerProfile[currentProfile].checkOverflow = textOverflow->isChecked();
checkerProfile[currentProfile].checkPictures = missingPictures->isChecked();
checkerProfile[currentProfile].checkResolution = pictResolution->isChecked();
checkerProfile[currentProfile].checkTransparency = tranparentObjects->isChecked();
checkerProfile[currentProfile].minResolution = resolutionValue->value();
}
 
void TabCheckDoc::setProfile(const QString& name)
{
disconnect(ignoreErrors, SIGNAL(clicked()), this, SLOT(putProfile()));
disconnect(automaticCheck, SIGNAL(clicked()), this, SLOT(putProfile()));
disconnect(missingGlyphs, SIGNAL(clicked()), this, SLOT(putProfile()));
disconnect(checkOrphans, SIGNAL(clicked()), this, SLOT(putProfile()));
disconnect(missingPictures, SIGNAL(clicked()), this, SLOT(putProfile()));
disconnect(pictResolution, SIGNAL(toggled(bool)), this, SLOT(putProfile()));
disconnect(tranparentObjects, SIGNAL(clicked()), this, SLOT(putProfile()));
disconnect(resolutionValue, SIGNAL(valueChanged(int)), this, SLOT(putProfile()));
putProfile();
ignoreErrors->setChecked(checkerProfile[name].ignoreErrors);
automaticCheck->setChecked(checkerProfile[name].autoCheck);
missingGlyphs->setChecked(checkerProfile[name].checkGlyphs);
checkOrphans->setChecked(checkerProfile[name].checkOrphans);
textOverflow->setChecked(checkerProfile[name].checkOverflow);
tranparentObjects->setChecked(checkerProfile[name].checkTransparency);
missingPictures->setChecked(checkerProfile[name].checkPictures);
pictResolution->setChecked(checkerProfile[name].checkResolution);
resolutionValue->setValue( qRound(checkerProfile[name].minResolution) );
currentProfile = name;
connect(ignoreErrors, SIGNAL(clicked()), this, SLOT(putProfile()));
connect(automaticCheck, SIGNAL(clicked()), this, SLOT(putProfile()));
connect(missingGlyphs, SIGNAL(clicked()), this, SLOT(putProfile()));
connect(checkOrphans, SIGNAL(clicked()), this, SLOT(putProfile()));
connect(missingPictures, SIGNAL(clicked()), this, SLOT(putProfile()));
connect(pictResolution, SIGNAL(toggled(bool)), this, SLOT(putProfile()));
connect(tranparentObjects, SIGNAL(clicked()), this, SLOT(putProfile()));
connect(resolutionValue, SIGNAL(valueChanged(int)), this, SLOT(putProfile()));
}
/branches/Version13x/Scribus/scribus/tabcheckdoc.h
4,8 → 4,10
#include <qvariant.h>
#include <qwidget.h>
 
#include "scribusstructs.h"
class QVBoxLayout;
class QHBoxLayout;
class QComboBox;
class QCheckBox;
class QGroupBox;
class QLabel;
16,9 → 18,10
Q_OBJECT
 
public:
TabCheckDoc( QWidget* parent, struct checkerPrefs *prefsData );
TabCheckDoc( QWidget* parent, QMap<QString, checkerPrefs> prefsData, QString prefProfile );
~TabCheckDoc() {};
 
QComboBox* curCheckProfile;
QCheckBox* ignoreErrors;
QCheckBox* automaticCheck;
QCheckBox* missingGlyphs;
29,7 → 32,13
QGroupBox* pictResolution;
QLabel* textLabel1;
QSpinBox* resolutionValue;
QMap<QString, checkerPrefs> checkerProfile;
QString currentProfile;
 
public slots:
void putProfile();
void setProfile(const QString& name);
 
protected:
QVBoxLayout* TabCheckDocLayout;
QHBoxLayout* pictResolutionLayout;
/branches/Version13x/Scribus/scribus/checkDocument.h
11,7 → 11,8
class QSpacerItem;
class QListView;
class QListViewItem;
class QPushButton;
class QComboBox;
class QLabel;
class ScribusDoc;
 
class CheckDocument : public QDialog
25,15 → 26,15
void buildErrorList(ScribusDoc *doc);
void closeEvent(QCloseEvent *ce);
 
QComboBox* curCheckProfile;
QLabel* textLabel1;
QListView* reportDisplay;
QPushButton* okButton;
QPushButton* newCheck;
QMap<QListViewItem*, int> itemMap;
QMap<QListViewItem*, int> pageMap;
 
public slots:
void slotSelect(QListViewItem* ite);
void newScan();
void newScan(const QString&);
 
signals:
void rescan();