r14971 by cbradney - Move verifier profile data to docprefsdata

scribus-commit scribus-commit at lists.scribus.net
Thu Apr 15 00:11:09 CEST 2010


Revision: 14971
Author: cbradney
Date: 2010-04-14T22:05:21.512818Z
Commit message: Move verifier profile data to docprefsdata

Changeset: 
M  /trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
M  /trunk/Scribus/scribus/ui/checkDocument.cpp
M  /trunk/Scribus/scribus/scribus.cpp
M  /trunk/Scribus/scribus/canvas.cpp
M  /trunk/Scribus/scribus/pageitem.cpp
M  /trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
M  /trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
M  /trunk/Scribus/scribus/ui/reformdoc.cpp
M  /trunk/Scribus/scribus/scribusdoc.cpp
M  /trunk/Scribus/scribus/documentchecker.cpp
M  /trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
M  /trunk/Scribus/scribus/scribusdoc.h
M  /trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp

Diffs:
Index: scribus/documentchecker.cpp
===================================================================
--- scribus/documentchecker.cpp	(revision 14970)
+++ scribus/documentchecker.cpp	(revision 14971)
@@ -41,25 +41,25 @@
 	PageItem* currItem;
 	QString chstr;
 	struct CheckerPrefs checkerSettings;
-	checkerSettings.ignoreErrors = currDoc->checkerProfiles[currDoc->curCheckProfile].ignoreErrors;
-	checkerSettings.autoCheck = currDoc->checkerProfiles[currDoc->curCheckProfile].autoCheck;
-	checkerSettings.checkGlyphs = currDoc->checkerProfiles[currDoc->curCheckProfile].checkGlyphs;
-	checkerSettings.checkOrphans = currDoc->checkerProfiles[currDoc->curCheckProfile].checkOrphans;
-	checkerSettings.checkOverflow = currDoc->checkerProfiles[currDoc->curCheckProfile].checkOverflow;
-	checkerSettings.checkPictures = currDoc->checkerProfiles[currDoc->curCheckProfile].checkPictures;
-	checkerSettings.checkResolution = currDoc->checkerProfiles[currDoc->curCheckProfile].checkResolution;
-	checkerSettings.checkTransparency = currDoc->checkerProfiles[currDoc->curCheckProfile].checkTransparency;
-	checkerSettings.minResolution = currDoc->checkerProfiles[currDoc->curCheckProfile].minResolution;
-	checkerSettings.maxResolution = currDoc->checkerProfiles[currDoc->curCheckProfile].maxResolution;
-	checkerSettings.checkAnnotations = currDoc->checkerProfiles[currDoc->curCheckProfile].checkAnnotations;
-	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;
-	checkerSettings.checkNotCMYKOrSpot = currDoc->checkerProfiles[currDoc->curCheckProfile].checkNotCMYKOrSpot;
-	checkerSettings.checkDeviceColorsAndOutputIntend = currDoc->checkerProfiles[currDoc->curCheckProfile].checkDeviceColorsAndOutputIntend;
-	checkerSettings.checkFontNotEmbedded = currDoc->checkerProfiles[currDoc->curCheckProfile].checkFontNotEmbedded;
-	checkerSettings.checkFontIsOpenType = currDoc->checkerProfiles[currDoc->curCheckProfile].checkFontIsOpenType;
+	checkerSettings.ignoreErrors = currDoc->checkerProfiles()[currDoc->curCheckProfile()].ignoreErrors;
+	checkerSettings.autoCheck = currDoc->checkerProfiles()[currDoc->curCheckProfile()].autoCheck;
+	checkerSettings.checkGlyphs = currDoc->checkerProfiles()[currDoc->curCheckProfile()].checkGlyphs;
+	checkerSettings.checkOrphans = currDoc->checkerProfiles()[currDoc->curCheckProfile()].checkOrphans;
+	checkerSettings.checkOverflow = currDoc->checkerProfiles()[currDoc->curCheckProfile()].checkOverflow;
+	checkerSettings.checkPictures = currDoc->checkerProfiles()[currDoc->curCheckProfile()].checkPictures;
+	checkerSettings.checkResolution = currDoc->checkerProfiles()[currDoc->curCheckProfile()].checkResolution;
+	checkerSettings.checkTransparency = currDoc->checkerProfiles()[currDoc->curCheckProfile()].checkTransparency;
+	checkerSettings.minResolution = currDoc->checkerProfiles()[currDoc->curCheckProfile()].minResolution;
+	checkerSettings.maxResolution = currDoc->checkerProfiles()[currDoc->curCheckProfile()].maxResolution;
+	checkerSettings.checkAnnotations = currDoc->checkerProfiles()[currDoc->curCheckProfile()].checkAnnotations;
+	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;
+	checkerSettings.checkNotCMYKOrSpot = currDoc->checkerProfiles()[currDoc->curCheckProfile()].checkNotCMYKOrSpot;
+	checkerSettings.checkDeviceColorsAndOutputIntend = currDoc->checkerProfiles()[currDoc->curCheckProfile()].checkDeviceColorsAndOutputIntend;
+	checkerSettings.checkFontNotEmbedded = currDoc->checkerProfiles()[currDoc->curCheckProfile()].checkFontNotEmbedded;
+	checkerSettings.checkFontIsOpenType = currDoc->checkerProfiles()[currDoc->curCheckProfile()].checkFontIsOpenType;
 	currDoc->docItemErrors.clear();
 	currDoc->masterItemErrors.clear();
 	currDoc->docLayerErrors.clear();
Index: scribus/scribusdoc.cpp
===================================================================
--- scribus/scribusdoc.cpp	(revision 14970)
+++ scribus/scribusdoc.cpp	(revision 14971)
@@ -213,8 +213,8 @@
 	//->Prefs guidesSettings(appPrefsData.guidesPrefs),
 	//->Prefs itemToolPrefs(appPrefsData.itemToolPrefs),
 	//->Prefs opToolPrefs(appPrefsData.opToolPrefs),
-	checkerProfiles(appPrefsData.verifierPrefs.checkerPrefsList),
-	curCheckProfile(appPrefsData.verifierPrefs.curCheckProfile),
+	//->Prefs checkerProfiles(appPrefsData.verifierPrefs.checkerPrefsList),
+	//->Prefs curCheckProfile(appPrefsData.verifierPrefs.curCheckProfile),
 	LastAuto(0), FirstAuto(0),
 	DraggedElem(0),
 	ElemToLink(0),
@@ -222,7 +222,7 @@
 	docParagraphStyles(),
 	docCharStyles(),
 	Layers(),
-	marginColored(appPrefsData.displayPrefs.marginColored),
+	//->Prefs marginColored(appPrefsData.displayPrefs.marginColored),
 	GroupCounter(1),
 	colorEngine(ScCore->defaultEngine),
 	JavaScripts(),
@@ -330,8 +330,8 @@
 	//->Prefs guidesSettings(appPrefsData.guidesPrefs),
 	//->Prefs itemToolPrefs(appPrefsData.itemToolPrefs),
 	//->Prefs opToolPrefs(appPrefsData.opToolPrefs),
-	checkerProfiles(appPrefsData.verifierPrefs.checkerPrefsList),
-	curCheckProfile(appPrefsData.verifierPrefs.curCheckProfile),
+	//->Prefs checkerProfiles(appPrefsData.verifierPrefs.checkerPrefsList),
+	//->Prefs curCheckProfile(appPrefsData.verifierPrefs.curCheckProfile),
 	LastAuto(0), FirstAuto(0),
 	DraggedElem(0),
 	ElemToLink(0),
@@ -339,7 +339,7 @@
 	docParagraphStyles(),
 	docCharStyles(),
 	Layers(),
-	marginColored(appPrefsData.displayPrefs.marginColored),
+	//->Prefs marginColored(appPrefsData.displayPrefs.marginColored),
 	GroupCounter(1),
 	colorEngine(ScCore->defaultEngine),
 	JavaScripts(),
Index: scribus/canvas.cpp
===================================================================
--- scribus/canvas.cpp	(revision 14970)
+++ scribus/canvas.cpp	(revision 14971)
@@ -2029,7 +2029,7 @@
 	if (m_doc->guidesPrefs().marginsShown)
 	{
 		p->setPen(m_doc->guidesPrefs().marginColor);
-		if (m_doc->marginColored)
+		if (m_doc->marginColored())
 		{
 			p->setFillMode(ScPainter::Solid);
 			p->setBrush(m_doc->guidesPrefs().marginColor);
Index: scribus/pageitem.cpp
===================================================================
--- scribus/pageitem.cpp	(revision 14970)
+++ scribus/pageitem.cpp	(revision 14971)
@@ -1655,9 +1655,9 @@
 		}
 		if (itemType()==ImageFrame)
 		{
-			double minres = m_Doc->checkerProfiles[m_Doc->curCheckProfile].minResolution;
-			double maxres = m_Doc->checkerProfiles[m_Doc->curCheckProfile].maxResolution;
-			bool checkres = m_Doc->checkerProfiles[m_Doc->curCheckProfile].checkResolution;
+			double minres = m_Doc->checkerProfiles()[m_Doc->curCheckProfile()].minResolution;
+			double maxres = m_Doc->checkerProfiles()[m_Doc->curCheckProfile()].maxResolution;
+			bool checkres = m_Doc->checkerProfiles()[m_Doc->curCheckProfile()].checkResolution;
 			if  ((((72.0 / imageXScale()) < minres) 
 				|| ((72.0 / imageYScale()) < minres) 
 				|| ((72.0 / imageXScale()) > maxres) 
Index: scribus/scribusdoc.h
===================================================================
--- scribus/scribusdoc.h	(revision 14970)
+++ scribus/scribusdoc.h	(revision 14971)
@@ -183,9 +183,16 @@
 	void setArrowStyles(QList<ArrowDesc>& as) { docPrefsData.arrowStyles=as; }
 	QList<ArrowDesc>& arrowStyles() { return docPrefsData.arrowStyles; }
 	void appendToArrowStyles(const struct ArrowDesc& as) { docPrefsData.arrowStyles.append(as); }
+	const bool marginColored() const { return docPrefsData.displayPrefs.marginColored; }
+	void setMarginColored(bool b) { docPrefsData.displayPrefs.marginColored=b; }
+	//->Prefs QMap<QString, CheckerPrefs> checkerProfiles;
+	QMap<QString, CheckerPrefs>& checkerProfiles() { return docPrefsData.verifierPrefs.checkerPrefsList; }
+	void setCheckerProfiles(const QMap<QString, CheckerPrefs>& cl) { docPrefsData.verifierPrefs.checkerPrefsList=cl; }
+	void set1CheckerProfile(const QString profileName, const struct CheckerPrefs& cs) { docPrefsData.verifierPrefs.checkerPrefsList[profileName] = cs; }
+	void clearCheckerProfiles() { docPrefsData.verifierPrefs.checkerPrefsList.clear(); }
+	const QString& curCheckProfile() const { return docPrefsData.verifierPrefs.curCheckProfile; }
+	void setCurCheckProfile(const QString& s) { docPrefsData.verifierPrefs.curCheckProfile=s; }
 
-
-
 	TypoPrefs& typographicPrefs() { return docPrefsData.typoPrefs; }
 	GuidesPrefs& guidesPrefs() { return docPrefsData.guidesPrefs; }
 	ItemToolPrefs& itemToolPrefs() { return docPrefsData.itemToolPrefs; }
@@ -1073,8 +1080,8 @@
 	//->Prefs ItemToolPrefs itemToolPrefs;
 	//->Prefs OperatorToolPrefs opToolPrefs;
 
-	QMap<QString, CheckerPrefs> checkerProfiles;
-	QString curCheckProfile;
+	//->Prefs QMap<QString, CheckerPrefs> checkerProfiles;
+	//->Prefs QString curCheckProfile;
 	/** \brief Letztes Element fuer AutoTextrahmen */
 	PageItem *LastAuto;
 	/** \brief Erstes Element fuer AutoTextrahmen */
@@ -1089,7 +1096,7 @@
 	StyleSet<CharStyle> docCharStyles;
 public:
 	ScLayers Layers;
-	bool marginColored;
+	//bool marginColored;
 	int GroupCounter;
 	CMSData CMSSettings;
 
Index: scribus/ui/checkDocument.cpp
===================================================================
--- scribus/ui/checkDocument.cpp	(revision 14970)
+++ scribus/ui/checkDocument.cpp	(revision 14971)
@@ -237,7 +237,7 @@
 	clearErrorList();
 	if (m_Doc==0)
 		return;
-	m_Doc->curCheckProfile = name;
+	m_Doc->setCurCheckProfile(name);
 	DocumentChecker::checkDocument(m_Doc);
 	buildErrorList(m_Doc);
 }
@@ -368,14 +368,14 @@
 	if (m_Doc==0)
 		return;
 
-	minResDPI = qRound(doc->checkerProfiles[doc->curCheckProfile].minResolution);
-	maxResDPI = qRound(doc->checkerProfiles[doc->curCheckProfile].maxResolution);
+	minResDPI = qRound(doc->checkerProfiles()[doc->curCheckProfile()].minResolution);
+	maxResDPI = qRound(doc->checkerProfiles()[doc->curCheckProfile()].maxResolution);
 	
 	CheckerPrefsList::Iterator it;
-	CheckerPrefsList::Iterator itend=doc->checkerProfiles.end();
-	for (it = doc->checkerProfiles.begin(); it != itend ; ++it)
+	CheckerPrefsList::Iterator itend=doc->checkerProfiles().end();
+	for (it = doc->checkerProfiles().begin(); it != itend ; ++it)
 		curCheckProfile->addItem(it.key());
-	setCurrentComboItem(curCheckProfile, doc->curCheckProfile);
+	setCurrentComboItem(curCheckProfile, doc->curCheckProfile());
 
 	if ((doc->docItemErrors.count() == 0)
 		 && (doc->masterItemErrors.count() == 0)
Index: scribus/ui/reformdoc.cpp
===================================================================
--- scribus/ui/reformdoc.cpp	(revision 14970)
+++ scribus/ui/reformdoc.cpp	(revision 14971)
@@ -87,7 +87,7 @@
 	tabFonts = new FontPrefsTab(prefsWidgets, true, PrefsManager::instance()->preferencesLocation(), doc);
 	addItem( tr("Fonts"), loadIcon("font.png"), tabFonts);
 
-	tabDocChecker = new TabCheckDoc(prefsWidgets, doc->checkerProfiles, doc->curCheckProfile);
+	tabDocChecker = new TabCheckDoc(prefsWidgets, doc->checkerProfiles(), doc->curCheckProfile());
 	addItem( tr("Preflight Verifier"), loadIcon("checkdoc.png"), tabDocChecker);
 
 	tabPDF = new TabPDFOptions( prefsWidgets, doc->pdfOptions(), PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts,
@@ -145,13 +145,13 @@
 	tabView->gapHorizontal->setValue(currDoc->pageGapHorizontal()); // * unitRatio);
 	tabView->gapVertical->setValue(currDoc->pageGapVertical()); // * unitRatio);
 	tabView->setPaperColor(currDoc->paperColor());
-	tabView->setMarginColored(currDoc->marginColored);
+	tabView->setMarginColored(currDoc->marginColored());
 	tabHyphenator->restoreDefaults(currDoc);
 	tabGuides->restoreDefaults(&currDoc->guidesPrefs(), &currDoc->typographicPrefs(), docUnitIndex);
 	tabTypo->restoreDefaults(&currDoc->typographicPrefs());
 	tabTools->restoreDefaults(&currDoc->itemToolPrefs(), &currDoc->opToolPrefs(), docUnitIndex);
 	tabFonts->restoreDefaults();
-	tabDocChecker->restoreDefaults(&currDoc->checkerProfiles, currDoc->curCheckProfile);
+	tabDocChecker->restoreDefaults(&currDoc->checkerProfiles(), currDoc->curCheckProfile());
 	tabPDF->restoreDefaults(currDoc->pdfOptions(), PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts,
 							ScCore->PDFXProfiles, currDoc->UsedFonts, currDoc->pdfOptions().PresentVals,
 							docUnitIndex, currDoc->pageHeight, currDoc->pageWidth, currDoc, false);
@@ -308,7 +308,7 @@
 		item->setRedrawBounding();
 	}
 	currDoc->guidesPrefs().guidePlacement = tabGuides->inBackground->isChecked();
-	currDoc->marginColored = tabView->checkUnprintable->isChecked();
+	currDoc->setMarginColored(tabView->checkUnprintable->isChecked());
 	currDoc->setPaperColor(tabView->colorPaper);
 	currDoc->guidesPrefs().marginsShown = tabGuides->marginBox->isChecked();
 	currDoc->guidesPrefs().showBleed = tabView->checkBleed->isChecked();
@@ -330,8 +330,8 @@
 	currDoc->guidesPrefs().marginColor = tabGuides->colorMargin;
 	currDoc->guidesPrefs().guideColor = tabGuides->colorGuides;
 	currDoc->guidesPrefs().baselineGridColor = tabGuides->colorBaselineGrid;
-	currDoc->checkerProfiles = tabDocChecker->checkerProfile;
-	currDoc->curCheckProfile = tabDocChecker->curCheckProfile->currentText();
+	currDoc->setCheckerProfiles(tabDocChecker->checkerProfile);
+	currDoc->setCurCheckProfile(tabDocChecker->curCheckProfile->currentText());
 	currDoc->typographicPrefs().valueSuperScript = tabTypo->superDisplacement->value();
 	currDoc->typographicPrefs().scalingSuperScript = tabTypo->superScaling->value();
 	currDoc->typographicPrefs().valueSubScript = tabTypo->subDisplacement->value();
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp	(revision 14970)
+++ scribus/scribus.cpp	(revision 14971)
@@ -3709,10 +3709,10 @@
 		mainWindowStatusLabel->setText("");
 		mainWindowProgressBar->reset();
 		HaveDoc++;
-		if (doc->checkerProfiles.count() == 0)
+		if (doc->checkerProfiles().count() == 0)
 		{
-			prefsManager->initDefaultCheckerPrefs(&doc->checkerProfiles);
-			doc->curCheckProfile = CommonStrings::PostScript;
+			prefsManager->initDefaultCheckerPrefs(&(doc->checkerProfiles()));
+			doc->setCurCheckProfile(CommonStrings::PostScript);
 		}
 		if (doc->pdfOptions().LPISettings.count() == 0)
 		{
@@ -4563,11 +4563,11 @@
 
 void ScribusMainWindow::slotFilePrint()
 {
-	if (doc->checkerProfiles[doc->curCheckProfile].autoCheck)
+	if (doc->checkerProfiles()[doc->curCheckProfile()].autoCheck)
 	{
 		if (scanDocument())
 		{
-			if (doc->checkerProfiles[doc->curCheckProfile].ignoreErrors)
+			if (doc->checkerProfiles()[doc->curCheckProfile()].ignoreErrors)
 			{
 				int t = QMessageBox::warning(this, CommonStrings::trWarning,
 											"<qt>"+ tr("Scribus has detected some errors. Consider using the Preflight Verifier to correct them")+"</qt>",
@@ -7784,11 +7784,11 @@
 
 void ScribusMainWindow::printPreview()
 {
-	if (doc->checkerProfiles[doc->curCheckProfile].autoCheck)
+	if (doc->checkerProfiles()[doc->curCheckProfile()].autoCheck)
 	{
 		if (scanDocument())
 		{
-			if (doc->checkerProfiles[doc->curCheckProfile].ignoreErrors)
+			if (doc->checkerProfiles()[doc->curCheckProfile()].ignoreErrors)
 			{
 				int t = QMessageBox::warning(this, CommonStrings::trWarning,
 											"<qt>"+ tr("Scribus has detected some errors. Consider using the Preflight Verifier to correct them")+"</qt>",
@@ -7868,11 +7868,11 @@
 
 void ScribusMainWindow::SaveAsEps()
 {
-	if (doc->checkerProfiles[doc->curCheckProfile].autoCheck)
+	if (doc->checkerProfiles()[doc->curCheckProfile()].autoCheck)
 	{
 		if (scanDocument())
 		{
-			if (doc->checkerProfiles[doc->curCheckProfile].ignoreErrors)
+			if (doc->checkerProfiles()[doc->curCheckProfile()].ignoreErrors)
 			{
 				int t = QMessageBox::warning(this, CommonStrings::trWarning,
 											tr("Scribus detected some errors.\nConsider using the Preflight Verifier  to correct them."),
@@ -7965,11 +7965,11 @@
 
 void ScribusMainWindow::SaveAsPDF()
 {
-	if (doc->checkerProfiles[doc->curCheckProfile].autoCheck)
+	if (doc->checkerProfiles()[doc->curCheckProfile()].autoCheck)
 	{
 		if (scanDocument())
 		{
-			if (doc->checkerProfiles[doc->curCheckProfile].ignoreErrors)
+			if (doc->checkerProfiles()[doc->curCheckProfile()].ignoreErrors)
 			{
 				int t = QMessageBox::warning(this, CommonStrings::trWarning,
 											tr("Detected some errors.\nConsider using the Preflight Verifier to correct them"),
Index: scribus/plugins/fileloader/scribus13format/scribus13format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus13format/scribus13format.cpp	(revision 14970)
+++ scribus/plugins/fileloader/scribus13format/scribus13format.cpp	(revision 14971)
@@ -431,14 +431,14 @@
 			m_Doc->guidesPrefs().guideColor = QColor(dc.attribute("GuideC"));
 		if (dc.hasAttribute("BaseC"))
 			m_Doc->guidesPrefs().baselineGridColor = QColor(dc.attribute("BaseC"));
-		m_Doc->marginColored = static_cast<bool>(dc.attribute("RANDF", "0").toInt());
+		m_Doc->setMarginColored(static_cast<bool>(dc.attribute("RANDF", "0").toInt()));
 		m_Doc->guidesPrefs().guidePlacement = static_cast<bool>(dc.attribute("BACKG", "1").toInt());
 		m_Doc->guidesPrefs().guideRad = ScCLocale::toDoubleC(dc.attribute("GuideRad"), 10.0);
 		m_Doc->guidesPrefs().grabRadius  = dc.attribute("GRAB", "4").toInt();
 		if (dc.hasAttribute("currentProfile"))
 		{
-			m_Doc->checkerProfiles.clear();
-			m_Doc->curCheckProfile = dc.attribute("currentProfile");
+			m_Doc->clearCheckerProfiles();
+			m_Doc->setCurCheckProfile(dc.attribute("currentProfile"));
 		}
 		m_Doc->LastAuto = 0;
 		QDomNode PAGE=DOC.firstChild();
@@ -503,7 +503,7 @@
 				checkerSettings.checkRasterPDF = static_cast<bool>(pg.attribute("checkRasterPDF", "1").toInt());
 				checkerSettings.checkForGIF = static_cast<bool>(pg.attribute("checkForGIF", "1").toInt());
 				checkerSettings.ignoreOffLayers = false;
-				m_Doc->checkerProfiles[pg.attribute("Name")] = checkerSettings;
+				m_Doc->set1CheckerProfile(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")!=CommonStrings::None)
@@ -1328,11 +1328,11 @@
 	dc.setAttribute("BACKG", static_cast<int>(m_Doc->guidesPrefs().guidePlacement));
 	dc.setAttribute("PAGEC",m_Doc->paperColor().name());
 	dc.setAttribute("MARGC",m_Doc->guidesPrefs().marginColor.name());
-	dc.setAttribute("RANDF", static_cast<int>(m_Doc->marginColored));
-	dc.setAttribute("currentProfile", m_Doc->curCheckProfile);
+	dc.setAttribute("RANDF", static_cast<int>(m_Doc->marginColored()));
+	dc.setAttribute("currentProfile", m_Doc->curCheckProfile());
 	CheckerPrefsList::Iterator itcp;
-	CheckerPrefsList::Iterator itcpend=m_Doc->checkerProfiles.end();
-	for (itcp = m_Doc->checkerProfiles.begin(); itcp != itcpend; ++itcp)
+	CheckerPrefsList::Iterator itcpend=m_Doc->checkerProfiles().end();
+	for (itcp = m_Doc->checkerProfiles().begin(); itcp != itcpend; ++itcp)
 	{
 		QDomElement dc79a=docu.createElement("CheckProfile");
 		dc79a.setAttribute("Name",itcp.key());
Index: scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
===================================================================
--- scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	(revision 14970)
+++ scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	(revision 14971)
@@ -233,8 +233,8 @@
 	docu.writeAttribute("BACKG", static_cast<int>(m_Doc->guidesPrefs().guidePlacement));
 	docu.writeAttribute("PAGEC",m_Doc->paperColor().name());
 	docu.writeAttribute("MARGC",m_Doc->guidesPrefs().marginColor.name());
-	docu.writeAttribute("RANDF", static_cast<int>(m_Doc->marginColored));
-	docu.writeAttribute("currentProfile", m_Doc->curCheckProfile);
+	docu.writeAttribute("RANDF", static_cast<int>(m_Doc->marginColored()));
+	docu.writeAttribute("currentProfile", m_Doc->curCheckProfile());
 
 	writeCheckerProfiles(docu);
 	writeLinestyles(docu);
@@ -285,8 +285,8 @@
 void Scribus150Format::writeCheckerProfiles(ScXmlStreamWriter & docu) 
 {
 	CheckerPrefsList::Iterator itcp;
-	CheckerPrefsList::Iterator itcpend=m_Doc->checkerProfiles.end();
-	for (itcp = m_Doc->checkerProfiles.begin(); itcp != itcpend; ++itcp)
+	CheckerPrefsList::Iterator itcpend=m_Doc->checkerProfiles().end();
+	for (itcp = m_Doc->checkerProfiles().begin(); itcp != itcpend; ++itcp)
 	{
 		docu.writeEmptyElement("CheckProfile");
 		docu.writeAttribute("Name",itcp.key());
Index: scribus/plugins/fileloader/scribus150format/scribus150format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(revision 14970)
+++ scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(revision 14971)
@@ -279,8 +279,8 @@
 			}
 			if (attrs.hasAttribute("currentProfile"))
 			{
-				m_Doc->checkerProfiles.clear();
-				m_Doc->curCheckProfile = attrs.valueAsString("currentProfile");
+				m_Doc->clearCheckerProfiles();
+				m_Doc->setCurCheckProfile(attrs.valueAsString("currentProfile"));
 			}
 		}
 		if (tagName == "CheckProfile")
@@ -788,7 +788,7 @@
 		m_Doc->setPaperColor(QColor(attrs.valueAsString("PAGEC")));
 		//->Prefs m_Doc->papColor = QColor(attrs.valueAsString("PAGEC"));
 	
-	m_Doc->marginColored = attrs.valueAsBool("RANDF", false);
+	m_Doc->setMarginColored(attrs.valueAsBool("RANDF", false));
 
 	readCMSSettings(doc, attrs);
 	readDocumentInfo(doc, attrs);
@@ -1012,7 +1012,7 @@
 	checkerSettings.checkRasterPDF    = attrs.valueAsBool("checkRasterPDF", true);
 	checkerSettings.checkForGIF       = attrs.valueAsBool("checkForGIF", true);
 	checkerSettings.ignoreOffLayers   = attrs.valueAsBool("ignoreOffLayers", false);
-	doc->checkerProfiles[profileName] = checkerSettings;
+	doc->set1CheckerProfile(profileName, checkerSettings);
 	return true;
 }
 
Index: scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp	(revision 14970)
+++ scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp	(revision 14971)
@@ -230,8 +230,8 @@
 	docu.writeAttribute("BACKG", static_cast<int>(m_Doc->guidesPrefs().guidePlacement));
 	docu.writeAttribute("PAGEC",m_Doc->paperColor().name());
 	docu.writeAttribute("MARGC",m_Doc->guidesPrefs().marginColor.name());
-	docu.writeAttribute("RANDF", static_cast<int>(m_Doc->marginColored));
-	docu.writeAttribute("currentProfile", m_Doc->curCheckProfile);
+	docu.writeAttribute("RANDF", static_cast<int>(m_Doc->marginColored()));
+	docu.writeAttribute("currentProfile", m_Doc->curCheckProfile());
 
 	writeCheckerProfiles(docu);
 	writeLinestyles(docu);
@@ -281,8 +281,8 @@
 void Scribus134Format::writeCheckerProfiles(ScXmlStreamWriter & docu) 
 {
 	CheckerPrefsList::Iterator itcp;
-	CheckerPrefsList::Iterator itcpend=m_Doc->checkerProfiles.end();
-	for (itcp = m_Doc->checkerProfiles.begin(); itcp != itcpend; ++itcp)
+	CheckerPrefsList::Iterator itcpend=m_Doc->checkerProfiles().end();
+	for (itcp = m_Doc->checkerProfiles().begin(); itcp != itcpend; ++itcp)
 	{
 		docu.writeEmptyElement("CheckProfile");
 		docu.writeAttribute("Name",itcp.key());
Index: scribus/plugins/fileloader/scribus134format/scribus134format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(revision 14970)
+++ scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(revision 14971)
@@ -279,8 +279,8 @@
 			}
 			if (attrs.hasAttribute("currentProfile"))
 			{
-				m_Doc->checkerProfiles.clear();
-				m_Doc->curCheckProfile = attrs.valueAsString("currentProfile");
+				m_Doc->clearCheckerProfiles();
+				m_Doc->setCurCheckProfile(attrs.valueAsString("currentProfile"));
 			}
 		}
 		if (tagName == "CheckProfile")
@@ -783,7 +783,7 @@
 	if (attrs.hasAttribute("PAGEC"))
 		m_Doc->setPaperColor(QColor(attrs.valueAsString("PAGEC")));
 	
-	m_Doc->marginColored = attrs.valueAsBool("RANDF", false);
+	m_Doc->setMarginColored(attrs.valueAsBool("RANDF", false));
 
 	readCMSSettings(doc, attrs);
 	readDocumentInfo(doc, attrs);
@@ -1008,7 +1008,7 @@
 	checkerSettings.checkForGIF       = attrs.valueAsBool("checkForGIF", true);
 	checkerSettings.ignoreOffLayers   = attrs.valueAsBool("ignoreOffLayers", false);
 	checkerSettings.checkOffConflictLayers = attrs.valueAsBool("checkOffConflictLayers", false);
-	doc->checkerProfiles[profileName] = checkerSettings;
+	doc->set1CheckerProfile(profileName, checkerSettings);
 	return true;
 }
 




More information about the scribus-commit mailing list