Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 5880 → Rev 5877

/branches/Version13x/Scribus/scribus/prefs.cpp
51,6 → 51,8
using namespace std;
 
extern QPixmap loadIcon(QString nam);
extern bool CMSavail;
extern bool CMSuse;
extern ScribusQApp* ScQApp;
 
 
97,7 → 99,7
tabDocChecker = new TabCheckDoc( prefsWidgets, prefsData->checkerProfiles, prefsData->curCheckProfile);
addItem( tr("Preflight Verifier"), loadIcon("checkdoc.png"), tabDocChecker);
 
if (ScCore->haveCMS())
if (CMSavail)
{
tabColorManagement = new CMSPrefs(prefsWidgets, &prefsData->DCMSset, &ScCore->InputProfiles, &ScCore->InputProfilesCMYK, &ScCore->PrinterProfiles, &ScCore->MonitorProfiles);
addItem( tr("Color Management"), loadIcon("blend.png"), tabColorManagement);
165,7 → 167,7
connect(tabDocument->unitCombo, SIGNAL(activated(int)), this, SLOT(unitChange()));
connect(tabDocument->docLayout, SIGNAL( selectedLayout(int) ), this, SLOT( setDS(int) ) );
connect(buttonOk, SIGNAL(clicked()), this, SLOT(setActionHistoryLength()));
if (ScCore->haveCMS())
if (CMSavail)
connect(tabColorManagement, SIGNAL(cmsOn(bool )), this, SLOT(switchCMS(bool )));
connect(applyChangesButton, SIGNAL(clicked()), this, SLOT(applyChangesButton_clicked()));
connect(backToDefaults, SIGNAL(clicked()), this, SLOT(backToDefaults_clicked()));
177,7 → 179,7
disconnect(tabDocument->unitCombo, SIGNAL(activated(int)), this, SLOT(unitChange()));
disconnect(tabDocument->docLayout, SIGNAL( selectedLayout(int) ), this, SLOT( setDS(int) ) );
disconnect(buttonOk, SIGNAL(clicked()), this, SLOT(setActionHistoryLength()));
if (ScCore->haveCMS())
if (CMSavail)
disconnect(tabColorManagement, SIGNAL(cmsOn(bool )), this, SLOT(switchCMS(bool )));
disconnect(applyChangesButton, SIGNAL(clicked()), this, SLOT(applyChangesButton_clicked()));
disconnect(backToDefaults, SIGNAL(clicked()), this, SLOT(backToDefaults_clicked()));
220,7 → 222,7
docUnitIndex,
prefsData->PageHeight,
prefsData->PageWidth,
0, false);
0);
 
tabColorManagement->restoreDefaults(&prefsData->DCMSset, &ScCore->InputProfiles,
&ScCore->InputProfilesCMYK,
539,7 → 541,7
prefsManager->appPrefs.Automatic = !tabHyphenator->verbose->isChecked();
prefsManager->appPrefs.AutoCheck = tabHyphenator->input->isChecked();
prefsManager->appPrefs.HyCount = tabHyphenator->maxCount->value();
if (ScCore->haveCMS())
if (CMSavail)
tabColorManagement->setValues();
uint a = 0;
SCFontsIterator it(prefsManager->appPrefs.AvailFonts);
623,7 → 625,7
prefsManager->appPrefs.PDF_Options.isGrayscale = false;
prefsManager->appPrefs.PDF_Options.UseRGB = false;
#ifdef HAVE_CMS
if (/*CMSuse*/ ScCore->haveCMS())
if (CMSuse)
{
prefsManager->appPrefs.PDF_Options.UseProfiles = tabPDF->EmbedProfs->isChecked();
prefsManager->appPrefs.PDF_Options.UseProfiles2 = tabPDF->EmbedProfs2->isChecked();
/branches/Version13x/Scribus/scribus/scribus.cpp
185,6 → 185,29
 
using namespace std;
 
#ifdef HAVE_CMS
extern cmsHPROFILE CMSoutputProf;
extern cmsHPROFILE CMSprinterProf;
extern cmsHTRANSFORM stdTransRGBMonG;
extern cmsHTRANSFORM stdTransCMYKMonG;
extern cmsHTRANSFORM stdProofG;
extern cmsHTRANSFORM stdTransImgG;
extern cmsHTRANSFORM stdProofImgG;
extern cmsHTRANSFORM stdTransCMYKG;
extern cmsHTRANSFORM stdProofCMYKG;
extern cmsHTRANSFORM stdTransRGBG;
extern cmsHTRANSFORM stdProofGCG;
extern cmsHTRANSFORM stdProofCMYKGCG;
extern bool BlackPoint;
extern bool SoftProofing;
extern bool Gamut;
extern bool SCRIBUS_API CMSuse;
extern int IntentColors;
extern int IntentImages;
#endif
extern bool CMSavail;
 
 
bool previewDinUse;
bool printDinUse;
 
1814,7 → 1837,7
doc->setup(unitIndex, pageArrangement, firstPageLocation, orientation, firstPageNumber, defaultPageSize, newDocName);
HaveDoc++;
DocNr++;
if (ScCore->haveCMS() && doc->CMSSettings.CMSinUse)
if (CMSavail && doc->CMSSettings.CMSinUse)
recalcColors();
//CB NOTE should be all done now
doc->setPage(width, height, topMargin, leftMargin, rightMargin, bottomMargin, columnDistance, columnCount, autoTextFrames, pageArrangement);
1902,7 → 1925,7
HaveDoc++;
DocNr++;
}
if (ScCore->haveCMS() && tempDoc->CMSSettings.CMSinUse)
if (CMSavail && tempDoc->CMSSettings.CMSinUse)
recalcColors();
//CB NOTE should be all done now
tempDoc->setPage(width, height, topMargin, leftMargin, rightMargin, bottomMargin, columnDistance, columnCount, autoTextFrames, pageArrangement);
2192,6 → 2215,25
{
updateColorMenu();
buildFontMenu();
#ifdef HAVE_CMS
SoftProofing = doc->SoftProofing;
Gamut = doc->Gamut;
IntentColors = doc->IntentColors;
IntentImages = doc->IntentImages;
stdProofG = doc->stdProof;
stdTransRGBMonG = doc->stdTransRGBMon;
stdTransCMYKMonG = doc->stdTransCMYKMon;
stdProofImgG = doc->stdProofImg;
stdTransImgG = doc->stdTransImg;
stdProofCMYKG = doc->stdProofCMYK;
stdTransCMYKG = doc->stdTransCMYK;
stdTransRGBG = doc->stdTransRGB;
stdProofGCG = doc->stdProofGC;
stdProofCMYKGCG = doc->stdProofCMYKGC;
CMSoutputProf = doc->DocOutputProf;
CMSprinterProf = doc->DocPrinterProf;
CMSuse = doc->CMSSettings.CMSinUse;
#endif
propertiesPalette->updateColorList();
propertiesPalette->Cpal->ChooseGrad(0);
ActWin->setCaption(doc->DocName);
3225,7 → 3267,7
return false;
}
delete fl;
if (ScCore->haveCMS() && doc->CMSSettings.CMSinUse)
if (CMSavail && doc->CMSSettings.CMSinUse)
{
recalcColors();
doc->RecalcPictures(&ScCore->InputProfiles, &ScCore->InputProfilesCMYK);
3347,8 → 3389,8
#ifdef HAVE_CMS
doc->SoftProofing = false;
doc->Gamut = false;
/*bool cmsu = CMSuse;
CMSuse = false;*/
bool cmsu = CMSuse;
CMSuse = false;
#endif
ScriptRunning = true;
bool loadSuccess=fileLoader->LoadFile(doc);
3383,7 → 3425,7
mainWindowStatusLabel->setText("");
mainWindowProgressBar->reset();
#ifdef HAVE_CMS
//CMSuse = cmsu;
CMSuse = cmsu;
#endif
HaveDoc++;
if (doc->checkerProfiles.count() == 0)
3424,7 → 3466,7
doc->CMSSettings.BlackPoint = prefsManager->appPrefs.DCMSset.BlackPoint;
doc->CMSSettings.CMSinUse = false;
}
if ((ScCore->haveCMS()) && (doc->CMSSettings.CMSinUse))
if ((CMSavail) && (doc->CMSSettings.CMSinUse))
{
bool cmsWarning = false;
QStringList missing;
3505,10 → 3547,28
#ifdef HAVE_CMS
doc->SoftProofing = doc->CMSSettings.SoftProofOn;
doc->Gamut = doc->CMSSettings.GamutCheck;
CMSuse = doc->CMSSettings.CMSinUse;
doc->IntentColors = doc->CMSSettings.DefaultIntentColors;
doc->IntentImages = doc->CMSSettings.DefaultIntentImages;
SoftProofing = doc->CMSSettings.SoftProofOn;
Gamut = doc->CMSSettings.GamutCheck;
IntentColors = doc->CMSSettings.DefaultIntentColors;
IntentImages = doc->CMSSettings.DefaultIntentImages;
if (doc->OpenCMSProfiles(ScCore->InputProfiles, ScCore->InputProfilesCMYK, ScCore->MonitorProfiles, ScCore->PrinterProfiles))
{
CMSuse = doc->CMSSettings.CMSinUse;
stdProofG = doc->stdProof;
stdTransRGBMonG = doc->stdTransRGBMon;
stdTransCMYKMonG = doc->stdTransCMYKMon;
stdProofImgG = doc->stdProofImg;
stdTransImgG = doc->stdTransImg;
stdProofCMYKG = doc->stdProofCMYK;
stdTransCMYKG = doc->stdTransCMYK;
stdTransRGBG = doc->stdTransRGB;
stdProofGCG = doc->stdProofGC;
stdProofCMYKGCG = doc->stdProofCMYKGC;
CMSoutputProf = doc->DocOutputProf;
CMSprinterProf = doc->DocPrinterProf;
if (static_cast<int>(cmsGetColorSpace(doc->DocInputRGBProf)) == icSigRgbData)
doc->CMSSettings.ComponentsInput2 = 3;
if (static_cast<int>(cmsGetColorSpace(doc->DocInputRGBProf)) == icSigCmykData)
3529,6 → 3589,8
doc->CMSSettings.ComponentsPrinter = 3;
doc->PDF_Options.SComp = doc->CMSSettings.ComponentsInput2;
}
else
CMSuse = false;
#endif
if (doc->CMSSettings.CMSinUse)
{
3539,6 → 3601,9
else
{
doc->CMSSettings.CMSinUse = false;
#ifdef HAVE_CMS
CMSuse = doc->CMSSettings.CMSinUse;
#endif
}
propertiesPalette->updateColorList();
propertiesPalette->Cpal->ChooseGrad(0);
4043,7 → 4108,7
if (currItem->PicAvail)
ScCore->fileWatcher->removeFile(currItem->Pfile);
}
if (ScCore->haveCMS())
if (CMSavail)
doc->CloseCMSProfiles();
//<<Palettes
// propertiesPalette->NewSel(-1);
4063,6 → 4128,12
//>>
if ((wsp->windowList().isEmpty()) || (wsp->windowList().count() == 1))
{
#ifdef HAVE_CMS
CMSuse = false;
SoftProofing = prefsManager->appPrefs.DCMSset.SoftProofOn;
IntentColors = prefsManager->appPrefs.DCMSset.DefaultIntentColors;
IntentImages = prefsManager->appPrefs.DCMSset.DefaultIntentImages;
#endif
scrActions["fileDocSetup"]->setEnabled(false);
scrActions["filePrint"]->setEnabled(false);
scrActions["fileSave"]->setEnabled(false);
4237,7 → 4308,7
ColorList usedSpots;
doc->getUsedColors(usedSpots, true);
QStringList spots = usedSpots.keys();
Druck *printer = new Druck(this, doc, options.filename, options.printer, PDef.Command, PDef.DevMode, prefsManager->appPrefs.GCRMode, spots);
Druck *printer = new Druck(this, options.filename, options.printer, PDef.Command, PDef.DevMode, prefsManager->appPrefs.GCRMode, spots);
printer->setMinMax(1, doc->Pages->count(), doc->currentPage()->pageNr()+1);
printDinUse = true;
connect(printer, SIGNAL(doPreview()), this, SLOT(doPrintPreview()));
/branches/Version13x/Scribus/scribus/reformdoc.cpp
46,7 → 46,29
#include "tabdocument.h"
 
extern QPixmap loadIcon(QString nam);
extern bool CMSavail;
 
#ifdef HAVE_CMS
extern cmsHPROFILE CMSoutputProf;
extern cmsHPROFILE CMSprinterProf;
extern cmsHTRANSFORM stdTransRGBMonG;
extern cmsHTRANSFORM stdTransCMYKMonG;
extern cmsHTRANSFORM stdProofG;
extern cmsHTRANSFORM stdTransImgG;
extern cmsHTRANSFORM stdProofImgG;
extern cmsHTRANSFORM stdTransCMYKG;
extern cmsHTRANSFORM stdProofCMYKG;
extern cmsHTRANSFORM stdTransRGBG;
extern cmsHTRANSFORM stdProofCMYKGCG;
extern cmsHTRANSFORM stdProofGCG;
extern bool BlackPoint;
extern bool SoftProofing;
extern bool Gamut;
extern bool CMSuse;
extern int IntentColors;
extern int IntentImages;
#endif
 
ReformDoc::ReformDoc( QWidget* parent, ScribusDoc* doc ) : PrefsDialogBase( parent )
{
docUnitIndex = doc->unitIndex();
95,7 → 117,7
 
tabPDF = new TabPDFOptions( prefsWidgets, doc->PDF_Options, PrefsManager::instance()->appPrefs.AvailFonts,
ScCore->PDFXProfiles, doc->UsedFonts, doc->PDF_Options.PresentVals,
docUnitIndex, doc->pageHeight, doc->pageWidth, doc );
docUnitIndex, doc->pageHeight, doc->pageWidth, 0 );
addItem( tr("PDF Export"), loadIcon("acroread.png"), tabPDF);
 
tabDocItemAttributes = new DocumentItemAttributes( prefsWidgets);
113,7 → 135,7
addItem( tr("Sections"), loadIcon("tabtocindex.png"), tabDocSections);
 
int cmsTab = 0;
if (ScCore->haveCMS())
if (CMSavail)
{
tabColorManagement = new CMSPrefs(prefsWidgets, &doc->CMSSettings, &ScCore->InputProfiles, &ScCore->InputProfilesCMYK, &ScCore->PrinterProfiles, &ScCore->MonitorProfiles);
cmsTab = addItem( tr("Color Management"), loadIcon("blend.png"), tabColorManagement);
128,7 → 150,7
connect(applyChangesButton, SIGNAL(clicked()), this, SLOT(applyChangesButton_clicked()));
connect(prefsWidgets, SIGNAL(aboutToShow(QWidget *)), this, SLOT(showWidgetInStack(QWidget *)));
 
if (ScCore->haveCMS())
if (CMSavail)
{
prefsWidgets->raiseWidget(cmsTab);
connect(tabColorManagement, SIGNAL(cmsOn(bool )), this, SLOT(switchCMS(bool )));
171,7 → 193,7
//else if (current == tabPDF)
tabPDF->restoreDefaults(currDoc->PDF_Options, PrefsManager::instance()->appPrefs.AvailFonts,
ScCore->PDFXProfiles, currDoc->UsedFonts, currDoc->PDF_Options.PresentVals,
docUnitIndex, currDoc->pageHeight, currDoc->pageWidth, currDoc, false);
docUnitIndex, currDoc->pageHeight, currDoc->pageWidth, 0);
//else if (current == tabColorManagement)
tabColorManagement->restoreDefaults(&currDoc->CMSSettings, &ScCore->InputProfiles,
&ScCore->InputProfilesCMYK,
467,7 → 489,7
!tabHyphenator->verbose->isChecked(),
tabHyphenator->input->isChecked(),
tabHyphenator->maxCount->value());
if (ScCore->haveCMS())
if (CMSavail)
{
bool oldCM = currDoc->CMSSettings.CMSinUse;
tabColorManagement->setValues();
483,6 → 505,12
currDoc->Gamut = currDoc->CMSSettings.GamutCheck;
currDoc->IntentColors = currDoc->CMSSettings.DefaultIntentColors;
currDoc->IntentImages = currDoc->CMSSettings.DefaultIntentImages;
CMSuse = currDoc->CMSSettings.CMSinUse;
SoftProofing = currDoc->CMSSettings.SoftProofOn;
Gamut = currDoc->CMSSettings.GamutCheck;
BlackPoint = currDoc->CMSSettings.BlackPoint;
IntentColors = currDoc->CMSSettings.DefaultIntentColors;
IntentImages = currDoc->CMSSettings.DefaultIntentImages;
qApp->setOverrideCursor(QCursor(waitCursor), true);
bool newCM = currDoc->CMSSettings.CMSinUse;
currDoc->CMSSettings.CMSinUse = oldCM;
490,7 → 518,18
currDoc->CMSSettings.CMSinUse = newCM;
if ( currDoc->OpenCMSProfiles(ScCore->InputProfiles, ScCore->InputProfilesCMYK, ScCore->MonitorProfiles, ScCore->PrinterProfiles) )
{
currDoc->HasCMS = true;
stdProofG = currDoc->stdProof;
stdTransRGBMonG = currDoc->stdTransRGBMon;
stdTransCMYKMonG = currDoc->stdTransCMYKMon;
stdProofImgG = currDoc->stdProofImg;
stdTransImgG = currDoc->stdTransImg;
stdProofCMYKG = currDoc->stdProofCMYK;
stdTransCMYKG = currDoc->stdTransCMYK;
stdProofGCG = currDoc->stdProofGC;
stdProofCMYKGCG = currDoc->stdProofCMYKGC;
stdTransRGBG = currDoc->stdTransRGB;
CMSoutputProf = currDoc->DocOutputProf;
CMSprinterProf = currDoc->DocPrinterProf;
if (static_cast<int>(cmsGetColorSpace(currDoc->DocInputRGBProf)) == icSigRgbData)
currDoc->CMSSettings.ComponentsInput2 = 3;
if (static_cast<int>(cmsGetColorSpace(currDoc->DocInputRGBProf)) == icSigCmykData)
518,7 → 557,10
currDoc->RecalcPictures(&ScCore->InputProfiles, &ScCore->InputProfilesCMYK, ScMW->mainWindowProgressBar);
}
else
{
currDoc->HasCMS = false;
CMSuse = false;
}
#endif
ScMW->mainWindowProgressBar->setProgress(cc);
qApp->setOverrideCursor(QCursor(arrowCursor), true);
637,7 → 679,7
currDoc->PDF_Options.isGrayscale = false;
currDoc->PDF_Options.UseRGB = false;
#ifdef HAVE_CMS
if (currDoc->HasCMS)
if (CMSuse)
{
currDoc->PDF_Options.UseProfiles = tabPDF->EmbedProfs->isChecked();
currDoc->PDF_Options.UseProfiles2 = tabPDF->EmbedProfs2->isChecked();
/branches/Version13x/Scribus/scribus/upgradechecker.cpp
17,10 → 17,6
#include "prefsmanager.h"
#include "scribuscore.h"
 
#ifdef _WIN32
#include <windows.h>
#define sleep Sleep
#endif
 
UpgradeChecker::UpgradeChecker()
: QObject()
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
20,6 → 20,10
// end of utils.cpp
//this is in file scribus.cpp
 
#ifdef HAVE_CMS
extern bool SCRIBUS_API CMSuse;
#endif
//
 
static int minmaxi(int val, int min, int max)
{
1090,7 → 1094,7
{
ScCore->primaryMainWindow()->doc->PDF_Options.UseRGB = false;
#ifdef HAVE_CMS
if (ScCore->primaryMainWindow()->doc->HasCMS)
if (CMSuse)
{
ScCore->primaryMainWindow()->doc->PDF_Options.UseProfiles = self->profiles;
ScCore->primaryMainWindow()->doc->PDF_Options.UseProfiles2 = self->profilei;
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
20,6 → 20,9
#ifdef HAVE_CUPS
#include <cups/cups.h>
#endif
#ifdef HAVE_CMS
extern bool SCRIBUS_API CMSuse;
#endif
// these functions are located at utils.cpp
bool SCRIBUS_API loadText(QString nam, QString *Buffer);
void SCRIBUS_API ReOrderText(ScribusDoc *doc, ScribusView *view);
/branches/Version13x/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
383,7 → 383,7
m_Doc->typographicSettings.offsetBaseGrid = dc.attribute("BASEO", "0").toDouble();
m_Doc->typographicSettings.autoLineSpacing = dc.attribute("AUTOL", "20").toInt();
m_Doc->GroupCounter=dc.attribute("GROUPC", "1").toInt();
//m_Doc->HasCMS = static_cast<bool>(dc.attribute("HCMS", "0").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());
429,7 → 429,7
lf.fromQColor(QColor(pg.attribute("RGB")));
lf.setSpotColor(false);
lf.setRegistrationColor(false);
m_Doc->PageColors.insert(pg.attribute("NAME"), lf);
m_Doc->PageColors[pg.attribute("NAME")] = lf;
}
if(pg.tagName()=="STYLE")
{
1166,7 → 1166,7
lf.fromQColor(QColor(pg.attribute("RGB")));
lf.setSpotColor(false);
lf.setRegistrationColor(false);
m_Doc->PageColors.insert(pg.attribute("NAME"), lf);
m_Doc->PageColors[pg.attribute("NAME")] = lf;
}
if(pg.tagName()=="STYLE")
{
1753,7 → 1753,7
lf.setRegistrationColor(static_cast<bool>(pg.attribute("Register").toInt()));
else
lf.setRegistrationColor(false);
colors.insert(pg.attribute("NAME"), lf);
colors[pg.attribute("NAME")] = lf;
}
PAGE=PAGE.nextSibling();
}
/branches/Version13x/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
349,7 → 349,7
m_Doc->typographicSettings.valueStrikeThruPos = dc.attribute("StrikeThruPos", "-1").toInt();
m_Doc->typographicSettings.valueStrikeThruWidth = dc.attribute("StrikeThruWidth", "-1").toInt();
m_Doc->GroupCounter=dc.attribute("GROUPC", "1").toInt();
//m_Doc->HasCMS = static_cast<bool>(dc.attribute("HCMS", "0").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());
554,7 → 554,7
lf.setRegistrationColor(static_cast<bool>(pg.attribute("Register").toInt()));
else
lf.setRegistrationColor(false);
m_Doc->PageColors.insert(pg.attribute("NAME"), lf);
m_Doc->PageColors[pg.attribute("NAME")] = lf;
}
if(pg.tagName()=="STYLE")
{
2534,7 → 2534,7
lf.setRegistrationColor(static_cast<bool>(pg.attribute("Register").toInt()));
else
lf.setRegistrationColor(false);
m_Doc->PageColors.insert(pg.attribute("NAME"), lf);
m_Doc->PageColors[pg.attribute("NAME")] = lf;
}
if(pg.tagName()=="STYLE")
{
3104,7 → 3104,7
lf.setRegistrationColor(static_cast<bool>(pg.attribute("Register").toInt()));
else
lf.setRegistrationColor(false);
colors.insert(pg.attribute("NAME"), lf);
colors[pg.attribute("NAME")] = lf;
}
PAGE=PAGE.nextSibling();
}
/branches/Version13x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
349,7 → 349,7
m_Doc->typographicSettings.valueStrikeThruPos = dc.attribute("StrikeThruPos", "-1").toInt();
m_Doc->typographicSettings.valueStrikeThruWidth = dc.attribute("StrikeThruWidth", "-1").toInt();
m_Doc->GroupCounter=dc.attribute("GROUPC", "1").toInt();
//m_Doc->HasCMS = static_cast<bool>(dc.attribute("HCMS", "0").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());
554,7 → 554,7
lf.setRegistrationColor(static_cast<bool>(pg.attribute("Register").toInt()));
else
lf.setRegistrationColor(false);
m_Doc->PageColors.insert(pg.attribute("NAME"), lf);
m_Doc->PageColors[pg.attribute("NAME")] = lf;
}
if(pg.tagName()=="STYLE")
{
2521,7 → 2521,7
lf.setRegistrationColor(static_cast<bool>(pg.attribute("Register").toInt()));
else
lf.setRegistrationColor(false);
m_Doc->PageColors.insert(pg.attribute("NAME"), lf);
m_Doc->PageColors[pg.attribute("NAME")] = lf;
}
if(pg.tagName()=="STYLE")
{
3093,7 → 3093,7
lf.setRegistrationColor(static_cast<bool>(pg.attribute("Register").toInt()));
else
lf.setRegistrationColor(false);
colors.insert(pg.attribute("NAME"), lf);
colors[pg.attribute("NAME")] = lf;
}
PAGE=PAGE.nextSibling();
}
/branches/Version13x/Scribus/scribus/plugins/psimport/importps.cpp
115,7 → 115,7
FarNam = FarNam.remove(FarNam.length()-1,1);
QRegExp badchars("[\\s\\/\\{\\[\\]\\}\\<\\>\\(\\)\\%]");
FarNam = FarNam.simplifyWhiteSpace().replace( badchars, "_" );
cc = ScColor(static_cast<int>(255 * c), static_cast<int>(255 * m), static_cast<int>(255 * y), static_cast<int>(255 * k), m_Doc);
cc = ScColor(static_cast<int>(255 * c), static_cast<int>(255 * m), static_cast<int>(255 * y), static_cast<int>(255 * k));
cc.setSpotColor(true);
CustColors.insert(FarNam, cc);
while (!ts.atEnd())
/branches/Version13x/Scribus/scribus/plugins/colorwheel/cwdialog.cpp
426,7 → 426,7
QStringList tmpsl;
 
beginColor.fromQColor(colorWheel->actualColor);
CMYKChoose* dia = new CMYKChoose(this, m_Doc, beginColor, tr("New Color"), &tmpcl, tmpsl);
CMYKChoose* dia = new CMYKChoose(this, beginColor, tr("New Color"), &tmpcl, tmpsl);
if (dia->exec())
userColorInput(dia->Farbe.getRGBColor());
delete dia;
/branches/Version13x/Scribus/scribus/tabpdfoptions.h
33,7 → 33,6
 
class PDFOptions;
class PDFExportDialog;
class ScribusDoc;
 
class SCRIBUS_API TabPDFOptions : public QTabWidget
{
46,7 → 45,7
const QMap<QString, int> & DocFonts,
const QValueList<PDFPresentationData> & Eff,
int unitIndex, double PageH, double PageB,
ScribusDoc *mdoc = 0, bool export = false);
ScribusView *vie = 0 );
~TabPDFOptions() {};
void restoreDefaults(PDFOptions & Optionen,
const SCFonts &AllFonts,
54,7 → 53,7
const QMap<QString, int> & DocFonts,
const QValueList<PDFPresentationData> & Eff,
int unitIndex, double PageH, double PageB,
ScribusDoc *mdoc, bool export);
ScribusView * vie);
 
void unitChange(QString unit, int docUnitIndex, int decimals, double invUnitConversion);
 
298,8 → 297,7
QString unit;
int precision;
double unitRatio;
bool pdfExport;
ScribusDoc* const doc;
ScribusView * const view;
const SCFonts & AllFonts;
PDFOptions & Opts;
double pageH;
/branches/Version13x/Scribus/scribus/tabpdfoptions.cpp
19,12 → 19,18
#include "units.h"
#include "pdfoptions.h"
#include "prefsmanager.h"
#include "scribuscore.h"
#include "scconfig.h"
 
extern QPixmap loadIcon(QString nam);
#ifdef HAVE_CMS
extern bool CMSuse;
#endif
extern bool CMSavail;
#include "scribuscore.h"
 
 
 
 
TabPDFOptions::TabPDFOptions( QWidget* parent, PDFOptions & Optionen,
const SCFonts &AllFonts,
const ProfilesL & PDFXProfiles,
31,7 → 37,7
const QMap<QString, int> & DocFonts,
const QValueList<PDFPresentationData> & Eff,
int unitIndex, double PageH, double PageB,
ScribusDoc * mdoc, bool export )
ScribusView * vie )
: QTabWidget( parent, "pdf" ),
// Initialize all those darn pointer members so we catch unitialized
// accesses. I (CR) use the following command to generate these based on
220,8 → 226,7
unit(unitGetSuffixFromIndex(unitIndex)),
precision(unitGetPrecisionFromIndex(unitIndex)),
unitRatio(unitGetRatioFromIndex(unitIndex)),
doc(mdoc),
pdfExport(export),
view(vie),
AllFonts(AllFonts),
Opts(Optionen),
pageH(PageH),
297,8 → 302,7
PDFVersionCombo->insertItem("PDF 1.4 (Acrobat 5)");
PDFVersionCombo->insertItem("PDF 1.5 (Acrobat 6)");
#ifdef HAVE_CMS
cms = doc ? (ScCore->haveCMS() && doc->HasCMS) : false;
if (cms && (!PDFXProfiles.isEmpty()))
if ((CMSuse) && (CMSavail) && (!PDFXProfiles.isEmpty()))
PDFVersionCombo->insertItem("PDF/X-3");
/* if ((CMSuse) && (CMSavail))
{
307,6 → 311,7
}
else
PDFVersionCombo->setCurrentItem(0);*/
cms = CMSuse && CMSavail;
#else
cms = false;
#endif
398,7 → 403,7
CBoxLayout->addWidget( ValC, 2, 1, AlignLeft );
tabLayout->addWidget( CBox );
insertTab( tabGeneral, tr( "&General" ) );
if (doc != 0 && export)
if (vie != 0)
{
tabFonts = new QWidget( this, "tabFonts" );
tabLayout_3 = new QVBoxLayout( tabFonts );
516,7 → 521,7
struct PDFPresentationData ef;
if (EffVal.count() != 0)
{
for (uint pg2 = 0; pg2 < doc->Pages->count(); ++pg2)
for (uint pg2 = 0; pg2 < view->Doc->Pages->count(); ++pg2)
{
Pages->insertItem( tr("Page")+" "+tmp.setNum(pg2+1));
if (EffVal.count()-1 < pg2)
533,7 → 538,7
}
else
{
for (uint pg = 0; pg < doc->Pages->count(); ++pg)
for (uint pg = 0; pg < view->Doc->Pages->count(); ++pg)
{
Pages->insertItem( tr("Page")+" "+tmp.setNum(pg+1));
ef.pageEffectDuration = 1;
618,9 → 623,9
insertTab( tabPresentation, tr( "E&xtras" ) );
 
// XXX Optionen or Opts Changed here
/* if (doc->currentPageLayout == doublePage)
/* if (view->Doc->currentPageLayout == doublePage)
{
if (doc->pageSets[doc->currentPageLayout].FirstPage == 0)
if (view->Doc->pageSets[view->Doc->currentPageLayout].FirstPage == 0)
Opts.PageLayout = PDFOptions::TwoColumnLeft;
else
Opts.PageLayout = PDFOptions::TwoColumnRight;
720,9 → 725,9
actionCombo->setEditable(false);
actionCombo->insertItem( tr("No Script"));
/* QMap<QString,QString>::Iterator itja;
for (itja = doc->JavaScripts.begin(); itja != doc->JavaScripts.end(); ++itja)
for (itja = view->Doc->JavaScripts.begin(); itja != view->Doc->JavaScripts.end(); ++itja)
actionCombo->insertItem(itja.key());
if (doc->JavaScripts.contains(Opts.openAction))
if (view->Doc->JavaScripts.contains(Opts.openAction))
actionCombo->setCurrentText(Opts.openAction);*/
groupJavaLayout->addWidget( actionCombo );
tabSpecialLayout->addWidget( groupJava );
1103,9 → 1108,9
// BleedChanged();
 
restoreDefaults(Optionen, AllFonts, PDFXProfiles, DocFonts,
Eff, unitIndex, PageH, PageB, doc, pdfExport);
Eff, unitIndex, PageH, PageB, vie);
 
if (doc != 0 && export)
if (vie != 0)
{
// PgSel = 0;
// Pages->setCurrentItem(0);
1224,7 → 1229,7
const QMap<QString, int> & DocFonts,
const QValueList<PDFPresentationData> & Eff,
int unitIndex, double PageH, double PageB,
ScribusDoc * mdoc, bool export)
ScribusView * vie)
{
AllPages->setChecked( true );
PageNr->setEnabled(false);
1233,8 → 1238,7
MirrorV->setOn(Opts.MirrorV);
ClipMarg->setChecked(Opts.doClip);
#ifdef HAVE_CMS
bool cmsUse = mdoc ? (ScCore->haveCMS() && mdoc->HasCMS) : false;
if (cmsUse)
if ((CMSuse) && (CMSavail))
{
if (Opts.Version == PDFOptions::PDFVersion_X3)
PDFVersionCombo->setCurrentItem(3);
1264,7 → 1268,7
DSColor->setChecked(Opts.RecalcPic);
ValC->setValue(Opts.PicRes);
ValC->setEnabled(DSColor->isChecked() ? true : false);
if (mdoc != 0 && export)
if (vie != 0)
{
QMap<QString,int>::const_iterator it;
AvailFlist->clear();
1313,7 → 1317,7
EffVal.clear();
if (EffVal.count() != 0)
{
for (uint pg2 = 0; pg2 < doc->Pages->count(); ++pg2)
for (uint pg2 = 0; pg2 < view->Doc->Pages->count(); ++pg2)
{
Pages->insertItem( tr("Page")+" "+tmp.setNum(pg2+1));
if (EffVal.count()-1 < pg2)
1330,7 → 1334,7
}
else
{
for (uint pg = 0; pg < doc->Pages->count(); ++pg)
for (uint pg = 0; pg < view->Doc->Pages->count(); ++pg)
{
Pages->insertItem( tr("Page")+" "+tmp.setNum(pg+1));
ef.pageEffectDuration = 1;
1346,9 → 1350,9
PageTime->setValue(EffVal[0].pageViewDuration);
EffectTime->setValue(EffVal[0].pageEffectDuration);
// XXX Optionen or Opts Changed here
if (doc->currentPageLayout == doublePage)
if (view->Doc->currentPageLayout == doublePage)
{
if (doc->pageSets[doc->currentPageLayout].FirstPage == 0)
if (view->Doc->pageSets[view->Doc->currentPageLayout].FirstPage == 0)
Opts.PageLayout = PDFOptions::TwoColumnLeft;
else
Opts.PageLayout = PDFOptions::TwoColumnRight;
1375,9 → 1379,9
fitWindow->setChecked(Opts.fitWindow);
QMap<QString,QString>::Iterator itja;
actionCombo->clear();
for (itja = doc->JavaScripts.begin(); itja != doc->JavaScripts.end(); ++itja)
for (itja = view->Doc->JavaScripts.begin(); itja != view->Doc->JavaScripts.end(); ++itja)
actionCombo->insertItem(itja.key());
if (doc->JavaScripts.contains(Opts.openAction))
if (view->Doc->JavaScripts.contains(Opts.openAction))
actionCombo->setCurrentText(Opts.openAction);
if (Opts.PageLayout == PDFOptions::SinglePage)
singlePage->setChecked(true);
1445,8 → 1449,8
QString tp = Opts.SolidProf;
if (!ScCore->InputProfiles.contains(tp))
{
if (mdoc != 0 && export)
tp = mdoc->CMSSettings.DefaultSolidColorRGBProfile;
if (vie != 0)
tp = vie->Doc->CMSSettings.DefaultSolidColorRGBProfile;
else
tp = PrefsManager::instance()->appPrefs.DCMSset.DefaultSolidColorRGBProfile;
}
1458,17 → 1462,17
SolidPr->insertItem(itp.key());
if (itp.key() == tp)
{
if (cmsUse)
if ((CMSuse) && (CMSavail))
SolidPr->setCurrentItem(SolidPr->count()-1);
}
}
if (cmsUse)
if ((CMSuse) && (CMSavail))
IntendS->setCurrentItem(Opts.Intent);
QString tp1 = Opts.ImageProf;
if (!ScCore->InputProfiles.contains(tp1))
{
if (mdoc != 0 && export)
tp1 = mdoc->CMSSettings.DefaultSolidColorRGBProfile;
if (vie != 0)
tp1 = vie->Doc->CMSSettings.DefaultSolidColorRGBProfile;
else
tp1 = PrefsManager::instance()->appPrefs.DCMSset.DefaultSolidColorRGBProfile;
}
1480,13 → 1484,13
ImageP->insertItem(itp2.key());
if (itp2.key() == tp1)
{
if (cmsUse)
if ((CMSuse) && (CMSavail))
ImageP->setCurrentItem(ImageP->count()-1);
}
}
if (cmsUse)
if ((CMSuse) && (CMSavail))
IntendI->setCurrentItem(Opts.Intent2);
if (!cmsUse)
if ((!CMSuse) || (!CMSavail))
{
GroupBox9->hide();
ProfsGroup->hide();
1502,8 → 1506,8
QString tp3 = Opts.PrintProf;
if (!PDFXProfiles.contains(tp3))
{
if (mdoc != 0 && export)
tp3 = mdoc->CMSSettings.DefaultPrinterProfile;
if (vie != 0)
tp3 = vie->Doc->CMSSettings.DefaultPrinterProfile;
else
tp3 = PrefsManager::instance()->appPrefs.DCMSset.DefaultPrinterProfile;
}
1521,9 → 1525,9
BleedRight->setValue(Opts.BleedRight*unitRatio);
BleedLeft->setValue(Opts.BleedLeft*unitRatio);
#ifdef HAVE_CMS
if (!cmsUse)
if ((!CMSuse) || (!CMSavail))
setTabEnabled(tabPDFX, false);
if (cmsUse && (Opts.Version == 12) && (!PDFXProfiles.isEmpty()))
if ((CMSuse) && (CMSavail) && (Opts.Version == 12) && (!PDFXProfiles.isEmpty()))
EnablePDFX(3);
else
setTabEnabled(tabPDFX, false);
1531,7 → 1535,7
setTabEnabled(tabPDFX, false);
#endif
BleedChanged();
if (mdoc != 0 && export)
if (vie != 0)
{
PgSel = 0;
Pages->setCurrentItem(0);
1622,7 → 1626,7
OutCombo->setEnabled(true);
EmbedProfs2->setEnabled(true);
emit hasInfo();
if (doc != 0 && pdfExport)
if (view != 0)
{
CheckBox10->setEnabled(true);
EmbedFonts->setEnabled(true);
1638,7 → 1642,7
EnablePr(1);
EmbedProfs2->setChecked(true);
EmbedProfs2->setEnabled(false);
if (doc != 0 && pdfExport)
if (view != 0)
{
EmbedFonts->setChecked(true);
EmbedAll();
1713,8 → 1717,8
QString tp = Opts.SolidProf;
if (!ScCore->InputProfiles.contains(tp))
{
if (doc != 0)
tp = doc->CMSSettings.DefaultSolidColorRGBProfile;
if (view != 0)
tp = view->Doc->CMSSettings.DefaultSolidColorRGBProfile;
else
tp = PrefsManager::instance()->appPrefs.DCMSset.DefaultSolidColorRGBProfile;
}
1735,8 → 1739,8
QString tp1 = Opts.ImageProf;
if (!ScCore->InputProfiles.contains(tp1))
{
if (doc != 0)
tp1 = doc->CMSSettings.DefaultSolidColorRGBProfile;
if (view != 0)
tp1 = view->Doc->CMSSettings.DefaultSolidColorRGBProfile;
else
tp1 = PrefsManager::instance()->appPrefs.DCMSset.DefaultSolidColorRGBProfile;
}
1815,7 → 1819,7
 
void TabPDFOptions::EffectOnAll()
{
for (uint pg = 0; pg < doc->Pages->count(); ++pg)
for (uint pg = 0; pg < view->Doc->Pages->count(); ++pg)
{
EffVal[pg].pageViewDuration = PageTime->value();
EffVal[pg].pageEffectDuration = EffectTime->value();
1925,15 → 1929,15
int ci = Pages->currentItem();
if (PagePrev->isChecked())
{
for (uint pg = 0; pg < doc->Pages->count(); ++pg)
for (uint pg = 0; pg < view->Doc->Pages->count(); ++pg)
{
pm.convertFromImage(doc->view()->PageToPixmap(pg, 70));
pm.convertFromImage(view->PageToPixmap(pg, 70));
Pages->changeItem(pm, tr("Page")+" "+tmp.setNum(pg+1), pg);
}
}
else
{
for (uint pg = 0; pg < doc->Pages->count(); ++pg)
for (uint pg = 0; pg < view->Doc->Pages->count(); ++pg)
Pages->changeItem( tr("Page")+" "+tmp.setNum(pg+1), pg);
}
if (ci != -1)
/branches/Version13x/Scribus/scribus/pdfopts.cpp
24,6 → 24,11
#include "commonstrings.h"
#include "scconfig.h"
 
#ifdef HAVE_CMS
extern bool CMSuse;
#endif
extern bool CMSavail;
 
PDFExportDialog::PDFExportDialog( QWidget* parent, const QString & docFileName,
const QMap<QString, int > & DocFonts,
ScribusView *currView, PDFOptions & pdfOptions,
36,8 → 41,7
docUnitRatio(unitRatio),
cmsDescriptorName(""),
components(3),
appPrinterProfiles(printerProfiles),
doc(currView->Doc)
appPrinterProfiles(printerProfiles)
{
setCaption( tr( "Save as PDF" ) );
setIcon(loadIcon("AppIcon.png"));
75,7 → 79,7
PDFExportLayout->addWidget( Name );
Options = new TabPDFOptions( this, pdfOptions, AllFonts, PDFXProfiles, DocFonts,
Eff, currView->Doc->unitIndex(), currView->Doc->pageHeight,
currView->Doc->pageWidth, currView->Doc );
currView->Doc->pageWidth, currView );
PDFExportLayout->addWidget( Options );
Layout7 = new QHBoxLayout;
Layout7->setSpacing( 5 );
254,7 → 258,7
Opts.isGrayscale = false;
Opts.UseRGB = false;
#ifdef HAVE_CMS
if (doc->HasCMS)
if (CMSuse)
{
Opts.UseProfiles = Options->EmbedProfs->isChecked();
Opts.UseProfiles2 = Options->EmbedProfs2->isChecked();
/branches/Version13x/Scribus/scribus/druck.cpp
9,7 → 9,6
 
#include "scconfig.h"
 
#include "scribusdoc.h"
#include "commonstrings.h"
#include "prefsmanager.h"
#include "prefscontext.h"
27,14 → 26,16
#include <windows.h>
#include <winspool.h>
#endif
#ifdef HAVE_CMS
extern bool CMSuse;
#endif
#include "printerutil.h"
#include "util.h"
extern bool previewDinUse;
 
Druck::Druck( QWidget* parent, ScribusDoc* doc, QString PDatei, QString PDev, QString PCom, QByteArray& PSettings, bool gcr, QStringList spots)
Druck::Druck( QWidget* parent, QString PDatei, QString PDev, QString PCom, QByteArray& PSettings, bool gcr, QStringList spots)
: QDialog( parent, "Dr", true, 0)
{
m_doc = doc;
prefs = PrefsManager::instance()->prefsFile->getContext("print_options");
DevMode = PSettings;
ToSeparation = false;
228,7 → 229,7
overprintMode->setText( tr( "Force Overprint Mode" ) );
colorOptsLayout->addWidget( overprintMode );
#ifdef HAVE_CMS
if (m_doc->HasCMS)
if (CMSuse)
{
UseICC = new QCheckBox( colorOpts, "UseICC" );
UseICC->setText( tr( "Apply ICC Profiles" ) );
280,7 → 281,7
QToolTip::add(spotColors,"<qt>" + tr( "Enables Spot Colors to be converted to composite colors. Unless you are planning to print spot colors at a commercial printer, this is probably best left enabled." ) + "</qt>");
QToolTip::add(overprintMode, "<qt>"+ tr("Enables global Overprint Mode for this document, overrides object settings") + "<qt>");
#ifdef HAVE_CMS
if (m_doc->HasCMS)
if (CMSuse)
QToolTip::add(UseICC,"<qt>" + tr( "Allows you to embed ICC profiles in the print stream when color management is enabled" ) + "</qt>");
#endif
QToolTip::add(devPar, "<qt>" + tr( "This enables you to explicitely set the media size of the PostScript file. Not recommended unless requested by your printer." ) + "</qt>");
441,7 → 442,7
psLevel->setEnabled( true );
PrintSep->setEnabled( true );
#ifdef HAVE_CMS
if (m_doc->HasCMS)
if (CMSuse)
UseICC->setEnabled( true );
#endif
}
454,7 → 455,7
SepArt->setEnabled( false );
ToSeparation = false;
#ifdef HAVE_CMS
if (m_doc->HasCMS)
if (CMSuse)
{
UseICC->setEnabled( false );
UseICC->setChecked( false );
527,7 → 528,7
prefs->set("doSpot", !spotColors->isChecked());
prefs->set("doOverprint", overprintMode->isChecked());
#ifdef HAVE_CMS
if (m_doc->HasCMS)
if (CMSuse)
prefs->set("ICCinUse", UseICC->isChecked());
#endif
accept();
570,7 → 571,7
spotColors->setChecked(!prefs->getBool("doSpot", true));
overprintMode->setChecked(prefs->getBool("doOverprint", false));
#ifdef HAVE_CMS
if (m_doc->HasCMS)
if (CMSuse)
{
bool iccInUse = prefs->getBool("ICCinUse", false);
bool psPrinter = PrinterUtil::isPostscriptPrinter(PrintDest->currentText()) || ToFile;
671,7 → 672,7
bool Druck::ICCinUse()
{
#ifdef HAVE_CMS
if (m_doc->HasCMS)
if (CMSuse)
return UseICC->isChecked();
else
return false;
/branches/Version13x/Scribus/scribus/scribusdoc.cpp
65,8 → 65,27
 
#ifdef HAVE_CMS
#include "cmserrorhandling.h"
extern cmsHPROFILE CMSoutputProf;
extern cmsHPROFILE CMSprinterProf;
extern cmsHTRANSFORM stdTransRGBMonG;
extern cmsHTRANSFORM stdTransCMYKMonG;
extern cmsHTRANSFORM stdProofG;
extern cmsHTRANSFORM stdTransImgG;
extern cmsHTRANSFORM stdProofImgG;
extern cmsHTRANSFORM stdTransCMYKG;
extern cmsHTRANSFORM stdProofCMYKG;
extern cmsHTRANSFORM stdTransRGBG;
extern cmsHTRANSFORM stdProofGCG;
extern cmsHTRANSFORM stdProofCMYKGCG;
extern bool BlackPoint;
extern bool SoftProofing;
extern bool Gamut;
extern bool CMSuse;
extern int IntentColors;
extern int IntentImages;
#endif
 
extern bool CMSavail;
extern QPixmap loadIcon(QString nam);
 
ScribusDoc::ScribusDoc() : UndoObject( tr("Document")),
96,7 → 115,6
rulerXoffset(0.0), rulerYoffset(0.0),
Pages(0), MasterPages(), DocPages(),
MasterNames(),
PageColors(this, true),
Items(0), MasterItems(), DocItems(), FrameItems(),
m_Selection(new Selection(this, true)),
pageWidth(0), pageHeight(0),
273,29 → 291,10
Q_CHECK_PTR(m_Selection);
Q_CHECK_PTR(autoSaveTimer);
 
HasCMS = false;
#ifdef HAVE_CMS
DocInputRGBProf = NULL;
DocInputCMYKProf = NULL;
DocOutputProf = NULL;
DocPrinterProf = NULL;
stdTransRGBMon = NULL;
stdTransCMYKMon = NULL;
stdProof = NULL;
stdTransImg = NULL;
stdProofImg = NULL;
stdTransCMYK = NULL;
stdProofCMYK = NULL;
stdTransRGB = NULL;
stdProofGC = NULL;
stdProofCMYKGC = NULL;
#endif
 
AddFont(prefsData.toolSettings.defFont);//, prefsData.AvailFonts[prefsData.toolSettings.defFont]->Font);
toolSettings.defFont = prefsData.toolSettings.defFont;
toolSettings.defSize = prefsData.toolSettings.defSize;
toolSettings.tabFillChar = prefsData.toolSettings.tabFillChar;
 
PageColors.insert("Black", ScColor(0, 0, 0, 255));
PageColors.insert("White", ScColor(0, 0, 0, 0));
if (prefsData.toolSettings.dPen != CommonStrings::None)
392,6 → 391,23
m_masterPageMode=true; // quick hack to force the change of pointers in setMasterPageMode();
setMasterPageMode(false);
addSymbols();
 
#ifdef HAVE_CMS
DocInputRGBProf = NULL;
DocInputCMYKProf = NULL;
DocOutputProf = NULL;
DocPrinterProf = NULL;
stdTransRGBMon = NULL;
stdTransCMYKMon = NULL;
stdProof = NULL;
stdTransImg = NULL;
stdProofImg = NULL;
stdTransCMYK = NULL;
stdProofCMYK = NULL;
stdTransRGB = NULL;
stdProofGC = NULL;
stdProofCMYKGC = NULL;
#endif
}
 
ScribusDoc::~ScribusDoc()
425,7 → 441,7
FirstPnum = firstPageNumber;
currentPageLayout = fp;
setName(documentName);
HasCMS = false;
HasCMS = true;
if (!PDF_Options.UseLPI)
{
PDF_Options.LPISettings.clear();
446,7 → 462,6
appMode = modeNormal;
PrefsManager *prefsManager=PrefsManager::instance();
PageColors = prefsManager->colorSet();
PageColors.setDocument(this);
 
CMSSettings = prefsManager->appPrefs.DCMSset;
PDF_Options.SolidProf = CMSSettings.DefaultSolidColorRGBProfile;
459,13 → 474,25
Gamut = CMSSettings.GamutCheck;
IntentColors = CMSSettings.DefaultIntentColors;
IntentImages = CMSSettings.DefaultIntentImages;
BlackPoint = CMSSettings.BlackPoint;
#endif
if (ScCore->haveCMS() && CMSSettings.CMSinUse)
if ((CMSavail) && (CMSSettings.CMSinUse))
{
#ifdef HAVE_CMS
if (OpenCMSProfiles(ScCore->InputProfiles, ScCore->InputProfilesCMYK, ScCore->MonitorProfiles, ScCore->PrinterProfiles))
{
HasCMS = true;
stdProofG = stdProof;
stdTransRGBMonG = stdTransRGBMon;
stdTransCMYKMonG = stdTransCMYKMon;
stdProofImgG = stdProofImg;
stdTransImgG = stdTransImg;
stdProofCMYKG = stdProofCMYK;
stdTransCMYKG = stdTransCMYK;
stdTransRGBG = stdTransRGB;
stdProofGCG = stdProofGC;
stdProofCMYKGCG = stdProofCMYKGC;
CMSoutputProf = DocOutputProf;
CMSprinterProf = DocPrinterProf;
if (static_cast<int>(cmsGetColorSpace(DocInputRGBProf)) == icSigRgbData)
CMSSettings.ComponentsInput2 = 3;
if (static_cast<int>(cmsGetColorSpace(DocInputRGBProf)) == icSigCmykData)
487,7 → 514,7
PDF_Options.SComp = CMSSettings.ComponentsInput2;
}
else
HasCMS = false;
CMSSettings.CMSinUse = false;
#endif
}
}
520,8 → 547,7
void ScribusDoc::CloseCMSProfiles()
{
#ifdef HAVE_CMS
HasCMS = false;
if (ScCore->haveCMS() /*&& CMSSettings.CMSinUse*/)
if ((CMSavail) /*&& (CMSSettings.CMSinUse)*/)
{
if (DocInputRGBProf)
cmsCloseProfile(DocInputRGBProf);
572,7 → 598,6
bool ScribusDoc::OpenCMSProfiles(ProfilesL InPo, ProfilesL InPoCMYK, ProfilesL MoPo, ProfilesL PrPo)
{
#ifdef HAVE_CMS
HasCMS = false;
cmsHPROFILE inputProf = NULL;
cmsErrorAction(LCMS_ERROR_ABORT);
if (setjmp(cmsJumpBuffer))
583,7 → 608,7
cmsErrorAction(LCMS_ERROR_IGNORE);
CloseCMSProfiles();
cmsErrorAction(LCMS_ERROR_ABORT);
CMSSettings.CMSinUse = false;
CMSSettings.CMSinUse = CMSuse = 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);
1967,7 → 1992,6
PageItem* ite;
bool found;
colorsToUse.clear();
colorsToUse.setDocument(this);
ColorList::Iterator it;
for (it = PageColors.begin(); it != PageColors.end(); ++it)
{
2516,7 → 2540,7
ColorList::Iterator it;
ColorList::Iterator itend=PageColors.end();
for (it = PageColors.begin(); it != itend; ++it)
it.data().RecalcRGB();
PageColors[it.key()].RecalcRGB();
//Adjust Items of the 3 types to the colors
uint itemsCount=Items->count();
updateAllItemQColors();
/branches/Version13x/Scribus/scribus/scribuscore.cpp
40,14 → 40,33
 
#ifdef HAVE_CMS
#include "cmserrorhandling.h"
cmsHPROFILE CMSoutputProf;
cmsHPROFILE CMSprinterProf;
cmsHTRANSFORM stdTransRGBMonG;
cmsHTRANSFORM stdTransCMYKMonG;
cmsHTRANSFORM stdProofG;
cmsHTRANSFORM stdTransImgG;
cmsHTRANSFORM stdProofImgG;
cmsHTRANSFORM stdTransCMYKG;
cmsHTRANSFORM stdProofCMYKG;
cmsHTRANSFORM stdTransRGBG;
cmsHTRANSFORM stdProofGCG;
cmsHTRANSFORM stdProofCMYKGCG;
bool BlackPoint;
bool SoftProofing;
bool Gamut;
bool SCRIBUS_API CMSuse;
int IntentColors;
int IntentImages;
#endif
bool CMSavail;
 
 
ScribusCore::ScribusCore() : QObject()
{
m_ScribusInitialized=false;
m_SplashScreen=0;
m_UseGUI=false;
m_HaveCMS=false;
m_PaletteParent=0;
m_currScMW=0;
}
160,7 → 179,7
m_HaveTiffSep = testGSDeviceAvailability("tiffsep");
ScCore->setSplashStatus( tr("Reading ICC Profiles") );
m_HaveCMS = false;
CMSavail = false;
getCMSProfiles();
initCMS();
/*
340,9 → 359,9
}
}
if ((!PrinterProfiles.isEmpty()) && (!InputProfiles.isEmpty()) && (!MonitorProfiles.isEmpty()))
m_HaveCMS = true;
CMSavail = true;
else
m_HaveCMS = false;
CMSavail = false;
}
 
void ScribusCore::getCMSProfilesDir(QString pfad)
440,7 → 459,7
 
void ScribusCore::initCMS()
{
if (m_HaveCMS)
if (CMSavail)
{
ProfilesL::Iterator ip;
if ((prefsManager->appPrefs.DCMSset.DefaultImageRGBProfile.isEmpty()) || (!InputProfiles.contains(prefsManager->appPrefs.DCMSset.DefaultImageRGBProfile)))
473,6 → 492,12
ip = PrinterProfiles.begin();
prefsManager->appPrefs.DCMSset.DefaultPrinterProfile = ip.key();
}
#ifdef HAVE_CMS
SoftProofing = prefsManager->appPrefs.DCMSset.SoftProofOn;
CMSuse = false;
IntentColors = prefsManager->appPrefs.DCMSset.DefaultIntentColors;
IntentImages = prefsManager->appPrefs.DCMSset.DefaultIntentImages;
#endif
}
}
 
/branches/Version13x/Scribus/scribus/mpalette.h
49,6 → 49,7
class ScComboBox;
class ScribusMainWindow;
class UserActionSniffer;
extern bool CMSavail;
/*
class SCRIBUS_API LabelButton : public QLabel
{
/branches/Version13x/Scribus/scribus/mpalette.cpp
3427,7 → 3427,7
return;
if (HaveDoc)
{
if (ScCore->haveCMS() && doc->CMSSettings.CMSinUse)
if ((CMSavail) && (doc->CMSSettings.CMSinUse))
GroupBoxCM->show();
else
{
3524,7 → 3524,7
updateCmsList();
else
{
if (ScCore->haveCMS() && doc->CMSSettings.CMSinUse)
if ((CMSavail) && (doc->CMSSettings.CMSinUse))
GroupBoxCM->show();
else
GroupBoxCM->hide();
/branches/Version13x/Scribus/scribus/util.cpp
91,6 → 91,19
#endif
#ifdef HAVE_CMS
#include CMS_INC
extern cmsHPROFILE CMSoutputProf;
extern cmsHPROFILE CMSprinterProf;
extern cmsHTRANSFORM stdTransRGBMonG;
extern cmsHTRANSFORM stdTransCMYKMonG;
extern cmsHTRANSFORM stdProofG;
extern cmsHTRANSFORM stdTransImgG;
extern cmsHTRANSFORM stdProofImgG;
extern bool BlackPoint;
extern bool SoftProofing;
extern bool Gamut;
extern bool CMSuse;
extern int IntentColors;
extern int IntentImages;
#endif
 
 
101,30 → 114,28
qDebug("%s", message.ascii());
}
 
QImage ProofImage(QImage *Image, ScribusDoc* doc)
QImage ProofImage(QImage *Image)
{
#ifdef HAVE_CMS
QImage out = Image->copy();
bool cmsUse = doc ? doc->HasCMS : false;
bool softProofing = doc ? doc->SoftProofing : false;
if (cmsUse && softProofing)
if ((CMSuse) && (SoftProofing))
{
int outheight=out.height();
for (int i=0; i < outheight; ++i)
{
LPBYTE ptr = out.scanLine(i);
cmsDoTransform(doc->stdProofImg, ptr, ptr, out.width());
cmsDoTransform(stdProofImgG, ptr, ptr, out.width());
}
}
else
{
if (cmsUse)
if (CMSuse)
{
int outheight=out.height();
for (int i=0; i < outheight; ++i)
{
LPBYTE ptr = out.scanLine(i);
cmsDoTransform(doc->stdTransImg, ptr, ptr, out.width());
cmsDoTransform(stdTransImgG, ptr, ptr, out.width());
}
}
}
/branches/Version13x/Scribus/scribus/scribuscore.h
87,7 → 87,6
* @retval bool if we are swapping
*/
bool reverseDialogButtons() const;
bool haveCMS() const { return m_HaveCMS; }
int haveGS() const {return m_HaveGS;};
int havePNGAlpha() const {return m_HavePngAlpha;};
int haveTIFFSep() const {return m_HaveTiffSep;};
123,7 → 122,6
bool m_UseGUI;
bool m_SwapDialogButtonOrder;
QString m_File;
bool m_HaveCMS;
int m_HaveGS;
int m_HavePngAlpha;
int m_HaveTiffSep;
/branches/Version13x/Scribus/scribus/pdflib.cpp
62,6 → 62,9
 
using namespace std;
 
#ifdef HAVE_CMS
extern bool CMSuse;
#endif
#ifdef HAVE_TIFF
#include <tiffio.h>
#endif
1013,7 → 1016,7
ObjCounter++;
}
#ifdef HAVE_CMS
if ((doc.HasCMS) && (Options.UseProfiles))
if ((CMSuse) && (Options.UseProfiles))
{
StartObj(ObjCounter);
ObjCounter++;
1680,7 → 1683,7
else
#ifdef HAVE_CMS
{
if ((doc.HasCMS) && (Options.UseProfiles))
if ((CMSuse) && (Options.UseProfiles))
PutDoc("/CS "+ICCProfiles[Options.SolidProf].ICCArray+"\n");
else
#endif
2727,7 → 2730,7
else
{
#ifdef HAVE_CMS
if ((doc.HasCMS) && (Options.UseProfiles))
if ((CMSuse) && (Options.UseProfiles))
{
if (tmpC.getColorModel() == colorModelCMYK)
{
2854,7 → 2857,7
else
{
#ifdef HAVE_CMS
if ((doc.HasCMS) && (Options.UseProfiles))
if ((CMSuse) && (Options.UseProfiles))
{
if (tmpC.getColorModel() == colorModelCMYK)
{
3478,7 → 3481,7
else
{
#ifdef HAVE_CMS
if ((doc.HasCMS) && (Options.UseProfiles))
if ((CMSuse) && (Options.UseProfiles))
{
if (tmpC.getColorModel() == colorModelCMYK)
{
3534,7 → 3537,7
else
{
#ifdef HAVE_CMS
if ((doc.HasCMS) && (Options.UseProfiles))
if ((CMSuse) && (Options.UseProfiles))
{
if (Options.SComp == 3)
{
3589,7 → 3592,7
else
{
#ifdef HAVE_CMS
if ((doc.HasCMS) && (Options.UseProfiles))
if ((CMSuse) && (Options.UseProfiles))
{
if (tmpC.getColorModel() == colorModelCMYK)
{
4048,7 → 4051,7
else
#ifdef HAVE_CMS
{
if ((doc.HasCMS) && (Options.UseProfiles))
if ((CMSuse) && (Options.UseProfiles))
PutDoc("/ColorSpace "+ICCProfiles[Options.SolidProf].ICCArray+"\n");
else
#endif
4756,7 → 4759,7
else
{
#ifdef HAVE_CMS
if ((doc.HasCMS) && (Options.UseProfiles2))
if ((CMSuse) && (Options.UseProfiles2))
img.LoadPicture(fn, cms, Intent, Embedded, true, ScImage::RGBData, afl);
else
{
4811,7 → 4814,7
else
{
#ifdef HAVE_CMS
if ((doc.HasCMS) && (Options.UseProfiles2))
if ((CMSuse) && (Options.UseProfiles2))
img.LoadPicture(fn, cms, Intent, Embedded, true, ScImage::RGBData, afl);
else
{
4847,7 → 4850,7
else
{
#ifdef HAVE_CMS
if ((doc.HasCMS) && (Options.UseProfiles2))
if ((CMSuse) && (Options.UseProfiles2))
img.LoadPicture(fn, cms, Intent, Embedded, true, ScImage::RawData, 72, &realCMYK);
else
{
4885,7 → 4888,7
aufl = 1;
}
#ifdef HAVE_CMS
if ((doc.HasCMS) && (Options.UseProfiles2))
if ((CMSuse) && (Options.UseProfiles2))
{
if (!ICCProfiles.contains(Profil))
{
5015,7 → 5018,7
else
{
#ifdef HAVE_CMS
if ((doc.HasCMS) && (Options.UseProfiles2) && (!realCMYK))
if ((CMSuse) && (Options.UseProfiles2) && (!realCMYK))
im = img.ImageToArray();
else
#endif
5030,7 → 5033,7
PutDoc("/Width "+QString::number(img.width())+"\n");
PutDoc("/Height "+QString::number(img.height())+"\n");
#ifdef HAVE_CMS
if ((doc.HasCMS) && (Options.UseProfiles2))
if ((CMSuse) && (Options.UseProfiles2))
{
PutDoc("/ColorSpace "+ICCProfiles[Profil].ICCArray+"\n");
PutDoc("/Intent /");
/branches/Version13x/Scribus/scribus/util.h
92,7 → 92,7
bool SCRIBUS_API loadRawText(const QString & filename, QCString & buf);
bool SCRIBUS_API loadRawBytes(const QString & filename, QByteArray & buf);
QString SCRIBUS_API GetAttr(QDomElement *el, QString at, QString def="0");
QImage SCRIBUS_API ProofImage(QImage *Im, ScribusDoc* doc);
QImage SCRIBUS_API ProofImage(QImage *Im);
/**
* @brief Synchronously execute a new process, optionally saving its output
*
/branches/Version13x/Scribus/scribus/colorm.cpp
224,7 → 224,7
}
 
ColorManager::ColorManager(QWidget* parent, ColorList doco, ScribusDoc* doc, QString docColSet, QStringList custColSet)
: QDialog( parent, "ColorManager", true, 0 ), EditColors(doc, true), UsedC(doc, true)
: QDialog( parent, "ColorManager", true, 0 )
{
setName( "ColorManager" );
m_Doc=doc;
723,12 → 723,11
void ColorManager::neueFarbe()
{
ScColor tmpFarbe = ScColor(0, 0, 0, 0);
CMYKChoose* dia = new CMYKChoose(this, m_Doc, tmpFarbe, tr("New Color"), &EditColors, customColSet);
CMYKChoose* dia = new CMYKChoose(this, tmpFarbe, tr("New Color"), &EditColors, customColSet);
int newItemIndex=0;
int colCount=0;
if (dia->exec())
{
dia->Farbe.setDocument(m_Doc);
dia->Farbe.setSpotColor(dia->Separations->isChecked());
ColorList::Iterator itnew=EditColors.insert(dia->Farbname->text(), dia->Farbe);
bool regChecked=dia->Regist->isChecked();
754,10 → 753,9
int selectedIndex=colorListBox->currentItem();
int topIndex=colorListBox->topItem();
ScColor tmpFarbe = EditColors[sFarbe];
CMYKChoose* dia = new CMYKChoose(this, m_Doc, tmpFarbe, sFarbe, &EditColors, customColSet);
CMYKChoose* dia = new CMYKChoose(this, tmpFarbe, sFarbe, &EditColors, customColSet);
if (dia->exec())
{
dia->Farbe.setDocument(m_Doc);
dia->Farbe.setSpotColor(dia->Separations->isChecked());
EditColors[dia->Farbname->text()] = dia->Farbe;
if (dia->Regist->isChecked())
/branches/Version13x/Scribus/scribus/scribusXml.cpp
750,7 → 750,6
// 10/25/2004 pv - None is "reserved" color. cannot be defined in any file...
if(pg.tagName()=="COLOR" && pg.attribute("Name")!=CommonStrings::None)
{
lf.setDocument(doc);
if (pg.hasAttribute("CMYK"))
lf.setNamedColor(pg.attribute("CMYK"));
else
/branches/Version13x/Scribus/scribus/cmykfw.cpp
18,14 → 18,16
#include "sccombobox.h"
#include "scconfig.h"
#include "scpaths.h"
#include "scribusdoc.h"
#ifdef HAVE_CMS
extern bool SoftProofing;
extern bool Gamut;
extern bool CMSuse;
#endif
#include "util.h"
 
CMYKChoose::CMYKChoose( QWidget* parent, ScribusDoc* doc, ScColor orig, QString name, ColorList *Colors, QStringList Cust )
: QDialog( parent, "fw", true, 0 ), CurrSwatch(doc)
CMYKChoose::CMYKChoose( QWidget* parent, ScColor orig, QString name, ColorList *Colors, QStringList Cust )
: QDialog( parent, "fw", true, 0 )
{
m_doc = doc;
orig.setDocument(m_doc);
if (orig.getColorModel () == colorModelCMYK)
CMYKmode = true;
else
219,7 → 221,7
Frame5Layout = new QHBoxLayout( Frame5 );
Frame5Layout->setSpacing( 0 );
Frame5Layout->setMargin( 0 );
ColorMap = new ColorChart( Frame5, doc);
ColorMap = new ColorChart( Frame5);
ColorMap->setMinimumSize( QSize( 180, 128 ) );
ColorMap->setMaximumSize( QSize( 180, 128 ) );
Frame5Layout->addWidget( ColorMap );
459,13 → 461,13
switch (farbe)
{
case 180:
tmp = ScColor(x, m, y, k, m_doc).getDisplayColorGC();
tmp = ScColor(x, m, y, k).getDisplayColorGC();
break;
case 300:
tmp = ScColor(c, x, y, k, m_doc).getDisplayColorGC();
tmp = ScColor(c, x, y, k).getDisplayColorGC();
break;
case 60:
tmp = ScColor(c, m, x, k, m_doc).getDisplayColorGC();
tmp = ScColor(c, m, x, k).getDisplayColorGC();
break;
}
p.setBrush(tmp);
475,13 → 477,13
switch (farbe)
{
case 180:
tmp = ScColor(x, 0, 0, 0, m_doc).getDisplayColorGC();
tmp = ScColor(x, 0, 0, 0).getDisplayColorGC();
break;
case 300:
tmp = ScColor(0, x, 0, 0, m_doc).getDisplayColorGC();
tmp = ScColor(0, x, 0, 0).getDisplayColorGC();
break;
case 60:
tmp = ScColor(0, 0, x, 0, m_doc).getDisplayColorGC();
tmp = ScColor(0, 0, x, 0).getDisplayColorGC();
break;
}
p.setBrush(tmp);
495,13 → 497,13
switch (farbe)
{
case 0:
tmp = ScColor(x, g, b, m_doc).getDisplayColorGC();
tmp = ScColor(x, g, b).getDisplayColorGC();
break;
case 120:
tmp = ScColor(r, x, b, m_doc).getDisplayColorGC();
tmp = ScColor(r, x, b).getDisplayColorGC();
break;
case 240:
tmp = ScColor(r, g, x, m_doc).getDisplayColorGC();
tmp = ScColor(r, g, x).getDisplayColorGC();
break;
}
p.setBrush(tmp);
511,13 → 513,13
switch (farbe)
{
case 0:
tmp = ScColor(x, 0, 0, m_doc).getDisplayColorGC();
tmp = ScColor(x, 0, 0).getDisplayColorGC();
break;
case 120:
tmp = ScColor(0, x, 0, m_doc).getDisplayColorGC();
tmp = ScColor(0, x, 0).getDisplayColorGC();
break;
case 240:
tmp = ScColor(0, 0, x, m_doc).getDisplayColorGC();
tmp = ScColor(0, 0, x).getDisplayColorGC();
break;
}
p.setBrush(tmp);
541,9 → 543,9
for (int x = 0; x < 255; x += 5)
{
if (dynamic)
p.setBrush(ScColor(c, m, y, x, m_doc).getDisplayColorGC());
p.setBrush(ScColor(c, m, y, x).getDisplayColorGC());
else
p.setBrush(ScColor(0, 0, 0, x, m_doc).getDisplayColorGC());
p.setBrush(ScColor(0, 0, 0, x).getDisplayColorGC());
p.drawRect(x, 0, 5, 10);
val -= 5;
}
608,7 → 610,7
ColorEn = tsC.readLine();
while (!tsC.atEnd())
{
ScColor tmp(m_doc);
ScColor tmp;
ColorEn = tsC.readLine();
if (ColorEn.length()>0 && ColorEn[0]==QChar('#'))
continue;
649,14 → 651,14
}
else
{
CurrSwatch.insert("White", ScColor(0, 0, 0, 0, m_doc));
CurrSwatch.insert("Black", ScColor(0, 0, 0, 255, m_doc));
CurrSwatch.insert("Blue", ScColor(255, 255, 0, 0, m_doc));
CurrSwatch.insert("Cyan", ScColor(255, 0, 0, 0, m_doc));
CurrSwatch.insert("Green", ScColor(255, 0, 255, 0, m_doc));
CurrSwatch.insert("Red", ScColor(0, 255, 255, 0, m_doc));
CurrSwatch.insert("Yellow", ScColor(0, 0, 255, 0, m_doc));
CurrSwatch.insert("Magenta", ScColor(0, 255, 0, 0, m_doc));
CurrSwatch.insert("White", ScColor(0, 0, 0, 0));
CurrSwatch.insert("Black", ScColor(0, 0, 0, 255));
CurrSwatch.insert("Blue", ScColor(255, 255, 0, 0));
CurrSwatch.insert("Cyan", ScColor(255, 0, 0, 0));
CurrSwatch.insert("Green", ScColor(255, 0, 255, 0));
CurrSwatch.insert("Red", ScColor(0, 255, 255, 0));
CurrSwatch.insert("Yellow", ScColor(0, 0, 255, 0));
CurrSwatch.insert("Magenta", ScColor(0, 255, 0, 0));
}
}
ColorSwatch->clear();
864,7 → 866,7
YellowSL->setValue(y);
blockSignals(false);
}
ScColor tmp(m_doc);
ScColor tmp;
if (CMYKmode)
{
tmp.setColor(c, m, y, k);
905,7 → 907,7
QColor tm = QColor(QMAX(QMIN(359,h),0), QMAX(QMIN(255,255-s),0), 255-BlackComp, QColor::Hsv);
int r, g, b;
tm.rgb(&r, &g, &b);
ScColor tmp(m_doc);
ScColor tmp;
tmp.fromQColor(tm);
if (CMYKmode)
tmp.setColorModel(colorModelCMYK);
922,7 → 924,6
void CMYKChoose::SelFromSwatch(int c)
{
ScColor tmp = CurrSwatch[ColorSwatch->text(c)];
tmp.setDocument(m_doc);
if (CMYKmode)
tmp.setColorModel(colorModelCMYK);
tmp.checkGamut();
/branches/Version13x/Scribus/scribus/pdfopts.h
29,7 → 29,6
*/
 
class PDFOptions;
class ScribusDoc;
 
/**
* @brief PDF export dialog
76,7 → 75,6
TabPDFOptions* Options;
 
// Other members
ScribusDoc* doc;
QValueList<PDFPresentationData> EffVal;
PDFOptions & Opts;
double docUnitRatio;
/branches/Version13x/Scribus/scribus/sccolor.h
24,12 → 24,10
#ifndef SCCOLOR_H
#define SCCOLOR_H
 
#include <qstring.h>
#include "qstring.h"
#include <qcolor.h>
#include <qmap.h>
#include <qguardedptr.h>
#include "qmap.h"
 
class ScribusDoc;
#include "scribusapi.h"
 
 
49,27 → 47,20
class SCRIBUS_API ScColor
{
public:
ScColor(ScribusDoc* doc = NULL, bool retainDoc = false);
ScColor();
/** \brief Constructs a ScColor with 4 Components
* in the range from 0 - 255 */
ScColor(int c, int m, int y, int k, ScribusDoc* doc = NULL, bool retainDoc = false);
ScColor(int c, int m, int y, int k);
/** \brief Constructs a RGBColor with 3 Components
* in the range from 0 - 255 */
ScColor(int r, int g, int b, ScribusDoc* doc = NULL, bool retainDoc = false);
ScColor(int r, int g, int b);
~ScColor() {};
ScColor& operator=(const ScColor& rhs);
bool operator==(const ScColor& rhs) const;
/** \brief flag to enable and disable use of color management (default: true) */
static bool UseProf;
 
/** \brief Attach the color to the specified doc */
void setDocument(ScribusDoc* doc);
 
/** \brief Set if the doc should be retained on assignement */
void setRetainDoc(bool retainDoc);
 
/** \brief Same as the Constructor but for an existing Color */
void setColor(int c, int m, int y, int k);
 
88,24 → 79,24
void fromQColor(QColor color);
 
/** \brief Returns the RGB color */
QColor getRGBColor() const;
void getRawRGBColor(int *r, int *g, int *b) const;
QColor getRawRGBColor() const;
QColor getRGBColor();
void getRawRGBColor(int *r, int *g, int *b);
QColor getRawRGBColor();
 
/** \brief Returns the 4 Values that form an ScColor */
void getCMYK(int *c, int *m, int *y, int *k) const;
void getCMYK(int *c, int *m, int *y, int *k);
 
/** \brief Returns the 3 Values that form an RGBColor */
void getRGB(int *r, int *g, int *b) const;
void getRGB(int *r, int *g, int *b);
 
/** \brief get CMYK values of a specified shade */
void getShadeColorCMYK(int *c, int *m, int *y, int *k, int level) const;
void getShadeColorCMYK(int *c, int *m, int *y, int *k, int level);
 
/** \brief get RGB values of a specified shade */
void getShadeColorRGB(int *r, int *g, int *b, int level) const;
void getShadeColorRGB(int *r, int *g, int *b, int level);
 
/** \brief Return a color converted to monitor color space. No soft-proofing is done. */
QColor getDisplayColor() const;
QColor getDisplayColor();
 
/** \brief Return a color converted to monitor color space. No soft-proofing is done
* If gamut check is valid, the return value may be an gamut warning . */
113,11 → 104,11
 
/** \brief Return a proofed QColor with 100% shade and optional gamut check.
* If color management is enabled, returned value use the monitor color space. */
QColor getColorProof(bool gamutCheck = false) const;
QColor getColorProof(bool gamutCheck = false);
 
/** \brief Return a proofed QColor with the specified shade.
* If color management is enabled, returned value use the rgb solid colors space. */
QColor getShadeColor(int level) const;
QColor getShadeColor(int level);
 
/** \brief Return a proofed QColor with the specified shade.
* If color management is enabled, returned value use the monitor color space. */
146,12 → 137,6
void setRegistrationColor(bool s);
 
private:
/** \brief Document to which is attached the doc */
QGuardedPtr<ScribusDoc> m_doc;
 
/** \brief If the doc pointer should be retained when assignement operator is used */
bool m_retainDoc;
 
/** \brief Cyan-Component of Color */
int C;
190,47 → 175,22
 
/** \brief Return a proofed QColor from a rgb color.
* If color management is enabled, returned value use the monitor color space. */
QColor getColorProof(int r, int g, int b, bool gamutCkeck) const;
QColor getColorProof(int r, int g, int b, bool gamutCkeck);
 
/** \brief Return a proofed QColor from a cmyk color.
* If color management is enabled, returned value use the monitor color space. */
QColor getColorProof(int c, int m, int y, int k, bool gamutCkeck) const;
QColor getColorProof(int c, int m, int y, int k, bool gamutCkeck);
 
/** \brief Return a proofed QColor from a rgb color using doc rgb color space as input.
* If color management is enabled, returned value use the monitor rgb color space. */
QColor getDisplayColor(int r, int g, int b) const;
QColor getDisplayColor(int r, int g, int b);
 
/** \brief Return a proofed QColor from a cmyk color using doc cmyk color space as input.
* If color management is enabled, returned value use the monitor rgb color space. */
QColor getDisplayColor(int c, int m, int y, int k) const;
QColor getDisplayColor(int c, int m, int y, int k);
};
 
class SCRIBUS_API ColorList : public QMap<QString,ScColor>
{
protected:
QGuardedPtr<ScribusDoc> m_doc;
bool m_retainDoc;
public:
ColorList(ScribusDoc* doc = NULL, bool retainDoc = false);
/** \brief Definition of the Color list */
typedef QMap<QString,ScColor> ColorList;
 
ColorList& operator= (const ColorList& list);
 
ScColor& operator[] ( const QString & k );
const ScColor& operator[] ( const QString& k ) const;
 
/** \brief Assign the doc to which the list belong to. The colors containes in the list
* are automatically assigned the new doc pointer */
void setDocument(ScribusDoc* doc);
 
/** \brief Add colors from the specified list. Colors are assigned the doc the list belongs to */
void addColors(const ColorList& colorList, bool overwrite = TRUE);
 
/** \brief Copy colors from the specified list. Colors are assigned the doc the list belongs to */
void copyColors(const ColorList& colorList, bool overwrite = TRUE);
 
/** \brief Insert the specified color with the specified name. The inserted color is
* assigned the doc the list belongs to */
iterator insert(const QString& key, const ScColor& color, bool overwrite = TRUE);
};
 
#endif
/branches/Version13x/Scribus/scribus/sccolor.cpp
25,19 → 25,28
#include <qstring.h>
 
#include "sccolor.h"
#include "scribuscore.h"
#include "scribusdoc.h"
 
#include "scconfig.h"
 
#ifdef HAVE_CMS
#include CMS_INC
extern cmsHTRANSFORM stdTransRGBMonG;
extern cmsHTRANSFORM stdTransCMYKMonG;
extern cmsHTRANSFORM stdProofG;
extern cmsHTRANSFORM stdTransCMYKG;
extern cmsHTRANSFORM stdProofCMYKG;
extern cmsHTRANSFORM stdTransRGBG;
extern cmsHTRANSFORM stdProofGCG;
extern cmsHTRANSFORM stdProofCMYKGCG;
extern bool SoftProofing;
extern bool Gamut;
extern bool CMSuse;
#endif
extern bool CMSavail;
bool ScColor::UseProf = true;
 
ScColor::ScColor(ScribusDoc* doc, bool retainDoc)
ScColor::ScColor()
{
m_doc = doc;
m_retainDoc = retainDoc;
// setColor(0, 0, 0, 0);
Model = colorModelCMYK;
C = M = Y = K = 0;
49,10 → 58,8
Regist = false;
}
 
ScColor::ScColor(int c, int m, int y, int k, ScribusDoc* doc, bool retainDoc)
ScColor::ScColor(int c, int m, int y, int k)
{
m_doc = doc;
m_retainDoc = retainDoc;
setColor(c, m, y, k);
Spot = false;
outOfGamutFlag = false;
59,10 → 66,8
Regist = false;
}
ScColor::ScColor(int r, int g, int b, ScribusDoc* doc, bool retainDoc)
ScColor::ScColor(int r, int g, int b)
{
m_doc = doc;
m_retainDoc = retainDoc;
setColorRGB(r, g, b);
Spot = false;
outOfGamutFlag = false;
69,47 → 74,6
Regist = false;
}
 
ScColor& ScColor::operator=(const ScColor& rhs)
{
Model = rhs.Model;
if (m_retainDoc)
{
if( Model == colorModelRGB )
{
R = rhs.R;
G = rhs.G;
B = rhs.B;
}
else
{
C = rhs.C;
M = rhs.M;
Y = rhs.Y;
K = rhs.K;
}
Spot = rhs.Spot;
Regist = rhs.Regist;
RecalcRGB();
}
else
{
m_doc = rhs.m_doc;
m_retainDoc = rhs.m_retainDoc;
R = rhs.R;
G = rhs.G;
B = rhs.B;
C = rhs.C;
M = rhs.M;
Y = rhs.Y;
K = rhs.K;
RGB = rhs.RGB;
Spot = rhs.Spot;
Regist = rhs.Regist;
outOfGamutFlag = rhs.outOfGamutFlag;
}
return *this;
}
 
bool ScColor::operator==(const ScColor& rhs) const
{
if (Model!=rhs.Model)
129,20 → 93,6
return false;
}
 
void ScColor::setDocument(ScribusDoc* doc)
{
if((ScribusDoc*) m_doc != doc)
{
m_doc = doc;
RecalcRGB();
}
}
 
void ScColor::setRetainDoc(bool retainDoc)
{
m_retainDoc = retainDoc;
}
 
void ScColor::setColor(int c, int m, int y, int k)
{
C = c;
180,12 → 130,12
setColorRGB(r, g, b);
}
 
QColor ScColor::getRGBColor() const
QColor ScColor::getRGBColor()
{
return RGB;
}
 
QColor ScColor::getShadeColor(int level) const
QColor ScColor::getShadeColor(int level)
{
int r, g, b;
getShadeColorRGB(&r, &g, &b, level);
192,7 → 142,7
return QColor(r, g, b);
}
void ScColor::getShadeColorCMYK(int *c, int *m, int *y, int *k, int level) const
void ScColor::getShadeColorCMYK(int *c, int *m, int *y, int *k, int level)
{
if (Model == colorModelRGB)
{
211,7 → 161,7
}
}
 
void ScColor::getShadeColorRGB(int *r, int *g, int *b, int level) const
void ScColor::getShadeColorRGB(int *r, int *g, int *b, int level)
{
int h, s, v, snew;
242,7 → 192,7
}
}
 
QColor ScColor::getDisplayColor() const
QColor ScColor::getDisplayColor()
{
QColor tmp;
if (Model == colorModelRGB)
255,9 → 205,7
QColor ScColor::getDisplayColorGC()
{
QColor tmp;
bool doSoftProofing = m_doc ? m_doc->SoftProofing : false;
bool doGamutCheck = m_doc ? m_doc->Gamut : false;
if( doSoftProofing && doGamutCheck )
if( SoftProofing && Gamut )
{
checkGamut();
tmp = outOfGamutFlag ? QColor(0, 255, 0) : getDisplayColor();
267,14 → 215,13
return tmp;
}
 
QColor ScColor::getColorProof(bool gamutCheck) const
QColor ScColor::getColorProof(bool gamutCheck)
{
QColor tmp;
bool gamutChkEnabled = m_doc ? m_doc->Gamut : false;
if (Model == colorModelRGB)
tmp = getColorProof(R, G, B, gamutCheck & gamutChkEnabled);
tmp = getColorProof(R, G, B, gamutCheck & Gamut);
else
tmp = getColorProof(C, M, Y, K, gamutCheck & gamutChkEnabled);
tmp = getColorProof(C, M, Y, K, gamutCheck & Gamut);
return tmp;
}
 
284,9 → 231,7
ScColor tmp2;
int r, g, b, c, m ,y, k;
#if defined HAVE_CMS
bool doGC = false;
if (m_doc)
doGC = m_doc->Gamut;
bool doGC = Gamut;
#else
bool doGC = false;
#endif
305,7 → 250,7
return tmp;
}
 
void ScColor::getRawRGBColor(int *r, int *g, int *b) const
void ScColor::getRawRGBColor(int *r, int *g, int *b)
{
*r = 255-QMIN(255, C+K);
*g = 255-QMIN(255, M+K);
312,12 → 257,12
*b = 255-QMIN(255, Y+K);
}
 
QColor ScColor::getRawRGBColor() const
QColor ScColor::getRawRGBColor()
{
return QColor(255-QMIN(255, C+K), 255-QMIN(255, M+K), 255-QMIN(255, Y+K));
}
 
void ScColor::getRGB(int *r, int *g, int *b) const
void ScColor::getRGB(int *r, int *g, int *b)
{
*r = R;
*g = G;
324,7 → 269,7
*b = B;
}
 
void ScColor::getCMYK(int *c, int *m, int *y, int *k) const
void ScColor::getCMYK(int *c, int *m, int *y, int *k)
{
*c = C;
*m = M;
335,8 → 280,7
void ScColor::applyGCR()
{
#ifdef HAVE_CMS
bool cmsUse = (m_doc) ? m_doc->HasCMS : false;
if (!(ScCore->haveCMS() && cmsUse))
if (!(CMSuse && CMSavail))
{
#endif
int k = QMIN(QMIN(C, M), Y);
464,8 → 408,7
#ifdef HAVE_CMS
WORD inC[4];
WORD outC[4];
bool cmsUse = (m_doc) ? m_doc->HasCMS : false;
if (ScCore->haveCMS() && cmsUse)
if (CMSuse && CMSavail)
{
bool alert = true;
cmsHTRANSFORM xformProof;
474,7 → 417,7
inC[0] = R*257;
inC[1] = G*257;
inC[2] = B*257;
xformProof = m_doc->stdProofGC;
xformProof = stdProofGCG;
if ((R == 0) && (B == 0) && (G == 255))
alert = false;
if ((R == G && G == B))
486,7 → 429,7
inC[1] = M*257;
inC[2] = Y*257;
inC[3] = K*257;
xformProof = m_doc->stdProofCMYKGC;
xformProof = stdProofCMYKGCG;
if ((M == 0) && (K == 0) && (C == 255) && (Y == 255))
alert = false;
if ((M == 0) && (C == 0) && (Y == 0))
511,8 → 454,7
#ifdef HAVE_CMS
WORD inC[4];
WORD outC[4];
bool cmsUse = (m_doc) ? m_doc->HasCMS : false;
if ((ScCore->haveCMS() && cmsUse) && (!Spot))
if ((CMSuse && CMSavail) && (!Spot))
{
if (Model == colorModelRGB)
{
527,7 → 469,7
inC[0] = R * 257;
inC[1] = G * 257;
inC[2] = B * 257;
cmsDoTransform(m_doc->stdTransCMYK, inC, outC, 1);
cmsDoTransform(stdTransCMYKG, inC, outC, 1);
C = outC[0] / 257;
M = outC[1] / 257;
Y = outC[2] / 257;
541,7 → 483,7
inC[1] = M * 257;
inC[2] = Y * 257;
inC[3] = K * 257;
cmsDoTransform(m_doc->stdTransRGB, inC, outC, 1);
cmsDoTransform(stdTransRGBG, inC, outC, 1);
R = outC[0] / 257;
G = outC[1] / 257;
B = outC[2] / 257;
570,21 → 512,20
RGB = QColor(R, G, B);
}
 
QColor ScColor::getColorProof(int r, int g, int b, bool gamutCkeck) const
QColor ScColor::getColorProof(int r, int g, int b, bool gamutCkeck)
{
#ifdef HAVE_CMS
WORD inC[4];
WORD outC[4];
bool alert = true;
bool cmsUse = (m_doc) ? m_doc->HasCMS : false;
if ((ScCore->haveCMS() && cmsUse) && (!Spot))
if ((CMSuse && CMSavail) && (!Spot))
{
inC[0] = r * 257;
inC[1] = g * 257;
inC[2] = b * 257;
if (m_doc->SoftProofing)
if (SoftProofing)
{
cmsHTRANSFORM xform = gamutCkeck ? m_doc->stdProofGC : m_doc->stdProof;
cmsHTRANSFORM xform = gamutCkeck ? stdProofGCG : stdProofG;
cmsDoTransform(xform, inC, outC, 1);
r = outC[0] / 257;
g = outC[1] / 257;
592,7 → 533,7
}
else
{
cmsDoTransform(m_doc->stdTransRGBMon, inC, outC, 1);
cmsDoTransform(stdTransRGBMonG, inC, outC, 1);
r = outC[0] / 257;
g = outC[1] / 257;
b = outC[2] / 257;
602,7 → 543,7
return QColor(r, g, b);
}
 
QColor ScColor::getColorProof(int c, int m, int y, int k, bool gamutCkeck) const
QColor ScColor::getColorProof(int c, int m, int y, int k, bool gamutCkeck)
{
int r = 0, g = 0, b = 0;
#ifdef HAVE_CMS
609,16 → 550,15
WORD inC[4];
WORD outC[4];
bool alert = true;
bool cmsUse = (m_doc) ? m_doc->HasCMS : false;
if ((ScCore->haveCMS() && cmsUse) && (!Spot))
if ((CMSuse && CMSavail) && (!Spot))
{
inC[0] = c * 257;
inC[1] = m * 257;
inC[2] = y * 257;
inC[3] = k * 257;
if (m_doc->SoftProofing)
if (SoftProofing)
{
cmsHTRANSFORM xform = gamutCkeck ? m_doc->stdProofCMYKGC : m_doc->stdProofCMYK;
cmsHTRANSFORM xform = gamutCkeck ? stdProofCMYKGCG : stdProofCMYKG;
cmsDoTransform(xform, inC, outC, 1);
r = outC[0] / 257;
g = outC[1] / 257;
626,7 → 566,7
}
else
{
cmsDoTransform(m_doc->stdTransCMYKMon, inC, outC, 1);
cmsDoTransform(stdTransCMYKMonG, inC, outC, 1);
r = outC[0] / 257;
g = outC[1] / 257;
b = outC[2] / 257;
644,19 → 584,18
return QColor(r, g, b);
}
 
QColor ScColor::getDisplayColor(int r, int g, int b) const
QColor ScColor::getDisplayColor(int r, int g, int b)
{
#ifdef HAVE_CMS
WORD inC[4];
WORD outC[4];
bool alert = true;
bool cmsUse = (m_doc) ? m_doc->HasCMS : false;
if ((ScCore->haveCMS() && cmsUse) && (!Spot))
if ((CMSuse && CMSavail) && (!Spot))
{
inC[0] = r * 257;
inC[1] = g * 257;
inC[2] = b * 257;
cmsDoTransform(m_doc->stdTransRGBMon, inC, outC, 1);
cmsDoTransform(stdTransRGBMonG, inC, outC, 1);
r = outC[0] / 257;
g = outC[1] / 257;
b = outC[2] / 257;
665,7 → 604,7
return QColor(r, g, b);
}
 
QColor ScColor::getDisplayColor(int c, int m, int y, int k) const
QColor ScColor::getDisplayColor(int c, int m, int y, int k)
{
int r = 0, g = 0, b = 0;
#ifdef HAVE_CMS
672,14 → 611,13
WORD inC[4];
WORD outC[4];
bool alert = true;
bool cmsUse = (m_doc) ? m_doc->HasCMS : false;
if ((ScCore->haveCMS() && cmsUse) && (!Spot))
if ((CMSuse && CMSavail) && (!Spot))
{
inC[0] = c * 257;
inC[1] = m * 257;
inC[2] = y * 257;
inC[3] = k * 257;
cmsDoTransform(m_doc->stdTransCMYKMon, inC, outC, 1);
cmsDoTransform(stdTransCMYKMonG, inC, outC, 1);
r = outC[0] / 257;
g = outC[1] / 257;
b = outC[2] / 257;
715,67 → 653,3
{
Spot = s;
}
 
ColorList::ColorList(ScribusDoc* doc, bool retainDoc) : QMap<QString,ScColor>()
{
m_doc = doc;
m_retainDoc = retainDoc;
}
 
ColorList& ColorList::operator= (const ColorList& list)
{
clear();
if (!m_retainDoc)
m_doc = list.m_doc;
addColors(list);
return *this;
}
 
ScColor& ColorList::operator[] ( const QString & k )
{
ScColor& rColor = QMap<QString,ScColor>::operator[](k);
rColor.setRetainDoc(true);
rColor.setDocument(m_doc);
return rColor;
}
 
const ScColor& ColorList::operator[] ( const QString& k ) const
{
return QMap<QString,ScColor>::operator[](k);
}
 
void ColorList::setDocument(ScribusDoc* doc)
{
if ((ScribusDoc*) m_doc != doc)
{
m_doc = doc;
ColorList::Iterator it;
ColorList::Iterator itend;
itend = end();
for (it = begin(); it != itend; it++)
it.data().setDocument(m_doc);
}
}
 
void ColorList::addColors(const ColorList& colorList, bool overwrite)
{
ColorList::ConstIterator it;
ColorList::ConstIterator itend;
itend = colorList.end();
for (it = colorList.begin(); it != itend; it++)
ColorList::insert(it.key(), it.data(), overwrite);
}
 
void ColorList::copyColors(const ColorList& colorList, bool overwrite)
{
clear();
addColors(colorList, overwrite);
}
 
ColorList::iterator ColorList::insert(const QString& key, const ScColor& color, bool overwrite)
{
iterator iter = QMap<QString,ScColor>::insert(key, color, overwrite);
iter.data().setDocument(m_doc);
iter.data().setRetainDoc(true);
return iter;
}
/branches/Version13x/Scribus/scribus/druck.h
26,7 → 26,6
#include <qwidget.h>
 
class PrefsContext;
class ScribusDoc;
 
class SCRIBUS_API Druck : public QDialog
{
33,7 → 32,7
Q_OBJECT
 
public:
Druck( QWidget* parent, ScribusDoc* doc, QString PDatei, QString PDev, QString PCom, QByteArray& PSettings, bool gcr, QStringList spots);
Druck( QWidget* parent, QString PDatei, QString PDev, QString PCom, QByteArray& PSettings, bool gcr, QStringList spots);
~Druck() {};
QString printerName();
QString outputFileName();
120,7 → 119,6
QPushButton* OKButton;
QPushButton* previewButton;
QPushButton* OptButton;
ScribusDoc* m_doc;
QString Geraet;
bool ToFile;
bool ToSeparation;
/branches/Version13x/Scribus/scribus/cmykfw.h
23,7 → 23,6
#include <qlistbox.h>
 
class ScColor;
class ScribusDoc;
#include "colorchart.h"
#include "colorsetmanager.h"
#include "mspinbox.h"
35,7 → 34,7
Q_OBJECT
 
public:
CMYKChoose( QWidget* parent, ScribusDoc* doc, ScColor orig, QString name, ColorList *Colors, QStringList Cust );
CMYKChoose( QWidget* parent, ScColor orig, QString name, ColorList *Colors, QStringList Cust );
~CMYKChoose() {};
virtual void mouseReleaseEvent(QMouseEvent *m);
QColor CMYK2RGB(int c, int m, int y, int k);
118,7 → 117,6
ColorSetManager csm;
int customSetStartIndex;
ScribusDoc* m_doc;
};
 
#endif // CMYKFARBEN_H
/branches/Version13x/Scribus/scribus/colorchart.cpp
27,9 → 27,8
#include <qimage.h>
#include <qpainter.h>
#include "util.h"
#include "scribusdoc.h"
 
ColorChart::ColorChart(QWidget *parent, ScribusDoc* doc) : QLabel(parent), m_doc(doc)
ColorChart::ColorChart(QWidget *parent) : QLabel(parent)
{
setScaledContents( true );
setAlignment( static_cast<int>( QLabel::AlignCenter ) );
112,6 → 111,6
++p;
}
}
pmx.convertFromImage(ProofImage(&image, m_doc));
pmx.convertFromImage(ProofImage(&image));
setPixmap(pmx);
}
/branches/Version13x/Scribus/scribus/colorchart.h
28,8 → 28,6
#include <qpixmap.h>
#include "scribusapi.h"
 
class ScribusDoc;
 
/**
*@author Franz Schmid
*/
39,7 → 37,7
Q_OBJECT
 
public:
ColorChart(QWidget *parent, ScribusDoc* doc);
ColorChart(QWidget *parent);
~ColorChart() {};
void mouseMoveEvent(QMouseEvent *m);
void mousePressEvent(QMouseEvent *m);
52,9 → 50,6
int Yp;
QPixmap pmx;
 
protected:
ScribusDoc* m_doc;
 
signals:
void ColorVal(int h, int s, bool ende);
};