r15001 by cbradney - Move CMSSettings into docprefsdata

scribus-commit scribus-commit at lists.scribus.net
Fri Apr 23 00:11:31 CEST 2010


Revision: 15001
Author: cbradney
Date: 2010-04-22T22:01:05.990711Z
Commit message: Move CMSSettings into docprefsdata

Changeset: 
M  /trunk/Scribus/scribus/ui/propertiespalette.cpp
M  /trunk/Scribus/scribus/ui/tabpdfoptions.cpp
M  /trunk/Scribus/scribus/ui/adjustcmsdialog.cpp
M  /trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
M  /trunk/Scribus/scribus/ui/reformdoc.cpp
M  /trunk/Scribus/scribus/ui/cmsprefs.cpp
M  /trunk/Scribus/scribus/scribusdoc.cpp
M  /trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
M  /trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
M  /trunk/Scribus/scribus/scribusdoc.h
M  /trunk/Scribus/scribus/scribusview.cpp
M  /trunk/Scribus/scribus/pdflib_core.cpp
M  /trunk/Scribus/scribus/scimage.cpp
M  /trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
M  /trunk/Scribus/scribus/scribus.cpp
M  /trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
M  /trunk/Scribus/scribus/cmsettings.cpp
M  /trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
M  /trunk/Scribus/scribus/ui/prefs_pdfexport.cpp

Diffs:
Index: scribus/pdflib_core.cpp
===================================================================
--- scribus/pdflib_core.cpp	(revision 15000)
+++ scribus/pdflib_core.cpp	(revision 15001)
@@ -8872,8 +8872,8 @@
 								profilePath = ScCore->InputProfilesCMYK[Profil];
 							else
 							{
-								profilePath = ScCore->InputProfilesCMYK[c->doc()->CMSSettings.DefaultImageCMYKProfile];
-								profInUse = c->doc()->CMSSettings.DefaultImageCMYKProfile;
+								profilePath = ScCore->InputProfilesCMYK[c->doc()->cmsSettings().DefaultImageCMYKProfile];
+								profInUse = c->doc()->cmsSettings().DefaultImageCMYKProfile;
 							}
 							loadRawBytes(profilePath, dataP);
 							components = 4;
@@ -8890,8 +8890,8 @@
 								profilePath = ScCore->InputProfiles[Profil];
 							else
 							{
-								profilePath = ScCore->InputProfiles[c->doc()->CMSSettings.DefaultImageRGBProfile];
-								profInUse = c->doc()->CMSSettings.DefaultImageRGBProfile;
+								profilePath = ScCore->InputProfiles[c->doc()->cmsSettings().DefaultImageRGBProfile];
+								profInUse = c->doc()->cmsSettings().DefaultImageRGBProfile;
 							}
 							loadRawBytes(profilePath, dataP);
 							components = 3;
@@ -8934,7 +8934,7 @@
 					{
 						if ((img.imgInfo.colorspace == ColorSpaceGray) && (hasColorEffect))
 						{
-							profInUse = c->doc()->CMSSettings.DefaultImageRGBProfile;
+							profInUse = c->doc()->cmsSettings().DefaultImageRGBProfile;
 							if (!ICCProfiles.contains(profInUse))
 							{
 								int components = 3;
@@ -8942,7 +8942,7 @@
 								StartObj(embeddedProfile);
 								QByteArray dataP;
 								struct ICCD dataD;
-								loadRawBytes(ScCore->InputProfiles[c->doc()->CMSSettings.DefaultImageRGBProfile], dataP);
+								loadRawBytes(ScCore->InputProfiles[c->doc()->cmsSettings().DefaultImageRGBProfile], dataP);
 								components = 3;
 								PutDoc("<<\n");
 								if ((Options.CompressMethod != PDFOptions::Compression_None) && Options.Compress)
Index: scribus/scribusdoc.cpp
===================================================================
--- scribus/scribusdoc.cpp	(revision 15000)
+++ scribus/scribusdoc.cpp	(revision 15001)
@@ -404,7 +404,7 @@
 	Q_CHECK_PTR(autoSaveTimer);
 
 	HasCMS = false;
-	CMSSettings.CMSinUse = false;
+	docPrefsData.colorPrefs.DCMSset.CMSinUse = false;
 
 	colorEngine = ScCore->defaultEngine;
 	SetDefaultCMSParams();
@@ -422,12 +422,12 @@
 	m_pagesChanged.connectObserver(m_docUpdater);
 
 	PrefsManager *prefsManager = PrefsManager::instance();
-	CMSSettings = prefsManager->appPrefs.colorPrefs.DCMSset;
-	pdfOptions().SolidProf = CMSSettings.DefaultSolidColorRGBProfile;
-	pdfOptions().ImageProf = CMSSettings.DefaultImageRGBProfile;
-	pdfOptions().PrintProf = CMSSettings.DefaultPrinterProfile;
-	pdfOptions().Intent = CMSSettings.DefaultIntentColors;
-	pdfOptions().Intent2 = CMSSettings.DefaultIntentImages;
+	docPrefsData.colorPrefs.DCMSset = prefsManager->appPrefs.colorPrefs.DCMSset;
+	docPrefsData.pdfPrefs.SolidProf = docPrefsData.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
+	docPrefsData.pdfPrefs.ImageProf = docPrefsData.colorPrefs.DCMSset.DefaultImageRGBProfile;
+	docPrefsData.pdfPrefs.PrintProf = docPrefsData.colorPrefs.DCMSset.DefaultPrinterProfile;
+	docPrefsData.pdfPrefs.Intent = docPrefsData.colorPrefs.DCMSset.DefaultIntentColors;
+	docPrefsData.pdfPrefs.Intent2 = docPrefsData.colorPrefs.DCMSset.DefaultIntentImages;
 
 	AddFont(appPrefsData.itemToolPrefs.textFont);//, prefsData.AvailFonts[prefsData.itemToolPrefs.textFont]->Font);
 	//FIXME: aren't we doing this now anyway with prefs struct copy?
@@ -659,23 +659,23 @@
 	PageColors.ensureBlackAndWhite();
 	PageColors.setDocument(this);
 
-	CMSSettings = prefsManager->appPrefs.colorPrefs.DCMSset;
-	pdfOptions().SolidProf = CMSSettings.DefaultSolidColorRGBProfile;
-	pdfOptions().ImageProf = CMSSettings.DefaultImageRGBProfile;
-	pdfOptions().PrintProf = CMSSettings.DefaultPrinterProfile;
-	pdfOptions().Intent = CMSSettings.DefaultIntentColors;
-	pdfOptions().Intent2 = CMSSettings.DefaultIntentImages;
-	BlackPoint   = CMSSettings.BlackPoint;
-	SoftProofing = CMSSettings.SoftProofOn;
-	Gamut        = CMSSettings.GamutCheck;
-	IntentColors = CMSSettings.DefaultIntentColors;
-	IntentImages = CMSSettings.DefaultIntentImages;
-	if (ScCore->haveCMS() && CMSSettings.CMSinUse)
+	docPrefsData.colorPrefs.DCMSset = prefsManager->appPrefs.colorPrefs.DCMSset;
+	docPrefsData.pdfPrefs.SolidProf = docPrefsData.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
+	docPrefsData.pdfPrefs.ImageProf = docPrefsData.colorPrefs.DCMSset.DefaultImageRGBProfile;
+	docPrefsData.pdfPrefs.PrintProf = docPrefsData.colorPrefs.DCMSset.DefaultPrinterProfile;
+	docPrefsData.pdfPrefs.Intent = docPrefsData.colorPrefs.DCMSset.DefaultIntentColors;
+	docPrefsData.pdfPrefs.Intent2 = docPrefsData.colorPrefs.DCMSset.DefaultIntentImages;
+	BlackPoint   = docPrefsData.colorPrefs.DCMSset.BlackPoint;
+	SoftProofing = docPrefsData.colorPrefs.DCMSset.SoftProofOn;
+	Gamut        = docPrefsData.colorPrefs.DCMSset.GamutCheck;
+	IntentColors = docPrefsData.colorPrefs.DCMSset.DefaultIntentColors;
+	IntentImages = docPrefsData.colorPrefs.DCMSset.DefaultIntentImages;
+	if (ScCore->haveCMS() && docPrefsData.colorPrefs.DCMSset.CMSinUse)
 	{
 		if (OpenCMSProfiles(ScCore->InputProfiles, ScCore->InputProfilesCMYK, ScCore->MonitorProfiles, ScCore->PrinterProfiles))
 		{
 			HasCMS = true;
-			pdfOptions().SComp = CMSSettings.ComponentsInput2;
+			pdfOptions().SComp = docPrefsData.colorPrefs.DCMSset.ComponentsInput2;
 		}
 		else
 		{
@@ -767,27 +767,27 @@
 
 	colorEngine = colorMgmtEngineFactory.createDefaultEngine();
 	ScColorMgmtStrategy colorStrategy;
-	colorStrategy.useBlackPointCompensation = CMSSettings.BlackPoint;
+	colorStrategy.useBlackPointCompensation = docPrefsData.colorPrefs.DCMSset.BlackPoint;
 	colorStrategy.useBlackPreservation      = false;
 	colorEngine.setStrategy(colorStrategy);
 
 	DocDisplayProf   = ScCore->monitorProfile;
-	DocInputRGBProf  = colorEngine.openProfileFromFile( InPo[CMSSettings.DefaultSolidColorRGBProfile] );
-	DocInputCMYKProf = colorEngine.openProfileFromFile( InPoCMYK[CMSSettings.DefaultSolidColorCMYKProfile] );
-	DocPrinterProf   = colorEngine.openProfileFromFile( PrPo[CMSSettings.DefaultPrinterProfile] );
-	DocInputImageRGBProf  = colorEngine.openProfileFromFile( InPo[CMSSettings.DefaultImageRGBProfile] );
-	DocInputImageCMYKProf = colorEngine.openProfileFromFile( InPoCMYK[CMSSettings.DefaultImageCMYKProfile] );
+	DocInputRGBProf  = colorEngine.openProfileFromFile( InPo[docPrefsData.colorPrefs.DCMSset.DefaultSolidColorRGBProfile] );
+	DocInputCMYKProf = colorEngine.openProfileFromFile( InPoCMYK[docPrefsData.colorPrefs.DCMSset.DefaultSolidColorCMYKProfile] );
+	DocPrinterProf   = colorEngine.openProfileFromFile( PrPo[docPrefsData.colorPrefs.DCMSset.DefaultPrinterProfile] );
+	DocInputImageRGBProf  = colorEngine.openProfileFromFile( InPo[docPrefsData.colorPrefs.DCMSset.DefaultImageRGBProfile] );
+	DocInputImageCMYKProf = colorEngine.openProfileFromFile( InPoCMYK[docPrefsData.colorPrefs.DCMSset.DefaultImageCMYKProfile] );
 	if ((!DocDisplayProf) || (!DocInputRGBProf) || (!DocInputCMYKProf) || (!DocPrinterProf) || (!DocInputImageCMYKProf) || (!DocInputImageRGBProf))
 	{
-		CMSSettings.CMSinUse = false;
+		docPrefsData.colorPrefs.DCMSset.CMSinUse = false;
 		return false;
 	}
 
 	int dcmsFlags   = 0;
 	int dcmsFlagsGC = 0;
-	if (CMSSettings.GamutCheck)
+	if (docPrefsData.colorPrefs.DCMSset.GamutCheck)
 		dcmsFlagsGC |= Ctf_GamutCheck;
-	if (CMSSettings.BlackPoint)
+	if (docPrefsData.colorPrefs.DCMSset.BlackPoint)
 	{
 		dcmsFlags   |= Ctf_BlackPointCompensation;
 		dcmsFlagsGC |= Ctf_BlackPointCompensation;
@@ -819,13 +819,13 @@
 	ScColorProfile inputProfCMYK;
 	if (DocPrinterProf.colorSpace() == ColorSpace_Cmyk)
 	{
-		inputProf = (CMSSettings.SoftProofOn && CMSSettings.SoftProofFullOn) ? DocInputCMYKProf : DocPrinterProf;
+		inputProf = (docPrefsData.colorPrefs.DCMSset.SoftProofOn && docPrefsData.colorPrefs.DCMSset.SoftProofFullOn) ? DocInputCMYKProf : DocPrinterProf;
 		inputProfRGB  = DocInputRGBProf;
 		inputProfCMYK = inputProf;
 	}
 	else
 	{
-		inputProf = (CMSSettings.SoftProofOn && CMSSettings.SoftProofFullOn) ? DocInputRGBProf : DocPrinterProf;
+		inputProf = (docPrefsData.colorPrefs.DCMSset.SoftProofOn && docPrefsData.colorPrefs.DCMSset.SoftProofFullOn) ? DocInputRGBProf : DocPrinterProf;
 		inputProfRGB  = inputProf;
 		inputProfCMYK = DocInputCMYKProf;
 	}
@@ -849,23 +849,23 @@
 						Intent_Relative_Colorimetric, dcmsFlags | Ctf_GamutCheck);
 
 	if (DocInputRGBProf.colorSpace() == ColorSpace_Rgb)
-			CMSSettings.ComponentsInput2 = 3;
+			docPrefsData.colorPrefs.DCMSset.ComponentsInput2 = 3;
 	if (DocInputRGBProf.colorSpace() == ColorSpace_Cmyk)
-			CMSSettings.ComponentsInput2 = 4;
+			docPrefsData.colorPrefs.DCMSset.ComponentsInput2 = 4;
 	if (DocInputRGBProf.colorSpace() == ColorSpace_Cmy)
-			CMSSettings.ComponentsInput2 = 3;
+			docPrefsData.colorPrefs.DCMSset.ComponentsInput2 = 3;
 	if (DocInputCMYKProf.colorSpace() == ColorSpace_Rgb)
-			CMSSettings.ComponentsInput3 = 3;
+			docPrefsData.colorPrefs.DCMSset.ComponentsInput3 = 3;
 	if (DocInputCMYKProf.colorSpace() == ColorSpace_Cmyk)
-			CMSSettings.ComponentsInput3 = 4;
+			docPrefsData.colorPrefs.DCMSset.ComponentsInput3 = 4;
 	if (DocInputCMYKProf.colorSpace() == ColorSpace_Cmy)
-			CMSSettings.ComponentsInput3 = 3;
+			docPrefsData.colorPrefs.DCMSset.ComponentsInput3 = 3;
 	if (DocPrinterProf.colorSpace() == ColorSpace_Rgb)
-			CMSSettings.ComponentsPrinter = 3;
+			docPrefsData.colorPrefs.DCMSset.ComponentsPrinter = 3;
 	if (DocPrinterProf.colorSpace() == ColorSpace_Cmyk)
-			CMSSettings.ComponentsPrinter = 4;
+			docPrefsData.colorPrefs.DCMSset.ComponentsPrinter = 4;
 	if (DocPrinterProf.colorSpace() == ColorSpace_Cmy)
-			CMSSettings.ComponentsPrinter = 3;
+			docPrefsData.colorPrefs.DCMSset.ComponentsPrinter = 3;
 
 	bool success  = (stdTransRGBMon && stdTransCMYKMon && stdProofImg  && stdProofImgCMYK &&
 		             stdTransImg    && stdTransRGB     && stdTransCMYK && stdProof       &&
@@ -873,7 +873,7 @@
 	if (!success)
 	{
 		CloseCMSProfiles();
-		CMSSettings.CMSinUse = false;
+		docPrefsData.colorPrefs.DCMSset.CMSinUse = false;
 		QString message = tr("An error occurred while opening ICC profiles, color management is not enabled." );
 		if (ScCore->usingGUI())
 			QMessageBox::warning(m_ScMW, CommonStrings::trWarning, message, QMessageBox::Ok, 0, 0);
@@ -891,17 +891,17 @@
 	int cc = PageColors.count() + MasterItems.count() + DocItems.count();
 	m_ScMW->mainWindowProgressBar->setMaximum(cc);
 	qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
-	bool oldCM = CMSSettings.CMSinUse;
+	bool oldCM = docPrefsData.colorPrefs.DCMSset.CMSinUse;
 	bool newCM = enable;
 	CloseCMSProfiles();
-	CMSSettings.CMSinUse = newCM;
-	HasCMS       = CMSSettings.CMSinUse;
-	BlackPoint   = CMSSettings.BlackPoint;
-	SoftProofing = CMSSettings.SoftProofOn;
-	Gamut        = CMSSettings.GamutCheck;
-	IntentColors = CMSSettings.DefaultIntentColors;
-	IntentImages = CMSSettings.DefaultIntentImages;
-	if (!CMSSettings.CMSinUse)
+	docPrefsData.colorPrefs.DCMSset.CMSinUse = newCM;
+	HasCMS       = docPrefsData.colorPrefs.DCMSset.CMSinUse;
+	BlackPoint   = docPrefsData.colorPrefs.DCMSset.BlackPoint;
+	SoftProofing = docPrefsData.colorPrefs.DCMSset.SoftProofOn;
+	Gamut        = docPrefsData.colorPrefs.DCMSset.GamutCheck;
+	IntentColors = docPrefsData.colorPrefs.DCMSset.DefaultIntentColors;
+	IntentImages = docPrefsData.colorPrefs.DCMSset.DefaultIntentImages;
+	if (!docPrefsData.colorPrefs.DCMSset.CMSinUse)
 	{
 		HasCMS = false;
 		if	(oldCM)
@@ -913,11 +913,11 @@
 	else if (OpenCMSProfiles(ScCore->InputProfiles, ScCore->InputProfilesCMYK, ScCore->MonitorProfiles, ScCore->PrinterProfiles) )
 	{
 		HasCMS = true;
-		pdfOptions().SComp = CMSSettings.ComponentsInput2;
-		pdfOptions().SolidProf = CMSSettings.DefaultSolidColorRGBProfile;
-		pdfOptions().ImageProf = CMSSettings.DefaultImageRGBProfile;
-		pdfOptions().PrintProf = CMSSettings.DefaultPrinterProfile;
-		pdfOptions().Intent = CMSSettings.DefaultIntentColors;
+		docPrefsData.pdfPrefs.SComp = docPrefsData.colorPrefs.DCMSset.ComponentsInput2;
+		docPrefsData.pdfPrefs.SolidProf = docPrefsData.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
+		docPrefsData.pdfPrefs.ImageProf = docPrefsData.colorPrefs.DCMSset.DefaultImageRGBProfile;
+		docPrefsData.pdfPrefs.PrintProf = docPrefsData.colorPrefs.DCMSset.DefaultPrinterProfile;
+		docPrefsData.pdfPrefs.Intent = docPrefsData.colorPrefs.DCMSset.DefaultIntentColors;
 		m_ScMW->recalcColors(m_ScMW->mainWindowProgressBar);
 		RecalcPictures(&ScCore->InputProfiles, &ScCore->InputProfilesCMYK, m_ScMW->mainWindowProgressBar);
 	}
@@ -3211,16 +3211,16 @@
 	uint counter = 0;
 	usedProfiles.clear();
 
-	profileNames.append(CMSSettings.DefaultSolidColorRGBProfile);
-	profileNames.append(CMSSettings.DefaultSolidColorCMYKProfile);
-	if( profileNames.indexOf(CMSSettings.DefaultImageRGBProfile) < 0 )
-		profileNames.append(CMSSettings.DefaultImageRGBProfile);
-	if( profileNames.indexOf(CMSSettings.DefaultImageCMYKProfile) < 0 )
-		profileNames.append(CMSSettings.DefaultImageCMYKProfile);
-	if( profileNames.indexOf(CMSSettings.DefaultMonitorProfile) < 0 )
-		profileNames.append(CMSSettings.DefaultMonitorProfile);
-	if( profileNames.indexOf(CMSSettings.DefaultPrinterProfile) < 0 )
-		profileNames.append(CMSSettings.DefaultPrinterProfile);
+	profileNames.append(docPrefsData.colorPrefs.DCMSset.DefaultSolidColorRGBProfile);
+	profileNames.append(docPrefsData.colorPrefs.DCMSset.DefaultSolidColorCMYKProfile);
+	if( profileNames.indexOf(docPrefsData.colorPrefs.DCMSset.DefaultImageRGBProfile) < 0 )
+		profileNames.append(docPrefsData.colorPrefs.DCMSset.DefaultImageRGBProfile);
+	if( profileNames.indexOf(docPrefsData.colorPrefs.DCMSset.DefaultImageCMYKProfile) < 0 )
+		profileNames.append(docPrefsData.colorPrefs.DCMSset.DefaultImageCMYKProfile);
+	if( profileNames.indexOf(docPrefsData.colorPrefs.DCMSset.DefaultMonitorProfile) < 0 )
+		profileNames.append(docPrefsData.colorPrefs.DCMSset.DefaultMonitorProfile);
+	if( profileNames.indexOf(docPrefsData.colorPrefs.DCMSset.DefaultPrinterProfile) < 0 )
+		profileNames.append(docPrefsData.colorPrefs.DCMSset.DefaultPrinterProfile);
 	
 	for (uint lc = 0; lc < 3; ++lc)
 	{
@@ -4352,8 +4352,8 @@
 					currItem->EmProfile = "";
 					currItem->pixm.imgInfo.isRequest = false;
 					currItem->UseEmbedded = true;
-					currItem->IProfile = CMSSettings.DefaultImageRGBProfile;
-					currItem->IRender = CMSSettings.DefaultIntentImages;
+					currItem->IProfile = docPrefsData.colorPrefs.DCMSset.DefaultImageRGBProfile;
+					currItem->IRender = docPrefsData.colorPrefs.DCMSset.DefaultIntentImages;
 					qApp->changeOverrideCursor( QCursor(Qt::WaitCursor) );
 					qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
 					loadPict(iafData.source, currItem, false, true);
@@ -4411,8 +4411,8 @@
 			newItem->setImageXYScale(docPrefsData.itemToolPrefs.imageScaleX, docPrefsData.itemToolPrefs.imageScaleY);
 			newItem->ScaleType = docPrefsData.itemToolPrefs.imageScaleType;
 			newItem->AspectRatio = docPrefsData.itemToolPrefs.imageAspectRatio;
-			newItem->IProfile = CMSSettings.DefaultImageRGBProfile;
-			newItem->IRender = CMSSettings.DefaultIntentImages;
+			newItem->IProfile = docPrefsData.colorPrefs.DCMSset.DefaultImageRGBProfile;
+			newItem->IRender = docPrefsData.colorPrefs.DCMSset.DefaultIntentImages;
 			newItem->setFillShade(docPrefsData.itemToolPrefs.imageFillColorShade);
 			break;
 		case PageItem::LatexFrame:
@@ -5798,12 +5798,12 @@
 				if (it->pixm.imgInfo.colorspace == ColorSpaceCMYK)
 				{
 					if (!PrCMYK->contains(it->IProfile))
-						it->IProfile = CMSSettings.DefaultImageCMYKProfile;
+						it->IProfile = docPrefsData.colorPrefs.DCMSset.DefaultImageCMYKProfile;
 				}
 				else
 				{
 					if (!Pr->contains(it->IProfile))
-						it->IProfile = CMSSettings.DefaultImageRGBProfile;
+						it->IProfile = docPrefsData.colorPrefs.DCMSset.DefaultImageRGBProfile;
 				}
 				loadPict(it->Pfile, it, true);
 			}
@@ -12108,52 +12108,29 @@
 	docPrefsData.pageSets[layout].FirstPage=fp;
 }
 
-void ScribusDoc::setNewPrefs(const ApplicationPrefs& prefsData)
+void ScribusDoc::setNewPrefs(const ApplicationPrefs& prefsData, const ApplicationPrefs& oldPrefsData)
 {
 	docPrefsData=prefsData;
+/*
+	double TopD = prefsData.displayPrefs.scratch.Top - oldPrefsData.displayPrefs.scratch.Top;
+	double LeftD = prefsData.displayPrefs.scratch.Left - oldPrefsData.displayPrefs.scratch.Left;
 
-	/*
-	MarginStruct updatedMargins(tabPage->marginGroup->margins());
-	int fp = tabPage->choosenLayout;
-	currDoc->setPageSetFirstPage(fp, tabPage->docLayout->firstPage->currentIndex());
-//	currDoc->pageSets[fp].GapHorizontal = tabView->gapHorizontal->value() / currDoc->unitRatio();
-	currDoc->setPageGapHorizontal(tabView->gapHorizontal->value() / currDoc->unitRatio());
-	currDoc->setPageGapVertical(tabView->gapVertical->value() / currDoc->unitRatio());
-//	currDoc->pageSets[fp].GapBelow = tabView->gapVertical->value() / currDoc->unitRatio();
-	//currDoc->FirstPnum = pageNumber->value();
-	currDoc->resetPage(updatedMargins, fp);
-	currDoc->PageOri = tabPage->pageOrientationComboBox->currentIndex();
-	currDoc->m_pageSize = tabPage->prefsPageSizeName;
-	currDoc->pageWidth = tabPage->pageW;
-	currDoc->pageHeight = tabPage->pageH;
-	currDoc->marginPreset = tabPage->marginGroup->getMarginPreset();
-	double TopD = tabView->topScratch->value() / currDoc->unitRatio() - currDoc->scratch()->Top;
-	double LeftD = tabView->leftScratch->value() / currDoc->unitRatio() - currDoc->scratch()->Left;
-	currDoc->scratch()->set(tabView->topScratch->value() / currDoc->unitRatio(), tabView->leftScratch->value() / currDoc->unitRatio(), tabView->bottomScratch->value() / currDoc->unitRatio(), tabView->rightScratch->value() / currDoc->unitRatio());
-//	currDoc->scratch.Bottom = tabView->bottomScratch->value() / currDoc->unitRatio();
-//	currDoc->scratch.Left = tabView->leftScratch->value() / currDoc->unitRatio();
-//	currDoc->scratch.Right = tabView->rightScratch->value() / currDoc->unitRatio();
-//	currDoc->scratch.Top = tabView->topScratch->value() / currDoc->unitRatio();
-	currDoc->bleeds.Bottom = tabPage->marginGroup->bottomBleed();
-	currDoc->bleeds.Top = tabPage->marginGroup->topBleed();
-	currDoc->bleeds.Left = tabPage->marginGroup->leftBleed();
-	currDoc->bleeds.Right = tabPage->marginGroup->rightBleed();
 	for (int p = 0; p < currDoc->Pages->count(); ++p)
 	{
 		Page *pp = currDoc->Pages->at(p);
 		if (tabPage->sizeAllPages->isChecked())
 		{
-			pp->setInitialWidth(currDoc->pageWidth);
-			pp->setInitialHeight(currDoc->pageHeight);
-			pp->setHeight(currDoc->pageHeight);
-			pp->setWidth(currDoc->pageWidth);
-			pp->m_pageSize = currDoc->m_pageSize;
-			pp->setOrientation(currDoc->PageOri);
+			pp->setInitialWidth(docPrefsData.docSetupPrefs.pageWidth);
+			pp->setInitialHeight(docPrefsData.docSetupPrefs.pageHeight);
+			pp->setHeight(docPrefsData.docSetupPrefs.pageHeight);
+			pp->setWidth(docPrefsData.docSetupPrefs.pageWidth);
+			pp->m_pageSize = docPrefsData.docSetupPrefs.pageSize;
+			pp->setOrientation(docPrefsData.docSetupPrefs.pageOrientation);
 		}
 		if (tabPage->marginGroup->getMarginsForAllPages())
 		{
-			pp->initialMargins=updatedMargins;
-			pp->marginPreset=currDoc->marginPreset;
+			pp->initialMargins=docPrefsData.docSetupPrefs.margins;
+			pp->marginPreset=docPrefsData.docSetupPrefs.marginPreset;
 		}
 		else
 		if (tabPage->marginGroup->getMarginsForAllMasterPages())
@@ -12161,241 +12138,125 @@
 			//CB #6796: find the master page (*mp) for the current page (*pp)
 			//check if *pp's margins are the same as the *mp's current margins
 			//apply new margins if same
-			const int masterPageNumber = currDoc->MasterNames[pp->MPageNam];
-			const Page* mp = currDoc->MasterPages.at(masterPageNumber);
+			const int masterPageNumber = MasterNames[pp->MPageNam];
+			const Page* mp = MasterPages.at(masterPageNumber);
 			if (pp->initialMargins.Left == mp->initialMargins.Left &&
 				pp->initialMargins.Right == mp->initialMargins.Right &&
 				pp->initialMargins.Top == mp->initialMargins.Top &&
 				pp->initialMargins.Bottom == mp->initialMargins.Bottom)
 			{
-				pp->initialMargins=updatedMargins;
-				pp->marginPreset=currDoc->marginPreset;
+				pp->initialMargins=docPrefsData.docSetupPrefs.margins;
+				pp->marginPreset=docPrefsData.docSetupPrefs.marginPreset;
 			}
 		}
 	}
-	for (int p = 0; p < currDoc->MasterPages.count(); ++p)
+	for (int p = 0; p < MasterPages.count(); ++p)
 	{
-		Page *pp = currDoc->MasterPages.at(p);
+		Page *pp = MasterPages.at(p);
 		if (tabPage->sizeAllMasterPages->isChecked())
 		{
-			pp->setInitialWidth(currDoc->pageWidth);
-			pp->setInitialHeight(currDoc->pageHeight);
-			pp->setHeight(currDoc->pageHeight);
-			pp->setWidth(currDoc->pageWidth);
-			pp->m_pageSize = currDoc->m_pageSize;
-			pp->setOrientation(currDoc->PageOri);
+			pp->setInitialWidth(docPrefsData.docSetupPrefs.pageWidth);
+			pp->setInitialHeight(docPrefsData.docSetupPrefs.pageHeight);
+			pp->setHeight(docPrefsData.docSetupPrefs.pageHeight);
+			pp->setWidth(docPrefsData.docSetupPrefs.pageWidth);
+			pp->m_pageSize = docPrefsData.docSetupPrefs.pageSize;
+			pp->setOrientation(docPrefsData.docSetupPrefs.pageOrientation);
 		}
 		if (tabPage->marginGroup->getMarginsForAllMasterPages())
 		{
-			pp->initialMargins=updatedMargins;
-			pp->marginPreset=currDoc->marginPreset;
+			pp->initialMargins=docPrefsData.docSetupPrefs.margins;
+			pp->marginPreset=docPrefsData.docSetupPrefs.marginPreset;
 		}
-		pp->setXOffset(currDoc->scratch()->Left);
-		pp->setYOffset(currDoc->scratch()->Top);
+		pp->setXOffset(docPrefsData.displayPrefs.scratch.Left);
+		pp->setYOffset(docPrefsData.displayPrefs.scratch.Top);
 	}
-	uint docItemsCount = currDoc->MasterItems.count();
+	uint docItemsCount = MasterItems.count();
 	for (uint ite = 0; ite < docItemsCount; ++ite)
 	{
-		PageItem *item = currDoc->MasterItems.at(ite);
+		PageItem *item = MasterItems.at(ite);
 		item->moveBy(LeftD, TopD);
 		item->setRedrawBounding();
 	}
-	currDoc->guidesPrefs().guidePlacement = tabGuides->inBackground->isChecked();
-	currDoc->setMarginColored(tabView->checkUnprintable->isChecked());
-	currDoc->setPaperColor(tabView->colorPaper);
-	currDoc->guidesPrefs().marginsShown = tabGuides->marginBox->isChecked();
-	currDoc->guidesPrefs().showBleed = tabView->checkBleed->isChecked();
-	currDoc->guidesPrefs().framesShown = tabView->checkFrame->isChecked();
-	currDoc->guidesPrefs().layerMarkersShown = tabView->checkLayerM->isChecked();
-	currDoc->guidesPrefs().gridShown = tabGuides->checkGrid->isChecked();
-	currDoc->guidesPrefs().guidesShown = tabGuides->guideBox->isChecked();
-	currDoc->guidesPrefs().baselineGridShown = tabGuides->baselineBox->isChecked();
-	currDoc->guidesPrefs().showPic = tabView->checkPictures->isChecked();
-	currDoc->guidesPrefs().linkShown = tabView->checkLink->isChecked();
-	currDoc->guidesPrefs().showControls = tabView->checkControl->isChecked();
-	currDoc->guidesPrefs().rulerMode = tabView->checkRuler->isChecked();
-	currDoc->guidesPrefs().grabRadius = tabGuides->grabDistance->value();
-	currDoc->guidesPrefs().guideRad = tabGuides->snapDistance->value();
-	currDoc->guidesPrefs().minorGridSpacing = tabGuides->minorSpace->value() / currDoc->unitRatio();
-	currDoc->guidesPrefs().majorGridSpacing = tabGuides->majorSpace->value() / currDoc->unitRatio();
-	currDoc->guidesPrefs().minorGridColor = tabGuides->colorMinorGrid;
-	currDoc->guidesPrefs().majorGridColor = tabGuides->colorMajorGrid;
-	currDoc->guidesPrefs().marginColor = tabGuides->colorMargin;
-	currDoc->guidesPrefs().guideColor = tabGuides->colorGuides;
-	currDoc->guidesPrefs().baselineGridColor = tabGuides->colorBaselineGrid;
-	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();
-	currDoc->typographicPrefs().scalingSubScript = tabTypo->subScaling->value();
-	currDoc->typographicPrefs().valueSmallCaps = tabTypo->capsScaling->value();
-	currDoc->typographicPrefs().autoLineSpacing = tabTypo->autoLine->value();
-	currDoc->guidesPrefs().valueBaselineGrid = tabGuides->baseGrid->value(); // / currDoc->unitRatio();
-	currDoc->guidesPrefs().offsetBaselineGrid = tabGuides->baseOffset->value(); // / currDoc->unitRatio();
-	currDoc->typographicPrefs().valueUnderlinePos = qRound(tabTypo->underlinePos->value() * 10);
-	currDoc->typographicPrefs().valueUnderlineWidth = qRound(tabTypo->underlineWidth->value() * 10);
-	currDoc->typographicPrefs().valueStrikeThruPos = qRound(tabTypo->strikethruPos->value() * 10);
-	currDoc->typographicPrefs().valueStrikeThruWidth = qRound(tabTypo->strikethruWidth->value() * 10);
-	currDoc->itemToolPrefs().textFont = tabTools->fontComboText->currentText();
-	currDoc->itemToolPrefs().textSize = tabTools->sizeComboText->currentText().left(2).toInt() * 10;
-	currDoc->itemToolPrefs().textStrokeColor = tabTools->colorComboStrokeText->currentText();
-	switch (tabTools->tabFillCombo->currentIndex())
-	{
-		case 0:
-			currDoc->itemToolPrefs().textTabFillChar = "";
-			break;
-		case 1:
-			currDoc->itemToolPrefs().textTabFillChar = ".";
-			break;
-		case 2:
-			currDoc->itemToolPrefs().textTabFillChar = "-";
-			break;
-		case 3:
-			currDoc->itemToolPrefs().textTabFillChar = "_";
-			break;
-		case 4:
-			currDoc->itemToolPrefs().textTabFillChar = tabTools->tabFillCombo->currentText().right(1);
-			break;
-	}
-	if (currDoc->itemToolPrefs().textStrokeColor == CommonStrings::tr_NoneColor)
-		currDoc->itemToolPrefs().textStrokeColor = CommonStrings::None;
-	currDoc->itemToolPrefs().textColor = tabTools->colorComboText->currentText();
-	if (currDoc->itemToolPrefs().textColor == CommonStrings::tr_NoneColor)
-		currDoc->itemToolPrefs().textColor = CommonStrings::None;
-	currDoc->itemToolPrefs().textFillColor = tabTools->colorComboTextBackground->currentText();
-	if (currDoc->itemToolPrefs().textFillColor == CommonStrings::tr_NoneColor)
-		currDoc->itemToolPrefs().textFillColor = CommonStrings::None;
-	currDoc->itemToolPrefs().textLineColor = tabTools->colorComboTextLine->currentText();
-	if (currDoc->itemToolPrefs().textLineColor == CommonStrings::tr_NoneColor)
-		currDoc->itemToolPrefs().textLineColor = CommonStrings::None;
-	currDoc->itemToolPrefs().textFillColorShade = tabTools->shadingTextBack->value();
-	currDoc->itemToolPrefs().textLineColorShade = tabTools->shadingTextLine->value();
-	currDoc->itemToolPrefs().textShade = tabTools->shadingText->value();
-	currDoc->itemToolPrefs().textStrokeShade = tabTools->shadingTextStroke->value();
-	currDoc->itemToolPrefs().textColumns = tabTools->columnsText->value();
-	currDoc->itemToolPrefs().textColumnGap = tabTools->gapText->value() / currDoc->unitRatio();
-	currDoc->itemToolPrefs().textTabWidth = tabTools->gapTab->value() / currDoc->unitRatio();
-	currDoc->itemToolPrefs().shapeLineColor = tabTools->colorComboLineShape->currentText();
-	if (currDoc->itemToolPrefs().shapeLineColor == CommonStrings::tr_NoneColor)
-		currDoc->itemToolPrefs().shapeLineColor = CommonStrings::None;
-	currDoc->itemToolPrefs().shapeFillColor = tabTools->comboFillShape->currentText();
-	if (currDoc->itemToolPrefs().shapeFillColor == CommonStrings::tr_NoneColor)
-		currDoc->itemToolPrefs().shapeFillColor = CommonStrings::None;
-	currDoc->itemToolPrefs().shapeFillColorShade = tabTools->shadingFillShape->value();
-	currDoc->itemToolPrefs().shapeLineColorShade = tabTools->shadingLineShape->value();
-	currDoc->itemToolPrefs().shapeLineStyle = static_cast<Qt::PenStyle>(tabTools->comboStyleShape->currentIndex()) + 1;
-	currDoc->itemToolPrefs().shapeLineWidth = tabTools->lineWidthShape->value();
-	currDoc->itemToolPrefs().lineStartArrow = tabTools->startArrow->currentIndex();
-	currDoc->itemToolPrefs().lineEndArrow = tabTools->endArrow->currentIndex();
-	currDoc->opToolPrefs().magMin = tabTools->minimumZoom->value();
-	currDoc->opToolPrefs().magMax = tabTools->maximumZoom->value();
-	currDoc->opToolPrefs().magStep = tabTools->zoomStep->value();
-	currDoc->itemToolPrefs().lineColor = tabTools->colorComboLine->currentText();
-	if (currDoc->itemToolPrefs().lineColor == CommonStrings::tr_NoneColor)
-		currDoc->itemToolPrefs().lineColor = CommonStrings::None;
-	currDoc->itemToolPrefs().lineColorShade = tabTools->shadingLine->value();
-	currDoc->itemToolPrefs().lineStyle = static_cast<Qt::PenStyle>(tabTools->comboStyleLine->currentIndex()) + 1;
-	currDoc->itemToolPrefs().lineWidth = tabTools->lineWidthLine->value();
-	currDoc->itemToolPrefs().imageFillColor = tabTools->comboFillImage->currentText();
-	if (currDoc->itemToolPrefs().imageFillColor == CommonStrings::tr_NoneColor)
-		currDoc->itemToolPrefs().imageFillColor = CommonStrings::None;
-	currDoc->itemToolPrefs().imageFillColorShade = tabTools->shadingFillImage->value();
-	currDoc->itemToolPrefs().imageScaleX = static_cast<double>(tabTools->scalingHorizontal->value()) / 100.0;
-	currDoc->itemToolPrefs().imageScaleY = static_cast<double>(tabTools->scalingVertical->value()) / 100.0;
-	currDoc->itemToolPrefs().imageScaleType = tabTools->buttonGroup3->isChecked();
-	currDoc->itemToolPrefs().imageAspectRatio = tabTools->checkRatioImage->isChecked();
-	currDoc->itemToolPrefs().imageUseEmbeddedPath = tabTools->embeddedPath->isChecked();
-	int haRes = 0;
-	if (tabTools->checkFullRes->isChecked())
-		haRes = 0;
-	if (tabTools->checkNormalRes->isChecked())
-		haRes = 1;
-	if (tabTools->checkHalfRes->isChecked())
-		haRes = 2;
-	if (currDoc->itemToolPrefs().imageLowResType != haRes)
-	{
-		currDoc->itemToolPrefs().imageLowResType = haRes;
-		viewToRecalcPictureRes=true;
-	}
-	else
-		viewToRecalcPictureRes=false;
-	currDoc->opToolPrefs().dispX = tabTools->genDispX->value();
-	currDoc->opToolPrefs().dispY = tabTools->genDispY->value();
-	currDoc->opToolPrefs().constrain = tabTools->genRot->value();
-	tabTools->polyWidget->getValues(&currDoc->itemToolPrefs().polyCorners,
-									&currDoc->itemToolPrefs().polyFactorGuiVal,
-									&currDoc->itemToolPrefs().polyFactor,
-									&currDoc->itemToolPrefs().polyUseFactor,
-									&currDoc->itemToolPrefs().polyRotation,
-									&currDoc->itemToolPrefs().polyCurvature);
-	currDoc->setAutoSave(tabPage->GroupAS->isChecked());
-	currDoc->setAutoSaveTime(tabPage->ASTime->value() * 60 * 1000);
-	currDoc->autoSaveTimer->stop();
-	if (currDoc->autoSave())
-		currDoc->autoSaveTimer->start(currDoc->autoSaveTime());
+	viewToRecalcPictureRes=(docPrefsData.itemToolPrefs.imageLowResType==oldPrefsData.itemToolPrefs.imageLowResType);
+
+	autoSaveTimer->stop();
+	if (docPrefsData.docSetupPrefs.AutoSave)
+		autoSaveTimer->start(docPrefsData.docSetupPrefs.AutoSaveTime);
 */
 /*	FIXME: scribus determines dict by charstyle now, so this setting should go into the doc's default charstyle
 		currDoc->docHyphenator->slotNewDict(ScMW->GetLang(tabHyphenator->language->currentText()));
 */
-	/*
-	currDoc->setHyphLanguage(tabHyphenator->getLanguage());
+/*
+	currDoc->setHyphLanguage(docPrefsData.hyphPrefs.Language);
 
-	currDoc->docHyphenator->slotNewSettings(tabHyphenator->getWordLen(),
-											!tabHyphenator->getVerbose(),
-											tabHyphenator->getInput(),
-											tabHyphenator->getMaxCount());
-	currDoc->docHyphenator->ignoredWords = tabHyphenator->getIgnoreList();
-	currDoc->docHyphenator->specialWords = tabHyphenator->getExceptionList();
+	currDoc->docHyphenator->slotNewSettings(docPrefsData.hyphPrefs.MinWordLen,
+											!docPrefsData.hyphPrefs.Automatic,
+											docPrefsData.hyphPrefs.AutoCheck,
+											docPrefsData.hyphPrefs.HyCount);
+	currDoc->docHyphenator->ignoredWords = docPrefsData.hyphPrefs.ignoredWords;
+	currDoc->docHyphenator->specialWords = docPrefsData.hyphPrefs.specialWords;
 	if (ScCore->haveCMS())
 	{
-		bool oldCM = currDoc->CMSSettings.CMSinUse;
-		tabColorManagement->updateDocSettings(currDoc);
-		if (tabColorManagement->changed)
+		bool oldCM = currDoc->docPrefsData.colorPrefs.DCMSset.CMSinUse;
+		bool cmsChanged = (
+					(docPrefsData.colorPrefs.DCMSset.DefaultImageRGBProfile != oldPrefsData.colorPrefs.DCMSset.DefaultImageRGBProfile) ||
+					(docPrefsData.colorPrefs.DCMSset.DefaultImageCMYKProfile != oldPrefsData.colorPrefs.DCMSset.DefaultImageCMYKProfile) ||
+					(docPrefsData.colorPrefs.DCMSset.DefaultSolidColorRGBProfile != oldPrefsData.colorPrefs.DCMSset.DefaultSolidColorRGBProfile) ||
+					(docPrefsData.colorPrefs.DCMSset.DefaultSolidColorCMYKProfile != oldPrefsData.colorPrefs.DCMSset.DefaultSolidColorCMYKProfile) ||
+					(docPrefsData.colorPrefs.DCMSset.DefaultPrinterProfile != oldPrefsData.colorPrefs.DCMSset.DefaultPrinterProfile) ||
+					(docPrefsData.colorPrefs.DCMSset.DefaultIntentColors != oldPrefsData.colorPrefs.DCMSset.DefaultIntentColors) ||
+					(docPrefsData.colorPrefs.DCMSset.DefaultIntentImages != oldPrefsData.colorPrefs.DCMSset.DefaultIntentImages) ||
+					(docPrefsData.colorPrefs.DCMSset.SoftProofOn != oldPrefsData.colorPrefs.DCMSset.SoftProofOn) ||
+					(docPrefsData.colorPrefs.DCMSset.SoftProofFullOn != oldPrefsData.colorPrefs.DCMSset.SoftProofFullOn) ||
+					(docPrefsData.colorPrefs.DCMSset.GamutCheck != oldPrefsData.colorPrefs.DCMSset.GamutCheck) ||
+					(docPrefsData.colorPrefs.DCMSset.BlackPoint != oldPrefsData.colorPrefs.DCMSset.BlackPoint) ||
+					(docPrefsData.colorPrefs.DCMSset.CMSinUse != oldPrefsData.colorPrefs.DCMSset.CMSinUse)
+					);
+		if (cmsChanged)
 		{
 			ScMW->setStatusBarInfoText( tr("Adjusting Colors"));
 			ScMW->mainWindowProgressBar->reset();
-			int cc = currDoc->PageColors.count() + currDoc->Items->count();
+			int cc = PageColors.count() + Items->count();
 			ScMW->mainWindowProgressBar->setMaximum(cc);
 			qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
-			bool newCM  = currDoc->CMSSettings.CMSinUse;
+			bool newCM  = CMSSettings.CMSinUse;
 			bool updCol = false;
-			currDoc->CMSSettings.CMSinUse = oldCM;
-			currDoc->CloseCMSProfiles();
-			currDoc->CMSSettings.CMSinUse = newCM;
-			currDoc->HasCMS = currDoc->CMSSettings.CMSinUse;
-			currDoc->SoftProofing = currDoc->CMSSettings.SoftProofOn;
-			currDoc->Gamut = currDoc->CMSSettings.GamutCheck;
-			currDoc->IntentColors = currDoc->CMSSettings.DefaultIntentColors;
-			currDoc->IntentImages = currDoc->CMSSettings.DefaultIntentImages;
-			if (!currDoc->CMSSettings.CMSinUse)
+			CMSSettings.CMSinUse = oldCM;
+			CloseCMSProfiles();
+			CMSSettings.CMSinUse = newCM;
+			HasCMS = CMSSettings.CMSinUse;
+			SoftProofing = CMSSettings.SoftProofOn;
+			Gamut = CMSSettings.GamutCheck;
+			IntentColors = CMSSettings.DefaultIntentColors;
+			IntentImages = CMSSettings.DefaultIntentImages;
+			if (!CMSSettings.CMSinUse)
 			{
-				currDoc->HasCMS = false;
+				HasCMS = false;
 				if	(oldCM)
 				{
-					currDoc->SetDefaultCMSParams();
+					SetDefaultCMSParams();
 					updCol = true;
 				}
 			}
-			else if ( currDoc->OpenCMSProfiles(ScCore->InputProfiles, ScCore->InputProfilesCMYK, ScCore->MonitorProfiles, ScCore->PrinterProfiles) )
+			else if ( OpenCMSProfiles(ScCore->InputProfiles, ScCore->InputProfilesCMYK, ScCore->MonitorProfiles, ScCore->PrinterProfiles) )
 			{
-				currDoc->HasCMS = true;
-				currDoc->pdfOptions().SComp = currDoc->CMSSettings.ComponentsInput2;
-				currDoc->pdfOptions().SolidProf = currDoc->CMSSettings.DefaultSolidColorRGBProfile;
-				currDoc->pdfOptions().ImageProf = currDoc->CMSSettings.DefaultImageRGBProfile;
-				currDoc->pdfOptions().PrintProf = currDoc->CMSSettings.DefaultPrinterProfile;
-				currDoc->pdfOptions().Intent = currDoc->CMSSettings.DefaultIntentColors;
+				HasCMS = true;
+				docPrefsData.pdfPrefs.SComp = CMSSettings.ComponentsInput2;
+				docPrefsData.pdfPrefs.SolidProf = CMSSettings.DefaultSolidColorRGBProfile;
+				docPrefsData.pdfPrefs.ImageProf = CMSSettings.DefaultImageRGBProfile;
+				docPrefsData.pdfPrefs.PrintProf = CMSSettings.DefaultPrinterProfile;
+				docPrefsData.pdfPrefs.Intent = CMSSettings.DefaultIntentColors;
 				updCol = true;
 			}
 			else
 			{
-				currDoc->SetDefaultCMSParams();
-				currDoc->HasCMS = false;
+				SetDefaultCMSParams();
+				HasCMS = false;
 			}
 			if (updCol)
 			{
 				ScMW->recalcColors(ScMW->mainWindowProgressBar);
-				currDoc->RecalcPictures(&ScCore->InputProfiles, &ScCore->InputProfilesCMYK, ScMW->mainWindowProgressBar);
+				RecalcPictures(&ScCore->InputProfiles, &ScCore->InputProfilesCMYK, ScMW->mainWindowProgressBar);
 			}
 			ScMW->mainWindowProgressBar->setValue(cc);
 			qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
@@ -12427,31 +12288,7 @@
 	for (it3a = uf.begin(); it3a != it3aend; ++it3a)
 		currDoc->AddFont(*it3a);
 
-	currDoc->pdfOptions().Thumbnails = tabPDF->CheckBox1->isChecked();
-	currDoc->pdfOptions().Compress = tabPDF->Compression->isChecked();
-	currDoc->pdfOptions().CompressMethod = (PDFOptions::PDFCompression) tabPDF->CMethod->currentIndex();
-	currDoc->pdfOptions().Quality = tabPDF->CQuality->currentIndex();
-	currDoc->pdfOptions().embedPDF = tabPDF->EmbedPDF->isChecked();
-	currDoc->pdfOptions().Resolution = tabPDF->Resolution->value();
-	currDoc->pdfOptions().RecalcPic = tabPDF->DSColor->isChecked();
-	currDoc->pdfOptions().PicRes = tabPDF->ValC->value();
-	currDoc->pdfOptions().Bookmarks = tabPDF->CheckBM->isChecked();
-	currDoc->pdfOptions().Binding = tabPDF->ComboBind->currentIndex();
-	currDoc->pdfOptions().MirrorH = tabPDF->MirrorH->isChecked();
-	currDoc->pdfOptions().MirrorV = tabPDF->MirrorV->isChecked();
-	currDoc->pdfOptions().RotateDeg = tabPDF->RotateDeg->currentIndex() * 90;
-	currDoc->pdfOptions().Articles = tabPDF->Article->isChecked();
-	currDoc->pdfOptions().Encrypt = tabPDF->Encry->isChecked();
-	currDoc->pdfOptions().UseLPI = tabPDF->UseLPI->isChecked();
-	currDoc->pdfOptions().useLayers = tabPDF->useLayers->isChecked();
-	currDoc->pdfOptions().UseSpotColors = !tabPDF->useSpot->isChecked();
-	currDoc->pdfOptions().doMultiFile = false;
-	currDoc->pdfOptions().bleeds.Bottom = tabPDF->BleedBottom->value() / currDoc->unitRatio();
-	currDoc->pdfOptions().bleeds.Top = tabPDF->BleedTop->value() / currDoc->unitRatio();
-	currDoc->pdfOptions().bleeds.Left = tabPDF->BleedLeft->value() / currDoc->unitRatio();
-	currDoc->pdfOptions().bleeds.Right = tabPDF->BleedRight->value() / currDoc->unitRatio();
-	currDoc->pdfOptions().doClip = tabPDF->ClipMarg->isChecked();
-	currDoc->pdfOptions().openAction = "";
+
 	if (tabPDF->Encry->isChecked())
 	{
 		int Perm = -64;
Index: scribus/cmsettings.cpp
===================================================================
--- scribus/cmsettings.cpp	(revision 15000)
+++ scribus/cmsettings.cpp	(revision 15001)
@@ -51,42 +51,42 @@
 QString CMSettings::defaultMonitorProfile() const
 {
 	if (m_Doc)
-		return m_Doc->CMSSettings.DefaultMonitorProfile;
+		return m_Doc->cmsSettings().DefaultMonitorProfile;
 	return QString();
 }
 
 QString CMSettings::defaultPrinterProfile() const
 {
 	if (m_Doc)
-		return m_Doc->CMSSettings.DefaultPrinterProfile;
+		return m_Doc->cmsSettings().DefaultPrinterProfile;
 	return QString();
 }
 
 QString CMSettings::defaultImageRGBProfile() const
 {
 	if (m_Doc)
-		return m_Doc->CMSSettings.DefaultImageRGBProfile;
+		return m_Doc->cmsSettings().DefaultImageRGBProfile;
 	return QString();
 }
 
 QString CMSettings::defaultImageCMYKProfile() const
 {
 	if (m_Doc)
-		return m_Doc->CMSSettings.DefaultImageCMYKProfile;
+		return m_Doc->cmsSettings().DefaultImageCMYKProfile;
 	return QString();
 }
 
 QString CMSettings::defaultSolidColorRGBProfile() const
 {
 	if (m_Doc)
-		return m_Doc->CMSSettings.DefaultSolidColorRGBProfile;
+		return m_Doc->cmsSettings().DefaultSolidColorRGBProfile;
 	return QString();
 }
 
 QString CMSettings::defaultSolidColorCMYKProfile() const
 {
 	if (m_Doc)
-		return m_Doc->CMSSettings.DefaultSolidColorCMYKProfile;
+		return m_Doc->cmsSettings().DefaultSolidColorCMYKProfile;
 	return QString();
 }
 
@@ -107,21 +107,21 @@
 bool CMSettings::useBlackPoint() const
 {
 	if (m_Doc)
-		return m_Doc->CMSSettings.BlackPoint;
+		return m_Doc->cmsSettings().BlackPoint;
 	return false;
 }
 
 bool CMSettings::doSoftProofing() const
 {
 	if (m_Doc)
-		return (m_Doc->CMSSettings.SoftProofOn && m_softProofingAllowed);
+		return (m_Doc->cmsSettings().SoftProofOn && m_softProofingAllowed);
 	return false;
 }
 
 bool CMSettings::doGamutCheck() const
 {
 	if (m_Doc)
-		return (m_Doc->CMSSettings.GamutCheck && m_softProofingAllowed);
+		return (m_Doc->cmsSettings().GamutCheck && m_softProofingAllowed);
 	return false;
 }
 
Index: scribus/scribusdoc.h
===================================================================
--- scribus/scribusdoc.h	(revision 15000)
+++ scribus/scribusdoc.h	(revision 15001)
@@ -211,9 +211,11 @@
 	GuidesPrefs& guidesPrefs() { return docPrefsData.guidesPrefs; }
 	ItemToolPrefs& itemToolPrefs() { return docPrefsData.itemToolPrefs; }
 	OperatorToolPrefs& opToolPrefs() { return docPrefsData.opToolPrefs; }
+	ColorPrefs& colorPrefs() { return docPrefsData.colorPrefs; }
+	CMSData& cmsSettings() { return docPrefsData.colorPrefs.DCMSset; }
 
 	const ApplicationPrefs& prefsData() { return docPrefsData; }
-	void setNewPrefs(const ApplicationPrefs& prefsData);
+	void setNewPrefs(const ApplicationPrefs& prefsData, const ApplicationPrefs& oldPrefsData);
 
 	// Add, delete and move pages
 	
@@ -1115,7 +1117,7 @@
 	ScLayers Layers;
 	//bool marginColored;
 	int GroupCounter;
-	CMSData CMSSettings;
+	//->Prefs CMSData CMSSettings;
 
 	ScColorMgmtEngine colorEngine;
 	ScColorProfile DocInputImageRGBProf;
Index: scribus/scribusview.cpp
===================================================================
--- scribus/scribusview.cpp	(revision 15000)
+++ scribus/scribusview.cpp	(revision 15001)
@@ -385,7 +385,7 @@
 		dia->tabColorManagement->updateDocSettings(Doc);
 		if (dia->tabColorManagement->changed)
 		{
-			Doc->enableCMS(Doc->CMSSettings.CMSinUse);
+			Doc->enableCMS(Doc->cmsSettings().CMSinUse);
 			cmsToolbarButton->setChecked(Doc->HasCMS);
 			m_ScMW->propertiesPalette->ShowCMS();
 			DrawNew();
Index: scribus/scimage.cpp
===================================================================
--- scribus/scimage.cpp	(revision 15000)
+++ scribus/scimage.cpp	(revision 15001)
@@ -2156,7 +2156,7 @@
 			Q_ASSERT(cmSettings.doc()!=0);
 			if (isCMYK)
 			{
-				if (ScCore->InputProfilesCMYK.contains(cmSettings.profileName()) && (cmSettings.profileName() != cmSettings.doc()->CMSSettings.DefaultImageCMYKProfile))
+				if (ScCore->InputProfilesCMYK.contains(cmSettings.profileName()) && (cmSettings.profileName() != cmSettings.doc()->cmsSettings().DefaultImageCMYKProfile))
 				{
 					imgInfo.profileName = cmSettings.profileName();
 					inputProfIsEmbedded = true;
@@ -2166,13 +2166,13 @@
 				else
 				{
 					inputProf = cmSettings.doc()->DocInputImageCMYKProf;
-					imgInfo.profileName = cmSettings.doc()->CMSSettings.DefaultImageCMYKProfile;
+					imgInfo.profileName = cmSettings.doc()->cmsSettings().DefaultImageCMYKProfile;
 					inputProfIsEmbedded = false;
 				}
 			}
 			else
 			{
-				if (ScCore->InputProfiles.contains(cmSettings.profileName()) && (cmSettings.profileName() != cmSettings.doc()->CMSSettings.DefaultImageRGBProfile))
+				if (ScCore->InputProfiles.contains(cmSettings.profileName()) && (cmSettings.profileName() != cmSettings.doc()->cmsSettings().DefaultImageRGBProfile))
 				{
 					imgInfo.profileName = cmSettings.profileName();
 					profilePath = ScCore->InputProfiles[imgInfo.profileName];
@@ -2182,7 +2182,7 @@
 				else
 				{
 					inputProf = cmSettings.doc()->DocInputImageRGBProf;
-					imgInfo.profileName = cmSettings.doc()->CMSSettings.DefaultImageRGBProfile;
+					imgInfo.profileName = cmSettings.doc()->cmsSettings().DefaultImageRGBProfile;
 					inputProfIsEmbedded = false;
 				}
 			}
Index: scribus/ui/prefs_pdfexport.cpp
===================================================================
--- scribus/ui/prefs_pdfexport.cpp	(revision 15000)
+++ scribus/ui/prefs_pdfexport.cpp	(revision 15001)
@@ -674,7 +674,7 @@
 		if (!ScCore->InputProfiles.contains(tp))
 		{
 			if (m_doc != 0)
-				tp = m_doc->CMSSettings.DefaultSolidColorRGBProfile;
+				tp = m_doc->cmsSettings().DefaultSolidColorRGBProfile;
 			else
 				tp = defaultSolidColorRGBProfile;
 		}
@@ -696,7 +696,7 @@
 		if (!ScCore->InputProfiles.contains(tp1))
 		{
 			if (m_doc != 0)
-				tp1 = m_doc->CMSSettings.DefaultSolidColorRGBProfile;
+				tp1 = m_doc->cmsSettings().DefaultSolidColorRGBProfile;
 			else
 				tp1 = defaultSolidColorRGBProfile;
 		}
Index: scribus/ui/tabpdfoptions.cpp
===================================================================
--- scribus/ui/tabpdfoptions.cpp	(revision 15000)
+++ scribus/ui/tabpdfoptions.cpp	(revision 15001)
@@ -1254,7 +1254,7 @@
 	if (!ScCore->InputProfiles.contains(tp))
 	{
 		if (mdoc != 0 && exporting)
-			tp = mdoc->CMSSettings.DefaultSolidColorRGBProfile;
+			tp = mdoc->cmsSettings().DefaultSolidColorRGBProfile;
 		else
 			tp = PrefsManager::instance()->appPrefs.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
 	}
@@ -1276,7 +1276,7 @@
 	if (!ScCore->InputProfiles.contains(tp1))
 	{
 		if (mdoc != 0 && exporting)
-			tp1 = mdoc->CMSSettings.DefaultSolidColorRGBProfile;
+			tp1 = mdoc->cmsSettings().DefaultSolidColorRGBProfile;
 		else
 			tp1 = PrefsManager::instance()->appPrefs.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
 	}
@@ -1305,7 +1305,7 @@
 	if (!PDFXProfiles.contains(tp3))
 	{
 		if (mdoc != 0 && exporting)
-			tp3 = mdoc->CMSSettings.DefaultPrinterProfile;
+			tp3 = mdoc->cmsSettings().DefaultPrinterProfile;
 		else
 			tp3 = PrefsManager::instance()->appPrefs.colorPrefs.DCMSset.DefaultPrinterProfile;
 	}
@@ -1711,7 +1711,7 @@
 		if (!ScCore->InputProfiles.contains(tp))
 		{
 			if (doc != 0)
-				tp = doc->CMSSettings.DefaultSolidColorRGBProfile;
+				tp = doc->cmsSettings().DefaultSolidColorRGBProfile;
 			else
 				tp = PrefsManager::instance()->appPrefs.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
 		}
@@ -1733,7 +1733,7 @@
 		if (!ScCore->InputProfiles.contains(tp1))
 		{
 			if (doc != 0)
-				tp1 = doc->CMSSettings.DefaultSolidColorRGBProfile;
+				tp1 = doc->cmsSettings().DefaultSolidColorRGBProfile;
 			else
 				tp1 = PrefsManager::instance()->appPrefs.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
 		}
Index: scribus/ui/reformdoc.cpp
===================================================================
--- scribus/ui/reformdoc.cpp	(revision 15000)
+++ scribus/ui/reformdoc.cpp	(revision 15001)
@@ -112,7 +112,7 @@
 	int cmsTab = 0;
 	if (ScCore->haveCMS())
 	{
-		tabColorManagement = new CMSPrefs(prefsWidgets, &doc->CMSSettings, &ScCore->InputProfiles, &ScCore->InputProfilesCMYK, &ScCore->PrinterProfiles, &ScCore->MonitorProfiles);
+		tabColorManagement = new CMSPrefs(prefsWidgets, &doc->cmsSettings(), &ScCore->InputProfiles, &ScCore->InputProfilesCMYK, &ScCore->PrinterProfiles, &ScCore->MonitorProfiles);
 		cmsTab = addItem( tr("Color Management"), loadIcon("blend.png"), tabColorManagement);
 	}
 
@@ -156,7 +156,7 @@
 							ScCore->PDFXProfiles, currDoc->UsedFonts, currDoc->pdfOptions().PresentVals,
 							docUnitIndex, currDoc->pageHeight(), currDoc->pageWidth(), currDoc, false);
 	if (ScCore->haveCMS())
-		tabColorManagement->restoreDefaults(&currDoc->CMSSettings, &ScCore->InputProfiles,
+		tabColorManagement->restoreDefaults(&currDoc->cmsSettings(), &ScCore->InputProfiles,
 										 &ScCore->InputProfilesCMYK,
 										 &ScCore->PrinterProfiles, &ScCore->MonitorProfiles);
 	docInfos->restoreDefaults();
@@ -452,7 +452,7 @@
 	currDoc->docHyphenator->specialWords = tabHyphenator->getExceptionList();
 	if (ScCore->haveCMS())
 	{
-		bool oldCM = currDoc->CMSSettings.CMSinUse;
+		bool oldCM = currDoc->cmsSettings().CMSinUse;
 		tabColorManagement->updateDocSettings(currDoc);
 		if (tabColorManagement->changed)
 		{
@@ -461,17 +461,17 @@
 			int cc = currDoc->PageColors.count() + currDoc->Items->count();
 			ScMW->mainWindowProgressBar->setMaximum(cc);
 			qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
-			bool newCM  = currDoc->CMSSettings.CMSinUse;
+			bool newCM  = currDoc->cmsSettings().CMSinUse;
 			bool updCol = false;
-			currDoc->CMSSettings.CMSinUse = oldCM;
+			currDoc->cmsSettings().CMSinUse = oldCM;
 			currDoc->CloseCMSProfiles();
-			currDoc->CMSSettings.CMSinUse = newCM;
-			currDoc->HasCMS = currDoc->CMSSettings.CMSinUse;
-			currDoc->SoftProofing = currDoc->CMSSettings.SoftProofOn;
-			currDoc->Gamut = currDoc->CMSSettings.GamutCheck;
-			currDoc->IntentColors = currDoc->CMSSettings.DefaultIntentColors;
-			currDoc->IntentImages = currDoc->CMSSettings.DefaultIntentImages;
-			if (!currDoc->CMSSettings.CMSinUse)
+			currDoc->cmsSettings().CMSinUse = newCM;
+			currDoc->HasCMS = currDoc->cmsSettings().CMSinUse;
+			currDoc->SoftProofing = currDoc->cmsSettings().SoftProofOn;
+			currDoc->Gamut = currDoc->cmsSettings().GamutCheck;
+			currDoc->IntentColors = currDoc->cmsSettings().DefaultIntentColors;
+			currDoc->IntentImages = currDoc->cmsSettings().DefaultIntentImages;
+			if (!currDoc->cmsSettings().CMSinUse)
 			{
 				currDoc->HasCMS = false;
 				if	(oldCM)
@@ -483,11 +483,11 @@
 			else if ( currDoc->OpenCMSProfiles(ScCore->InputProfiles, ScCore->InputProfilesCMYK, ScCore->MonitorProfiles, ScCore->PrinterProfiles) )
 			{
 				currDoc->HasCMS = true;
-				currDoc->pdfOptions().SComp = currDoc->CMSSettings.ComponentsInput2;
-				currDoc->pdfOptions().SolidProf = currDoc->CMSSettings.DefaultSolidColorRGBProfile;
-				currDoc->pdfOptions().ImageProf = currDoc->CMSSettings.DefaultImageRGBProfile;
-				currDoc->pdfOptions().PrintProf = currDoc->CMSSettings.DefaultPrinterProfile;
-				currDoc->pdfOptions().Intent = currDoc->CMSSettings.DefaultIntentColors;
+				currDoc->pdfOptions().SComp = currDoc->cmsSettings().ComponentsInput2;
+				currDoc->pdfOptions().SolidProf = currDoc->cmsSettings().DefaultSolidColorRGBProfile;
+				currDoc->pdfOptions().ImageProf = currDoc->cmsSettings().DefaultImageRGBProfile;
+				currDoc->pdfOptions().PrintProf = currDoc->cmsSettings().DefaultPrinterProfile;
+				currDoc->pdfOptions().Intent = currDoc->cmsSettings().DefaultIntentColors;
 				updCol = true;
 			}
 			else
Index: scribus/ui/cmsprefs.cpp
===================================================================
--- scribus/ui/cmsprefs.cpp	(revision 15000)
+++ scribus/ui/cmsprefs.cpp	(revision 15001)
@@ -134,31 +134,31 @@
 
 void CMSPrefs::updateDocSettings(ScribusDoc* doc)
 {
-	if ((doc->CMSSettings.DefaultImageRGBProfile != inputPRGBIm->currentText()) ||
-		(doc->CMSSettings.DefaultImageCMYKProfile != inputPCMYKIm->currentText()) ||
-		(doc->CMSSettings.DefaultSolidColorRGBProfile != inputPRGB->currentText()) ||
-		(doc->CMSSettings.DefaultSolidColorCMYKProfile != inputPCMYK->currentText()) ||
-		(doc->CMSSettings.DefaultPrinterProfile != printerP->currentText()) ||
-		(doc->CMSSettings.DefaultIntentColors != colorsI->currentIndex()) ||
-		(doc->CMSSettings.DefaultIntentImages != imagesI->currentIndex()) ||
-		(doc->CMSSettings.SoftProofOn != simulatePrinter->isChecked()) ||
-		(doc->CMSSettings.SoftProofFullOn != convertAll->isChecked()) ||
-		(doc->CMSSettings.GamutCheck != gamutCheck->isChecked()) ||
-		(doc->CMSSettings.BlackPoint != blackPoint->isChecked()) ||
-		(doc->CMSSettings.CMSinUse != checkBox1->isChecked()))
+	if ((doc->cmsSettings().DefaultImageRGBProfile != inputPRGBIm->currentText()) ||
+		(doc->cmsSettings().DefaultImageCMYKProfile != inputPCMYKIm->currentText()) ||
+		(doc->cmsSettings().DefaultSolidColorRGBProfile != inputPRGB->currentText()) ||
+		(doc->cmsSettings().DefaultSolidColorCMYKProfile != inputPCMYK->currentText()) ||
+		(doc->cmsSettings().DefaultPrinterProfile != printerP->currentText()) ||
+		(doc->cmsSettings().DefaultIntentColors != colorsI->currentIndex()) ||
+		(doc->cmsSettings().DefaultIntentImages != imagesI->currentIndex()) ||
+		(doc->cmsSettings().SoftProofOn != simulatePrinter->isChecked()) ||
+		(doc->cmsSettings().SoftProofFullOn != convertAll->isChecked()) ||
+		(doc->cmsSettings().GamutCheck != gamutCheck->isChecked()) ||
+		(doc->cmsSettings().BlackPoint != blackPoint->isChecked()) ||
+		(doc->cmsSettings().CMSinUse != checkBox1->isChecked()))
 			changed = true;
-	doc->CMSSettings.DefaultImageRGBProfile = inputPRGBIm->currentText();
-	doc->CMSSettings.DefaultImageCMYKProfile = inputPCMYKIm->currentText();
-	doc->CMSSettings.DefaultSolidColorRGBProfile = inputPRGB->currentText();
-	doc->CMSSettings.DefaultSolidColorCMYKProfile = inputPCMYK->currentText();
-	doc->CMSSettings.DefaultPrinterProfile = printerP->currentText();
-	doc->CMSSettings.DefaultIntentColors = (eRenderIntent) colorsI->currentIndex();
-	doc->CMSSettings.DefaultIntentImages = (eRenderIntent) imagesI->currentIndex();
-	doc->CMSSettings.SoftProofOn = simulatePrinter->isChecked();
-	doc->CMSSettings.SoftProofFullOn = convertAll->isChecked();
-	doc->CMSSettings.GamutCheck = gamutCheck->isChecked();
-	doc->CMSSettings.CMSinUse = checkBox1->isChecked();
-	doc->CMSSettings.BlackPoint = blackPoint->isChecked();
+	doc->cmsSettings().DefaultImageRGBProfile = inputPRGBIm->currentText();
+	doc->cmsSettings().DefaultImageCMYKProfile = inputPCMYKIm->currentText();
+	doc->cmsSettings().DefaultSolidColorRGBProfile = inputPRGB->currentText();
+	doc->cmsSettings().DefaultSolidColorCMYKProfile = inputPCMYK->currentText();
+	doc->cmsSettings().DefaultPrinterProfile = printerP->currentText();
+	doc->cmsSettings().DefaultIntentColors = (eRenderIntent) colorsI->currentIndex();
+	doc->cmsSettings().DefaultIntentImages = (eRenderIntent) imagesI->currentIndex();
+	doc->cmsSettings().SoftProofOn = simulatePrinter->isChecked();
+	doc->cmsSettings().SoftProofFullOn = convertAll->isChecked();
+	doc->cmsSettings().GamutCheck = gamutCheck->isChecked();
+	doc->cmsSettings().CMSinUse = checkBox1->isChecked();
+	doc->cmsSettings().BlackPoint = blackPoint->isChecked();
 }
 
 void CMSPrefs::slotCMSon(bool active)
Index: scribus/ui/propertiespalette.cpp
===================================================================
--- scribus/ui/propertiespalette.cpp	(revision 15000)
+++ scribus/ui/propertiespalette.cpp	(revision 15001)
@@ -4334,7 +4334,7 @@
 		return;
 	if (HaveDoc)
 	{
-		if (ScCore->haveCMS() && doc->CMSSettings.CMSinUse)
+		if (ScCore->haveCMS() && doc->cmsSettings().CMSinUse)
 			GroupBoxCM->show();
 		else
 		{
@@ -4430,7 +4430,7 @@
 	if (HaveItem)
 		updateCmsList();
 	else
-		GroupBoxCM->setVisible(ScCore->haveCMS() && doc->CMSSettings.CMSinUse);
+		GroupBoxCM->setVisible(ScCore->haveCMS() && doc->cmsSettings().CMSinUse);
 }
 
 void PropertiesPalette::newTxtFill()
Index: scribus/ui/adjustcmsdialog.cpp
===================================================================
--- scribus/ui/adjustcmsdialog.cpp	(revision 15000)
+++ scribus/ui/adjustcmsdialog.cpp	(revision 15001)
@@ -19,7 +19,7 @@
 	queryLayout = new QVBoxLayout( this );
 	queryLayout->setMargin(5);
 	queryLayout->setSpacing(10);
-	tabColorManagement = new CMSPrefs(this, &doc->CMSSettings, &ScCore->InputProfiles, &ScCore->InputProfilesCMYK, &ScCore->PrinterProfiles, &ScCore->MonitorProfiles);
+	tabColorManagement = new CMSPrefs(this, &doc->cmsSettings(), &ScCore->InputProfiles, &ScCore->InputProfilesCMYK, &ScCore->PrinterProfiles, &ScCore->MonitorProfiles);
 	queryLayout->addWidget( tabColorManagement );
 	okCancelLayout = new QHBoxLayout;
 	okCancelLayout->setSpacing( 5 );
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp	(revision 15000)
+++ scribus/scribus.cpp	(revision 15001)
@@ -1897,7 +1897,7 @@
 		HaveDoc++;
 		DocNr++;
 	}
-	if (ScCore->haveCMS() && tempDoc->CMSSettings.CMSinUse)
+	if (ScCore->haveCMS() && tempDoc->cmsSettings().CMSinUse)
 		recalcColors();
 	//CB NOTE should be all done now
 	tempDoc->setPage(width, height, topMargin, leftMargin, rightMargin, bottomMargin, columnCount, columnDistance, autoTextFrames, pageArrangement);
@@ -3531,7 +3531,7 @@
 			return false;
 		}
 		delete fl;
-		if (ScCore->haveCMS() && doc->CMSSettings.CMSinUse)
+		if (ScCore->haveCMS() && doc->cmsSettings().CMSinUse)
 		{
 			recalcColors();
 			doc->RecalcPictures(&ScCore->InputProfiles, &ScCore->InputProfilesCMYK);
@@ -3724,75 +3724,75 @@
 		}
 
 		//connect(w, SIGNAL(Schliessen()), this, SLOT(DoFileClose()));
-		if (!doc->CMSSettings.CMSinUse)
+		if (!doc->cmsSettings().CMSinUse)
 			doc->HasCMS = false;
-		if ((ScCore->haveCMS()) && (doc->CMSSettings.CMSinUse))
+		if ((ScCore->haveCMS()) && (doc->cmsSettings().CMSinUse))
 		{
 			bool cmsWarning = false;
 			QStringList missing;
 			QStringList replacement;
-			if (!ScCore->InputProfiles.contains(doc->CMSSettings.DefaultImageRGBProfile))
+			if (!ScCore->InputProfiles.contains(doc->cmsSettings().DefaultImageRGBProfile))
 			{
 				cmsWarning = true;
-				missing.append(doc->CMSSettings.DefaultImageRGBProfile);
+				missing.append(doc->cmsSettings().DefaultImageRGBProfile);
 				replacement.append(prefsManager->appPrefs.colorPrefs.DCMSset.DefaultImageRGBProfile);
-				doc->CMSSettings.DefaultImageRGBProfile = prefsManager->appPrefs.colorPrefs.DCMSset.DefaultImageRGBProfile;
+				doc->cmsSettings().DefaultImageRGBProfile = prefsManager->appPrefs.colorPrefs.DCMSset.DefaultImageRGBProfile;
 			}
-			if (!ScCore->InputProfilesCMYK.contains(doc->CMSSettings.DefaultImageCMYKProfile))
+			if (!ScCore->InputProfilesCMYK.contains(doc->cmsSettings().DefaultImageCMYKProfile))
 			{
 				cmsWarning = true;
-				missing.append(doc->CMSSettings.DefaultImageCMYKProfile);
+				missing.append(doc->cmsSettings().DefaultImageCMYKProfile);
 				replacement.append(prefsManager->appPrefs.colorPrefs.DCMSset.DefaultImageCMYKProfile);
-				doc->CMSSettings.DefaultImageCMYKProfile = prefsManager->appPrefs.colorPrefs.DCMSset.DefaultImageCMYKProfile;
+				doc->cmsSettings().DefaultImageCMYKProfile = prefsManager->appPrefs.colorPrefs.DCMSset.DefaultImageCMYKProfile;
 			}
-			if (!ScCore->InputProfiles.contains(doc->CMSSettings.DefaultSolidColorRGBProfile))
+			if (!ScCore->InputProfiles.contains(doc->cmsSettings().DefaultSolidColorRGBProfile))
 			{
 				cmsWarning = true;
-				missing.append(doc->CMSSettings.DefaultSolidColorRGBProfile);
+				missing.append(doc->cmsSettings().DefaultSolidColorRGBProfile);
 				replacement.append(prefsManager->appPrefs.colorPrefs.DCMSset.DefaultSolidColorRGBProfile);
-				doc->CMSSettings.DefaultSolidColorRGBProfile = prefsManager->appPrefs.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
+				doc->cmsSettings().DefaultSolidColorRGBProfile = prefsManager->appPrefs.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
 			}
-			if (!ScCore->InputProfilesCMYK.contains(doc->CMSSettings.DefaultSolidColorCMYKProfile))
+			if (!ScCore->InputProfilesCMYK.contains(doc->cmsSettings().DefaultSolidColorCMYKProfile))
 			{
 				cmsWarning = true;
-				missing.append(doc->CMSSettings.DefaultSolidColorCMYKProfile);
+				missing.append(doc->cmsSettings().DefaultSolidColorCMYKProfile);
 				replacement.append(prefsManager->appPrefs.colorPrefs.DCMSset.DefaultSolidColorCMYKProfile);
-				doc->CMSSettings.DefaultSolidColorCMYKProfile = prefsManager->appPrefs.colorPrefs.DCMSset.DefaultSolidColorCMYKProfile;
+				doc->cmsSettings().DefaultSolidColorCMYKProfile = prefsManager->appPrefs.colorPrefs.DCMSset.DefaultSolidColorCMYKProfile;
 			}
-			if (!ScCore->MonitorProfiles.contains(doc->CMSSettings.DefaultMonitorProfile))
+			if (!ScCore->MonitorProfiles.contains(doc->cmsSettings().DefaultMonitorProfile))
 			{
 				cmsWarning = true;
-				missing.append(doc->CMSSettings.DefaultMonitorProfile);
+				missing.append(doc->cmsSettings().DefaultMonitorProfile);
 				replacement.append(prefsManager->appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile);
-				doc->CMSSettings.DefaultMonitorProfile = prefsManager->appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile;
+				doc->cmsSettings().DefaultMonitorProfile = prefsManager->appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile;
 			}
-			if (!ScCore->PrinterProfiles.contains(doc->CMSSettings.DefaultPrinterProfile))
+			if (!ScCore->PrinterProfiles.contains(doc->cmsSettings().DefaultPrinterProfile))
 			{
 				cmsWarning = true;
-				missing.append(doc->CMSSettings.DefaultPrinterProfile);
+				missing.append(doc->cmsSettings().DefaultPrinterProfile);
 				replacement.append(prefsManager->appPrefs.colorPrefs.DCMSset.DefaultPrinterProfile);
-				doc->CMSSettings.DefaultPrinterProfile = prefsManager->appPrefs.colorPrefs.DCMSset.DefaultPrinterProfile;
+				doc->cmsSettings().DefaultPrinterProfile = prefsManager->appPrefs.colorPrefs.DCMSset.DefaultPrinterProfile;
 			}
 			if (!ScCore->PrinterProfiles.contains(doc->pdfOptions().PrintProf))
 			{
 				cmsWarning = true;
 				missing.append(doc->pdfOptions().PrintProf);
 				replacement.append(prefsManager->appPrefs.colorPrefs.DCMSset.DefaultPrinterProfile);
-				doc->pdfOptions().PrintProf = doc->CMSSettings.DefaultPrinterProfile;
+				doc->pdfOptions().PrintProf = doc->cmsSettings().DefaultPrinterProfile;
 			}
 			if (!ScCore->InputProfiles.contains(doc->pdfOptions().ImageProf))
 			{
 				cmsWarning = true;
 				missing.append(doc->pdfOptions().ImageProf);
 				replacement.append(prefsManager->appPrefs.colorPrefs.DCMSset.DefaultImageRGBProfile);
-				doc->pdfOptions().ImageProf = doc->CMSSettings.DefaultImageRGBProfile;
+				doc->pdfOptions().ImageProf = doc->cmsSettings().DefaultImageRGBProfile;
 			}
 			if (!ScCore->InputProfiles.contains(doc->pdfOptions().SolidProf))
 			{
 				cmsWarning = true;
 				missing.append(doc->pdfOptions().SolidProf);
 				replacement.append(prefsManager->appPrefs.colorPrefs.DCMSset.DefaultSolidColorRGBProfile);
-				doc->pdfOptions().SolidProf = doc->CMSSettings.DefaultSolidColorRGBProfile;
+				doc->pdfOptions().SolidProf = doc->cmsSettings().DefaultSolidColorRGBProfile;
 			}
 			if (cmsWarning)
 			{
@@ -3804,14 +3804,14 @@
 				}
 				QMessageBox::warning(this, CommonStrings::trWarning, mess, 1, 0, 0);
 			}
-			doc->SoftProofing = doc->CMSSettings.SoftProofOn;
-			doc->Gamut        = doc->CMSSettings.GamutCheck;
-			doc->IntentColors = doc->CMSSettings.DefaultIntentColors;
-			doc->IntentImages = doc->CMSSettings.DefaultIntentImages;
+			doc->SoftProofing = doc->cmsSettings().SoftProofOn;
+			doc->Gamut        = doc->cmsSettings().GamutCheck;
+			doc->IntentColors = doc->cmsSettings().DefaultIntentColors;
+			doc->IntentImages = doc->cmsSettings().DefaultIntentImages;
 			if (doc->OpenCMSProfiles(ScCore->InputProfiles, ScCore->InputProfilesCMYK, ScCore->MonitorProfiles, ScCore->PrinterProfiles))
 			{
 				doc->HasCMS = true;
-				doc->pdfOptions().SComp = doc->CMSSettings.ComponentsInput2;
+				doc->pdfOptions().SComp = doc->cmsSettings().ComponentsInput2;
 			}
 			else
 			{
@@ -3826,7 +3826,7 @@
 		}
 		else
 		{
-			doc->CMSSettings.CMSinUse = false;
+			doc->cmsSettings().CMSinUse = false;
 		}
 //		propertiesPalette->updateColorList();
 //		propertiesPalette->Cpal->ChooseGrad(0);
@@ -4003,8 +4003,8 @@
 				currItem->EmProfile = "";
 				currItem->pixm.imgInfo.isRequest = false;
 				currItem->UseEmbedded = true;
-				currItem->IProfile = doc->CMSSettings.DefaultImageRGBProfile;
-				currItem->IRender = doc->CMSSettings.DefaultIntentImages;
+				currItem->IProfile = doc->cmsSettings().DefaultImageRGBProfile;
+				currItem->IRender = doc->cmsSettings().DefaultIntentImages;
 				qApp->changeOverrideCursor( QCursor(Qt::WaitCursor) );
 				qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
 				doc->LoadPict(fileName, currItem->ItemNr, false, true);
@@ -4085,8 +4085,8 @@
 					currItem->EmProfile = "";
 					currItem->pixm.imgInfo.isRequest = false;
 					currItem->UseEmbedded = true;
-					currItem->IProfile = doc->CMSSettings.DefaultImageRGBProfile;
-					currItem->IRender = doc->CMSSettings.DefaultIntentImages;
+					currItem->IProfile = doc->cmsSettings().DefaultImageRGBProfile;
+					currItem->IRender = doc->cmsSettings().DefaultIntentImages;
 					qApp->changeOverrideCursor( QCursor(Qt::WaitCursor) );
 					qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
 					currItem->tempImageFile = new QTemporaryFile(QDir::tempPath() + "/scribus_temp_XXXXXX.png");
@@ -7673,7 +7673,7 @@
 	if (prefsResult==QDialog::Accepted)
 	{
 		struct ApplicationPrefs newDocPrefs(prefsDialog.prefs());
-		doc->setNewPrefs(newDocPrefs);
+		doc->setNewPrefs(newDocPrefs, oldDocPrefs);
 
 
 		slotChangeUnit(doc->unitIndex(), false);
@@ -9601,8 +9601,8 @@
 			{
 				imageItem->EmProfile = "";
 				imageItem->pixm.imgInfo.isRequest = false;
-				imageItem->IProfile = doc->CMSSettings.DefaultImageRGBProfile;
-				imageItem->IRender  = doc->CMSSettings.DefaultIntentImages;
+				imageItem->IProfile = doc->cmsSettings().DefaultImageRGBProfile;
+				imageItem->IRender  = doc->cmsSettings().DefaultIntentImages;
 				imageItem->effectsInUse = contentsBuffer.effects;
 				qApp->changeOverrideCursor( QCursor(Qt::WaitCursor) );
 				qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
Index: scribus/plugins/fileloader/scribus12format/scribus12format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus12format/scribus12format.cpp	(revision 15000)
+++ scribus/plugins/fileloader/scribus12format/scribus12format.cpp	(revision 15001)
@@ -337,21 +337,21 @@
 		m_Doc->typographicPrefs().autoLineSpacing = dc.attribute("AUTOL", "20").toInt();
 		m_Doc->GroupCounter = 1 /*dc.attribute("GROUPC", "1").toInt()*/;
 		//m_Doc->HasCMS = static_cast<bool>(dc.attribute("HCMS", "0").toInt());
-		m_Doc->CMSSettings.SoftProofOn = static_cast<bool>(dc.attribute("DPSo", "0").toInt());
-		m_Doc->CMSSettings.SoftProofFullOn = static_cast<bool>(dc.attribute("DPSFo", "0").toInt());
-		m_Doc->CMSSettings.CMSinUse = static_cast<bool>(dc.attribute("DPuse", "0").toInt());
-		m_Doc->CMSSettings.GamutCheck = static_cast<bool>(dc.attribute("DPgam", "0").toInt());
-		m_Doc->CMSSettings.BlackPoint = static_cast<bool>(dc.attribute("DPbla", "1").toInt());
-		m_Doc->CMSSettings.DefaultMonitorProfile = dc.attribute("DPMo","");
-		m_Doc->CMSSettings.DefaultPrinterProfile = dc.attribute("DPPr","");
-		m_Doc->CMSSettings.DefaultImageRGBProfile = dc.attribute("DPIn","");
-		m_Doc->CMSSettings.DefaultImageCMYKProfile = dc.attribute("DPPr",""); // Use DPPr to match 1.2.x behavior
-		m_Doc->CMSSettings.DefaultSolidColorRGBProfile = dc.attribute("DPIn2","");
-		m_Doc->CMSSettings.DefaultSolidColorCMYKProfile = dc.attribute("DPPr",""); // Use DPPr to match 1.2.x behavior
+		m_Doc->cmsSettings().SoftProofOn = static_cast<bool>(dc.attribute("DPSo", "0").toInt());
+		m_Doc->cmsSettings().SoftProofFullOn = static_cast<bool>(dc.attribute("DPSFo", "0").toInt());
+		m_Doc->cmsSettings().CMSinUse = static_cast<bool>(dc.attribute("DPuse", "0").toInt());
+		m_Doc->cmsSettings().GamutCheck = static_cast<bool>(dc.attribute("DPgam", "0").toInt());
+		m_Doc->cmsSettings().BlackPoint = static_cast<bool>(dc.attribute("DPbla", "1").toInt());
+		m_Doc->cmsSettings().DefaultMonitorProfile = dc.attribute("DPMo","");
+		m_Doc->cmsSettings().DefaultPrinterProfile = dc.attribute("DPPr","");
+		m_Doc->cmsSettings().DefaultImageRGBProfile = dc.attribute("DPIn","");
+		m_Doc->cmsSettings().DefaultImageCMYKProfile = dc.attribute("DPPr",""); // Use DPPr to match 1.2.x behavior
+		m_Doc->cmsSettings().DefaultSolidColorRGBProfile = dc.attribute("DPIn2","");
+		m_Doc->cmsSettings().DefaultSolidColorCMYKProfile = dc.attribute("DPPr",""); // Use DPPr to match 1.2.x behavior
 		//m_Doc->CMSSettings.DefaultIntentPrinter = dc.attribute("DIPr", "0").toInt();
 		//m_Doc->CMSSettings.DefaultIntentMonitor = dc.attribute("DIMo", "1").toInt();
-		m_Doc->CMSSettings.DefaultIntentColors = (eRenderIntent) dc.attribute("DISc", "1").toInt();
-		m_Doc->CMSSettings.DefaultIntentImages = (eRenderIntent) dc.attribute("DIIm", "0").toInt();
+		m_Doc->cmsSettings().DefaultIntentColors = (eRenderIntent) dc.attribute("DISc", "1").toInt();
+		m_Doc->cmsSettings().DefaultIntentImages = (eRenderIntent) dc.attribute("DIIm", "0").toInt();
 		activeLayer = dc.attribute("ALAYER", "0").toInt();
 		m_Doc->setHyphLanguage(dc.attribute("LANGUAGE", ""));
 		m_Doc->setHyphMinimumWordLength(dc.attribute("MINWORDLEN", "3").toInt());
Index: scribus/plugins/fileloader/scribus13format/scribus13format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus13format/scribus13format.cpp	(revision 15000)
+++ scribus/plugins/fileloader/scribus13format/scribus13format.cpp	(revision 15001)
@@ -307,24 +307,24 @@
 		m_Doc->typographicPrefs().valueStrikeThruWidth = dc.attribute("StrikeThruWidth", "-1").toInt();
 		m_Doc->GroupCounter = 1 /*dc.attribute("GROUPC", "1").toInt()*/;
 		//m_Doc->HasCMS = static_cast<bool>(dc.attribute("HCMS", "0").toInt());
-		m_Doc->CMSSettings.SoftProofOn = static_cast<bool>(dc.attribute("DPSo", "0").toInt());
-		m_Doc->CMSSettings.SoftProofFullOn = static_cast<bool>(dc.attribute("DPSFo", "0").toInt());
-		m_Doc->CMSSettings.CMSinUse = static_cast<bool>(dc.attribute("DPuse", "0").toInt());
-		m_Doc->CMSSettings.GamutCheck = static_cast<bool>(dc.attribute("DPgam", "0").toInt());
-		m_Doc->CMSSettings.BlackPoint = static_cast<bool>(dc.attribute("DPbla", "1").toInt());
-		m_Doc->CMSSettings.DefaultMonitorProfile = dc.attribute("DPMo","");
-		m_Doc->CMSSettings.DefaultPrinterProfile = dc.attribute("DPPr","");
-		m_Doc->CMSSettings.DefaultImageRGBProfile = dc.attribute("DPIn","");
-		m_Doc->CMSSettings.DefaultImageCMYKProfile = dc.attribute("DPInCMYK","");
-		m_Doc->CMSSettings.DefaultSolidColorRGBProfile = dc.attribute("DPIn2","");
+		m_Doc->cmsSettings().SoftProofOn = static_cast<bool>(dc.attribute("DPSo", "0").toInt());
+		m_Doc->cmsSettings().SoftProofFullOn = static_cast<bool>(dc.attribute("DPSFo", "0").toInt());
+		m_Doc->cmsSettings().CMSinUse = static_cast<bool>(dc.attribute("DPuse", "0").toInt());
+		m_Doc->cmsSettings().GamutCheck = static_cast<bool>(dc.attribute("DPgam", "0").toInt());
+		m_Doc->cmsSettings().BlackPoint = static_cast<bool>(dc.attribute("DPbla", "1").toInt());
+		m_Doc->cmsSettings().DefaultMonitorProfile = dc.attribute("DPMo","");
+		m_Doc->cmsSettings().DefaultPrinterProfile = dc.attribute("DPPr","");
+		m_Doc->cmsSettings().DefaultImageRGBProfile = dc.attribute("DPIn","");
+		m_Doc->cmsSettings().DefaultImageCMYKProfile = dc.attribute("DPInCMYK","");
+		m_Doc->cmsSettings().DefaultSolidColorRGBProfile = dc.attribute("DPIn2","");
 		if (dc.hasAttribute("DPIn3"))
-			m_Doc->CMSSettings.DefaultSolidColorCMYKProfile = dc.attribute("DPIn3","");
+			m_Doc->cmsSettings().DefaultSolidColorCMYKProfile = dc.attribute("DPIn3","");
 		else
-			m_Doc->CMSSettings.DefaultSolidColorCMYKProfile = dc.attribute("DPPr","");
+			m_Doc->cmsSettings().DefaultSolidColorCMYKProfile = dc.attribute("DPPr","");
 		//m_Doc->CMSSettings.DefaultIntentPrinter = dc.attribute("DIPr", "0").toInt();
 		//m_Doc->CMSSettings.DefaultIntentMonitor = dc.attribute("DIMo", "1").toInt();
-		m_Doc->CMSSettings.DefaultIntentColors = (eRenderIntent) dc.attribute("DISc", "1").toInt();
-		m_Doc->CMSSettings.DefaultIntentImages = (eRenderIntent) dc.attribute("DIIm", "0").toInt();
+		m_Doc->cmsSettings().DefaultIntentColors = (eRenderIntent) dc.attribute("DISc", "1").toInt();
+		m_Doc->cmsSettings().DefaultIntentImages = (eRenderIntent) dc.attribute("DIIm", "0").toInt();
 		layerToSetActive=dc.attribute("ALAYER", "0").toInt();
 		m_Doc->setHyphLanguage(dc.attribute("LANGUAGE", ""));
 		m_Doc->setHyphMinimumWordLength(dc.attribute("MINWORDLEN", "3").toInt());
@@ -1238,19 +1238,19 @@
 	dc.setAttribute("StrikeThruWidth", m_Doc->typographicPrefs().valueStrikeThruWidth);
 	dc.setAttribute("GROUPC",m_Doc->GroupCounter);
 	dc.setAttribute("HCMS", static_cast<int>(m_Doc->HasCMS));
-	dc.setAttribute("DPSo", static_cast<int>(m_Doc->CMSSettings.SoftProofOn));
-	dc.setAttribute("DPSFo", static_cast<int>(m_Doc->CMSSettings.SoftProofFullOn));
-	dc.setAttribute("DPuse", static_cast<int>(m_Doc->CMSSettings.CMSinUse));
-	dc.setAttribute("DPgam", static_cast<int>(m_Doc->CMSSettings.GamutCheck));
-	dc.setAttribute("DPbla", static_cast<int>(m_Doc->CMSSettings.BlackPoint));
-	dc.setAttribute("DPMo",m_Doc->CMSSettings.DefaultMonitorProfile);
-	dc.setAttribute("DPPr",m_Doc->CMSSettings.DefaultPrinterProfile);
-	dc.setAttribute("DPIn",m_Doc->CMSSettings.DefaultImageRGBProfile);
-	dc.setAttribute("DPInCMYK",m_Doc->CMSSettings.DefaultImageCMYKProfile);
-	dc.setAttribute("DPIn2",m_Doc->CMSSettings.DefaultSolidColorRGBProfile);
-	dc.setAttribute("DPIn3",m_Doc->CMSSettings.DefaultSolidColorCMYKProfile);
-	dc.setAttribute("DISc",m_Doc->CMSSettings.DefaultIntentColors);
-	dc.setAttribute("DIIm",m_Doc->CMSSettings.DefaultIntentImages);
+	dc.setAttribute("DPSo", static_cast<int>(m_Doc->cmsSettings().SoftProofOn));
+	dc.setAttribute("DPSFo", static_cast<int>(m_Doc->cmsSettings().SoftProofFullOn));
+	dc.setAttribute("DPuse", static_cast<int>(m_Doc->cmsSettings().CMSinUse));
+	dc.setAttribute("DPgam", static_cast<int>(m_Doc->cmsSettings().GamutCheck));
+	dc.setAttribute("DPbla", static_cast<int>(m_Doc->cmsSettings().BlackPoint));
+	dc.setAttribute("DPMo",m_Doc->cmsSettings().DefaultMonitorProfile);
+	dc.setAttribute("DPPr",m_Doc->cmsSettings().DefaultPrinterProfile);
+	dc.setAttribute("DPIn",m_Doc->cmsSettings().DefaultImageRGBProfile);
+	dc.setAttribute("DPInCMYK",m_Doc->cmsSettings().DefaultImageCMYKProfile);
+	dc.setAttribute("DPIn2",m_Doc->cmsSettings().DefaultSolidColorRGBProfile);
+	dc.setAttribute("DPIn3",m_Doc->cmsSettings().DefaultSolidColorCMYKProfile);
+	dc.setAttribute("DISc",m_Doc->cmsSettings().DefaultIntentColors);
+	dc.setAttribute("DIIm",m_Doc->cmsSettings().DefaultIntentImages);
 	dc.setAttribute("ALAYER", m_Doc->activeLayer());
 	dc.setAttribute("LANGUAGE", m_Doc->hyphLanguage());
 	dc.setAttribute("MINWORDLEN", m_Doc->hyphMinimumWordLength());
Index: scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
===================================================================
--- scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	(revision 15000)
+++ scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	(revision 15001)
@@ -136,19 +136,19 @@
 	docu.writeAttribute("StrikeThruWidth", m_Doc->typographicPrefs().valueStrikeThruWidth);
 	docu.writeAttribute("GROUPC",m_Doc->GroupCounter);
 	docu.writeAttribute("HCMS" , static_cast<int>(m_Doc->HasCMS));
-	docu.writeAttribute("DPSo" , static_cast<int>(m_Doc->CMSSettings.SoftProofOn));
-	docu.writeAttribute("DPSFo", static_cast<int>(m_Doc->CMSSettings.SoftProofFullOn));
-	docu.writeAttribute("DPuse", static_cast<int>(m_Doc->CMSSettings.CMSinUse));
-	docu.writeAttribute("DPgam", static_cast<int>(m_Doc->CMSSettings.GamutCheck));
-	docu.writeAttribute("DPbla", static_cast<int>(m_Doc->CMSSettings.BlackPoint));
-	docu.writeAttribute("DPMo",m_Doc->CMSSettings.DefaultMonitorProfile);
-	docu.writeAttribute("DPPr",m_Doc->CMSSettings.DefaultPrinterProfile);
-	docu.writeAttribute("DPIn",m_Doc->CMSSettings.DefaultImageRGBProfile);
-	docu.writeAttribute("DPInCMYK",m_Doc->CMSSettings.DefaultImageCMYKProfile);
-	docu.writeAttribute("DPIn2",m_Doc->CMSSettings.DefaultSolidColorRGBProfile);
-	docu.writeAttribute("DPIn3",m_Doc->CMSSettings.DefaultSolidColorCMYKProfile);
-	docu.writeAttribute("DISc",m_Doc->CMSSettings.DefaultIntentColors);
-	docu.writeAttribute("DIIm",m_Doc->CMSSettings.DefaultIntentImages);
+	docu.writeAttribute("DPSo" , static_cast<int>(m_Doc->cmsSettings().SoftProofOn));
+	docu.writeAttribute("DPSFo", static_cast<int>(m_Doc->cmsSettings().SoftProofFullOn));
+	docu.writeAttribute("DPuse", static_cast<int>(m_Doc->cmsSettings().CMSinUse));
+	docu.writeAttribute("DPgam", static_cast<int>(m_Doc->cmsSettings().GamutCheck));
+	docu.writeAttribute("DPbla", static_cast<int>(m_Doc->cmsSettings().BlackPoint));
+	docu.writeAttribute("DPMo",m_Doc->cmsSettings().DefaultMonitorProfile);
+	docu.writeAttribute("DPPr",m_Doc->cmsSettings().DefaultPrinterProfile);
+	docu.writeAttribute("DPIn",m_Doc->cmsSettings().DefaultImageRGBProfile);
+	docu.writeAttribute("DPInCMYK",m_Doc->cmsSettings().DefaultImageCMYKProfile);
+	docu.writeAttribute("DPIn2",m_Doc->cmsSettings().DefaultSolidColorRGBProfile);
+	docu.writeAttribute("DPIn3",m_Doc->cmsSettings().DefaultSolidColorCMYKProfile);
+	docu.writeAttribute("DISc",m_Doc->cmsSettings().DefaultIntentColors);
+	docu.writeAttribute("DIIm",m_Doc->cmsSettings().DefaultIntentImages);
 	docu.writeAttribute("ALAYER", m_Doc->activeLayer());
 	docu.writeAttribute("LANGUAGE", m_Doc->hyphLanguage());
 	docu.writeAttribute("MINWORDLEN", m_Doc->hyphMinimumWordLength());
Index: scribus/plugins/fileloader/scribus150format/scribus150format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(revision 15000)
+++ scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(revision 15001)
@@ -799,22 +799,22 @@
 
 void Scribus150Format::readCMSSettings(ScribusDoc* doc, ScXmlStreamAttributes& attrs)
 {
-	doc->CMSSettings.SoftProofOn     = attrs.valueAsBool("DPSo", false);
-	doc->CMSSettings.SoftProofFullOn = attrs.valueAsBool("DPSFo", false);
-	doc->CMSSettings.CMSinUse   = attrs.valueAsBool("DPuse", false);
-	doc->CMSSettings.GamutCheck = attrs.valueAsBool("DPgam", false);
-	doc->CMSSettings.BlackPoint = attrs.valueAsBool("DPbla", true);
-	doc->CMSSettings.DefaultMonitorProfile   = attrs.valueAsString("DPMo","");
-	doc->CMSSettings.DefaultPrinterProfile   = attrs.valueAsString("DPPr","");
-	doc->CMSSettings.DefaultImageRGBProfile  = attrs.valueAsString("DPIn","");
-	doc->CMSSettings.DefaultImageCMYKProfile = attrs.valueAsString("DPInCMYK","");
-	doc->CMSSettings.DefaultSolidColorRGBProfile = attrs.valueAsString("DPIn2","");
+	doc->cmsSettings().SoftProofOn     = attrs.valueAsBool("DPSo", false);
+	doc->cmsSettings().SoftProofFullOn = attrs.valueAsBool("DPSFo", false);
+	doc->cmsSettings().CMSinUse   = attrs.valueAsBool("DPuse", false);
+	doc->cmsSettings().GamutCheck = attrs.valueAsBool("DPgam", false);
+	doc->cmsSettings().BlackPoint = attrs.valueAsBool("DPbla", true);
+	doc->cmsSettings().DefaultMonitorProfile   = attrs.valueAsString("DPMo","");
+	doc->cmsSettings().DefaultPrinterProfile   = attrs.valueAsString("DPPr","");
+	doc->cmsSettings().DefaultImageRGBProfile  = attrs.valueAsString("DPIn","");
+	doc->cmsSettings().DefaultImageCMYKProfile = attrs.valueAsString("DPInCMYK","");
+	doc->cmsSettings().DefaultSolidColorRGBProfile = attrs.valueAsString("DPIn2","");
 	if (attrs.hasAttribute("DPIn3"))
-		doc->CMSSettings.DefaultSolidColorCMYKProfile = attrs.valueAsString("DPIn3","");
+		doc->cmsSettings().DefaultSolidColorCMYKProfile = attrs.valueAsString("DPIn3","");
 	else
-		doc->CMSSettings.DefaultSolidColorCMYKProfile = attrs.valueAsString("DPPr","");
-	doc->CMSSettings.DefaultIntentColors = (eRenderIntent) attrs.valueAsInt("DISc", 1);
-	doc->CMSSettings.DefaultIntentImages = (eRenderIntent) attrs.valueAsInt("DIIm", 0);
+		doc->cmsSettings().DefaultSolidColorCMYKProfile = attrs.valueAsString("DPPr","");
+	doc->cmsSettings().DefaultIntentColors = (eRenderIntent) attrs.valueAsInt("DISc", 1);
+	doc->cmsSettings().DefaultIntentImages = (eRenderIntent) attrs.valueAsInt("DIIm", 0);
 }
 
 void Scribus150Format::readDocumentInfo(ScribusDoc* doc, ScXmlStreamAttributes& attrs)
Index: scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp	(revision 15000)
+++ scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp	(revision 15001)
@@ -133,19 +133,19 @@
 	docu.writeAttribute("StrikeThruWidth", m_Doc->typographicPrefs().valueStrikeThruWidth);
 	docu.writeAttribute("GROUPC",m_Doc->GroupCounter);
 	docu.writeAttribute("HCMS" , static_cast<int>(m_Doc->HasCMS));
-	docu.writeAttribute("DPSo" , static_cast<int>(m_Doc->CMSSettings.SoftProofOn));
-	docu.writeAttribute("DPSFo", static_cast<int>(m_Doc->CMSSettings.SoftProofFullOn));
-	docu.writeAttribute("DPuse", static_cast<int>(m_Doc->CMSSettings.CMSinUse));
-	docu.writeAttribute("DPgam", static_cast<int>(m_Doc->CMSSettings.GamutCheck));
-	docu.writeAttribute("DPbla", static_cast<int>(m_Doc->CMSSettings.BlackPoint));
-	docu.writeAttribute("DPMo",m_Doc->CMSSettings.DefaultMonitorProfile);
-	docu.writeAttribute("DPPr",m_Doc->CMSSettings.DefaultPrinterProfile);
-	docu.writeAttribute("DPIn",m_Doc->CMSSettings.DefaultImageRGBProfile);
-	docu.writeAttribute("DPInCMYK",m_Doc->CMSSettings.DefaultImageCMYKProfile);
-	docu.writeAttribute("DPIn2",m_Doc->CMSSettings.DefaultSolidColorRGBProfile);
-	docu.writeAttribute("DPIn3",m_Doc->CMSSettings.DefaultSolidColorCMYKProfile);
-	docu.writeAttribute("DISc",m_Doc->CMSSettings.DefaultIntentColors);
-	docu.writeAttribute("DIIm",m_Doc->CMSSettings.DefaultIntentImages);
+	docu.writeAttribute("DPSo" , static_cast<int>(m_Doc->cmsSettings().SoftProofOn));
+	docu.writeAttribute("DPSFo", static_cast<int>(m_Doc->cmsSettings().SoftProofFullOn));
+	docu.writeAttribute("DPuse", static_cast<int>(m_Doc->cmsSettings().CMSinUse));
+	docu.writeAttribute("DPgam", static_cast<int>(m_Doc->cmsSettings().GamutCheck));
+	docu.writeAttribute("DPbla", static_cast<int>(m_Doc->cmsSettings().BlackPoint));
+	docu.writeAttribute("DPMo",m_Doc->cmsSettings().DefaultMonitorProfile);
+	docu.writeAttribute("DPPr",m_Doc->cmsSettings().DefaultPrinterProfile);
+	docu.writeAttribute("DPIn",m_Doc->cmsSettings().DefaultImageRGBProfile);
+	docu.writeAttribute("DPInCMYK",m_Doc->cmsSettings().DefaultImageCMYKProfile);
+	docu.writeAttribute("DPIn2",m_Doc->cmsSettings().DefaultSolidColorRGBProfile);
+	docu.writeAttribute("DPIn3",m_Doc->cmsSettings().DefaultSolidColorCMYKProfile);
+	docu.writeAttribute("DISc",m_Doc->cmsSettings().DefaultIntentColors);
+	docu.writeAttribute("DIIm",m_Doc->cmsSettings().DefaultIntentImages);
 	docu.writeAttribute("ALAYER", m_Doc->activeLayer());
 	docu.writeAttribute("LANGUAGE", m_Doc->hyphLanguage());
 	docu.writeAttribute("MINWORDLEN", m_Doc->hyphMinimumWordLength());
Index: scribus/plugins/fileloader/scribus134format/scribus134format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(revision 15000)
+++ scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(revision 15001)
@@ -794,22 +794,22 @@
 
 void Scribus134Format::readCMSSettings(ScribusDoc* doc, ScXmlStreamAttributes& attrs)
 {
-	doc->CMSSettings.SoftProofOn     = attrs.valueAsBool("DPSo", false);
-	doc->CMSSettings.SoftProofFullOn = attrs.valueAsBool("DPSFo", false);
-	doc->CMSSettings.CMSinUse   = attrs.valueAsBool("DPuse", false);
-	doc->CMSSettings.GamutCheck = attrs.valueAsBool("DPgam", false);
-	doc->CMSSettings.BlackPoint = attrs.valueAsBool("DPbla", true);
-	doc->CMSSettings.DefaultMonitorProfile   = attrs.valueAsString("DPMo","");
-	doc->CMSSettings.DefaultPrinterProfile   = attrs.valueAsString("DPPr","");
-	doc->CMSSettings.DefaultImageRGBProfile  = attrs.valueAsString("DPIn","");
-	doc->CMSSettings.DefaultImageCMYKProfile = attrs.valueAsString("DPInCMYK","");
-	doc->CMSSettings.DefaultSolidColorRGBProfile = attrs.valueAsString("DPIn2","");
+	doc->cmsSettings().SoftProofOn     = attrs.valueAsBool("DPSo", false);
+	doc->cmsSettings().SoftProofFullOn = attrs.valueAsBool("DPSFo", false);
+	doc->cmsSettings().CMSinUse   = attrs.valueAsBool("DPuse", false);
+	doc->cmsSettings().GamutCheck = attrs.valueAsBool("DPgam", false);
+	doc->cmsSettings().BlackPoint = attrs.valueAsBool("DPbla", true);
+	doc->cmsSettings().DefaultMonitorProfile   = attrs.valueAsString("DPMo","");
+	doc->cmsSettings().DefaultPrinterProfile   = attrs.valueAsString("DPPr","");
+	doc->cmsSettings().DefaultImageRGBProfile  = attrs.valueAsString("DPIn","");
+	doc->cmsSettings().DefaultImageCMYKProfile = attrs.valueAsString("DPInCMYK","");
+	doc->cmsSettings().DefaultSolidColorRGBProfile = attrs.valueAsString("DPIn2","");
 	if (attrs.hasAttribute("DPIn3"))
-		doc->CMSSettings.DefaultSolidColorCMYKProfile = attrs.valueAsString("DPIn3","");
+		doc->cmsSettings().DefaultSolidColorCMYKProfile = attrs.valueAsString("DPIn3","");
 	else
-		doc->CMSSettings.DefaultSolidColorCMYKProfile = attrs.valueAsString("DPPr","");
-	doc->CMSSettings.DefaultIntentColors = (eRenderIntent) attrs.valueAsInt("DISc", 1);
-	doc->CMSSettings.DefaultIntentImages = (eRenderIntent) attrs.valueAsInt("DIIm", 0);
+		doc->cmsSettings().DefaultSolidColorCMYKProfile = attrs.valueAsString("DPPr","");
+	doc->cmsSettings().DefaultIntentColors = (eRenderIntent) attrs.valueAsInt("DISc", 1);
+	doc->cmsSettings().DefaultIntentImages = (eRenderIntent) attrs.valueAsInt("DIIm", 0);
 }
 
 void Scribus134Format::readDocumentInfo(ScribusDoc* doc, ScXmlStreamAttributes& attrs)




More information about the scribus-commit mailing list