Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 4025 → Rev 4026

/branches/Version13x/Scribus/scribus/documentchecker.cpp
8,7 → 8,7
 
/***************************************************************************
* *
* ScApp program is free software; you can redistribute it and/or modify *
* ScMW program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
/branches/Version13x/Scribus/scribus/fileloader.cpp
236,7 → 236,7
ss->ReplacedFonts.clear();
ss->newReplacement = false;
ss->dummyFois.clear();
ret = ss->ReadPage(FileName, prefsManager->appPrefs.AvailFonts, ScApp->doc, ScApp->view, PageToLoad, Mpage);
ret = ss->ReadPage(FileName, prefsManager->appPrefs.AvailFonts, ScMW->doc, ScMW->view, PageToLoad, Mpage);
ReplacedFonts = ss->ReplacedFonts;
newReplacement = ss->newReplacement;
dummyFois = ss->dummyFois;
244,7 → 244,7
}
break;
case 1:
ret = ReadPage(FileName, prefsManager->appPrefs.AvailFonts, ScApp->doc, PageToLoad, Mpage);
ret = ReadPage(FileName, prefsManager->appPrefs.AvailFonts, ScMW->doc, PageToLoad, Mpage);
break;
default:
ret = false;
272,61 → 272,61
return false;
}
}
for (uint d = 0; d < ScApp->doc->MasterItems.count(); ++d)
for (uint d = 0; d < ScMW->doc->MasterItems.count(); ++d)
{
PageItem *it = ScApp->doc->MasterItems.at(d);
if ((!ScApp->doc->UsedFonts.contains(it->IFont)) && (!it->IFont.isEmpty()))
PageItem *it = ScMW->doc->MasterItems.at(d);
if ((!ScMW->doc->UsedFonts.contains(it->IFont)) && (!it->IFont.isEmpty()))
it->IFont = ReplacedFonts[it->IFont];
if ((it->asTextFrame()) || (it->asPathText()))
{
for (uint e = 0; e < it->itemText.count(); ++e)
{
if (!ScApp->doc->UsedFonts.contains(it->itemText.at(e)->cfont->scName()))
it->itemText.at(e)->cfont = (*ScApp->doc->AllFonts)[ReplacedFonts[it->itemText.at(e)->cfont->scName()]];
if (!ScMW->doc->UsedFonts.contains(it->itemText.at(e)->cfont->scName()))
it->itemText.at(e)->cfont = (*ScMW->doc->AllFonts)[ReplacedFonts[it->itemText.at(e)->cfont->scName()]];
}
}
}
for (uint d = 0; d < ScApp->doc->DocItems.count(); ++d)
for (uint d = 0; d < ScMW->doc->DocItems.count(); ++d)
{
PageItem *it = ScApp->doc->DocItems.at(d);
if ((!ScApp->doc->UsedFonts.contains(it->IFont)) && (!it->IFont.isEmpty()))
PageItem *it = ScMW->doc->DocItems.at(d);
if ((!ScMW->doc->UsedFonts.contains(it->IFont)) && (!it->IFont.isEmpty()))
it->IFont = ReplacedFonts[it->IFont];
if ((it->asTextFrame()) || (it->asPathText()))
{
for (uint e = 0; e < it->itemText.count(); ++e)
{
if (!ScApp->doc->UsedFonts.contains(it->itemText.at(e)->cfont->scName()))
it->itemText.at(e)->cfont = (*ScApp->doc->AllFonts)[ReplacedFonts[it->itemText.at(e)->cfont->scName()]];
if (!ScMW->doc->UsedFonts.contains(it->itemText.at(e)->cfont->scName()))
it->itemText.at(e)->cfont = (*ScMW->doc->AllFonts)[ReplacedFonts[it->itemText.at(e)->cfont->scName()]];
}
}
}
for (uint d = 0; d < ScApp->doc->FrameItems.count(); ++d)
for (uint d = 0; d < ScMW->doc->FrameItems.count(); ++d)
{
PageItem *it = ScApp->doc->FrameItems.at(d);
if ((!ScApp->doc->UsedFonts.contains(it->IFont)) && (!it->IFont.isEmpty()))
PageItem *it = ScMW->doc->FrameItems.at(d);
if ((!ScMW->doc->UsedFonts.contains(it->IFont)) && (!it->IFont.isEmpty()))
it->IFont = ReplacedFonts[it->IFont];
if ((it->asTextFrame()) || (it->asPathText()))
{
for (uint e = 0; e < it->itemText.count(); ++e)
{
if (!ScApp->doc->UsedFonts.contains(it->itemText.at(e)->cfont->scName()))
it->itemText.at(e)->cfont = (*ScApp->doc->AllFonts)[ReplacedFonts[it->itemText.at(e)->cfont->scName()]];
if (!ScMW->doc->UsedFonts.contains(it->itemText.at(e)->cfont->scName()))
it->itemText.at(e)->cfont = (*ScMW->doc->AllFonts)[ReplacedFonts[it->itemText.at(e)->cfont->scName()]];
}
}
}
for (uint a = 0; a < ScApp->doc->docParagraphStyles.count(); ++a)
for (uint a = 0; a < ScMW->doc->docParagraphStyles.count(); ++a)
{
if ((!ScApp->doc->UsedFonts.contains(ScApp->doc->docParagraphStyles[a].Font)) && (!ScApp->doc->docParagraphStyles[a].Font.isEmpty()))
ScApp->doc->docParagraphStyles[a].Font = ReplacedFonts[ScApp->doc->docParagraphStyles[a].Font];
if ((!ScMW->doc->UsedFonts.contains(ScMW->doc->docParagraphStyles[a].Font)) && (!ScMW->doc->docParagraphStyles[a].Font.isEmpty()))
ScMW->doc->docParagraphStyles[a].Font = ReplacedFonts[ScMW->doc->docParagraphStyles[a].Font];
}
QMap<QString,QString>::Iterator itfsu;
for (itfsu = ReplacedFonts.begin(); itfsu != ReplacedFonts.end(); ++itfsu)
{
if (!ScApp->doc->UsedFonts.contains(itfsu.data()))
if (!ScMW->doc->UsedFonts.contains(itfsu.data()))
{
// QFont fo = prefsManager->appPrefs.AvailFonts[itfsu.data()]->Font;
// fo.setPointSize(qRound(ScApp->doc->toolSettings.defSize / 10.0));
ScApp->doc->AddFont(itfsu.data(), qRound(ScApp->doc->toolSettings.defSize / 10.0));
// fo.setPointSize(qRound(ScMW->doc->toolSettings.defSize / 10.0));
ScMW->doc->AddFont(itfsu.data(), qRound(ScMW->doc->toolSettings.defSize / 10.0));
}
}
if (prefsManager->appPrefs.askBeforeSubstituite)
347,19 → 347,19
{
bool ret = false;
newReplacement = false;
ScApp->doc->guidesSettings.marginsShown = prefsManager->appPrefs.guidesSettings.marginsShown;
ScApp->doc->guidesSettings.framesShown = prefsManager->appPrefs.guidesSettings.framesShown;
ScApp->doc->guidesSettings.gridShown = prefsManager->appPrefs.guidesSettings.gridShown;
ScApp->doc->guidesSettings.guidesShown = prefsManager->appPrefs.guidesSettings.guidesShown;
ScApp->doc->guidesSettings.baseShown = prefsManager->appPrefs.guidesSettings.baseShown;
ScApp->doc->guidesSettings.linkShown = prefsManager->appPrefs.guidesSettings.linkShown;
ScApp->doc->toolSettings.polyC = prefsManager->appPrefs.toolSettings.polyC;
ScApp->doc->toolSettings.polyF = prefsManager->appPrefs.toolSettings.polyF;
ScApp->doc->toolSettings.polyR = prefsManager->appPrefs.toolSettings.polyR;
ScApp->doc->toolSettings.polyFd = prefsManager->appPrefs.toolSettings.polyFd;
ScApp->doc->toolSettings.polyS = prefsManager->appPrefs.toolSettings.polyS;
ScApp->doc->AutoSave = prefsManager->appPrefs.AutoSave;
ScApp->doc->AutoSaveTime = prefsManager->appPrefs.AutoSaveTime;
ScMW->doc->guidesSettings.marginsShown = prefsManager->appPrefs.guidesSettings.marginsShown;
ScMW->doc->guidesSettings.framesShown = prefsManager->appPrefs.guidesSettings.framesShown;
ScMW->doc->guidesSettings.gridShown = prefsManager->appPrefs.guidesSettings.gridShown;
ScMW->doc->guidesSettings.guidesShown = prefsManager->appPrefs.guidesSettings.guidesShown;
ScMW->doc->guidesSettings.baseShown = prefsManager->appPrefs.guidesSettings.baseShown;
ScMW->doc->guidesSettings.linkShown = prefsManager->appPrefs.guidesSettings.linkShown;
ScMW->doc->toolSettings.polyC = prefsManager->appPrefs.toolSettings.polyC;
ScMW->doc->toolSettings.polyF = prefsManager->appPrefs.toolSettings.polyF;
ScMW->doc->toolSettings.polyR = prefsManager->appPrefs.toolSettings.polyR;
ScMW->doc->toolSettings.polyFd = prefsManager->appPrefs.toolSettings.polyFd;
ScMW->doc->toolSettings.polyS = prefsManager->appPrefs.toolSettings.polyS;
ScMW->doc->AutoSave = prefsManager->appPrefs.AutoSave;
ScMW->doc->AutoSaveTime = prefsManager->appPrefs.AutoSaveTime;
ReplacedFonts.clear();
dummyFois.clear();
dummyFois.setAutoDelete(true);
369,12 → 369,12
{
ScriXmlDoc *ss = new ScriXmlDoc();
//CB: WTF? We use a slot to make the new pages? hello!
//QObject::connect(ss, SIGNAL(NewPage(int)), ScApp, SLOT(slotNewPage(int)));
//QObject::connect(ss, SIGNAL(NewPage(int)), ScMW, SLOT(slotNewPage(int)));
ss->ReplacedFonts.clear();
ss->newReplacement = false;
ss->dummyFois.clear();
ret = ss->ReadDoc(FileName, prefsManager->appPrefs.AvailFonts, ScApp->doc, ScApp->view, ScApp->mainWindowProgressBar);
//QObject::disconnect(ss, SIGNAL(NewPage(int)), ScApp, SLOT(slotNewPage(int)));
ret = ss->ReadDoc(FileName, prefsManager->appPrefs.AvailFonts, ScMW->doc, ScMW->view, ScMW->mainWindowProgressBar);
//QObject::disconnect(ss, SIGNAL(NewPage(int)), ScMW, SLOT(slotNewPage(int)));
ReplacedFonts = ss->ReplacedFonts;
newReplacement = ss->newReplacement;
dummyFois = ss->dummyFois;
382,7 → 382,7
}
break;
case 1:
ret = ReadDoc(FileName, prefsManager->appPrefs.AvailFonts, ScApp->doc, ScApp->mainWindowProgressBar);
ret = ReadDoc(FileName, prefsManager->appPrefs.AvailFonts, ScMW->doc, ScMW->mainWindowProgressBar);
break;
case 2:
ret = formatPS->loadFile(FileName);
465,11 → 465,11
else
lf.fromQColor(QColor(pg.attribute("RGB")));
if (pg.hasAttribute("Spot"))
lf.setSpotColor(static_cast<bool>(QStoInt(pg.attribute("Spot"))));
lf.setSpotColor(static_cast<bool>(pg.attribute("Spot").toInt()));
else
lf.setSpotColor(false);
if (pg.hasAttribute("Register"))
lf.setRegistrationColor(static_cast<bool>(QStoInt(pg.attribute("Register"))));
lf.setRegistrationColor(static_cast<bool>(pg.attribute("Register").toInt()));
else
lf.setRegistrationColor(false);
doc->PageColors[pg.attribute("NAME")] = lf;
483,11 → 483,11
doc->JavaScripts[pg.attribute("NAME")] = pg.attribute("SCRIPT");
if(pg.tagName()=="LAYERS")
{
la.LNr = QStoInt(pg.attribute("NUMMER"));
la.Level = QStoInt(pg.attribute("LEVEL"));
la.LNr = pg.attribute("NUMMER").toInt();
la.Level = pg.attribute("LEVEL").toInt();
la.Name = pg.attribute("NAME");
la.isViewable = QStoInt(pg.attribute("SICHTBAR"));
la.isPrintable = QStoInt(pg.attribute("DRUCKEN"));
la.isViewable = pg.attribute("SICHTBAR").toInt();
la.isPrintable = pg.attribute("DRUCKEN").toInt();
bool laex = false;
uint layerCount=doc->layerCount();
for (uint la2 = 0; la2 < layerCount; ++la2)
513,14 → 513,14
bok.Title = pg.attribute("Title");
bok.Text = pg.attribute("Text");
bok.Aktion = pg.attribute("Aktion");
bok.ItemNr = QStoInt(pg.attribute("ItemNr"));
bok.Seite = QStoInt(pg.attribute("Seite"));
bok.Element = QStoInt(pg.attribute("Element"));
bok.First = QStoInt(pg.attribute("First"));
bok.Last = QStoInt(pg.attribute("Last"));
bok.Prev = QStoInt(pg.attribute("Prev"));
bok.Next = QStoInt(pg.attribute("Next"));
bok.Parent = QStoInt(pg.attribute("Parent"));
bok.ItemNr = pg.attribute("ItemNr").toInt();
bok.Seite = pg.attribute("Seite").toInt();
bok.Element = pg.attribute("Element").toInt();
bok.First = pg.attribute("First").toInt();
bok.Last = pg.attribute("Last").toInt();
bok.Prev = pg.attribute("Prev").toInt();
bok.Next = pg.attribute("Next").toInt();
bok.Parent = pg.attribute("Parent").toInt();
doc->BookMarks.append(bok);
}
if(pg.tagName()=="MultiLine")
532,11 → 532,11
QDomElement MuL = MuLn.toElement();
struct SingleLine sl;
sl.Color = MuL.attribute("Color");
sl.Dash = QStoInt(MuL.attribute("Dash"));
sl.LineEnd = QStoInt(MuL.attribute("LineEnd"));
sl.LineJoin = QStoInt(MuL.attribute("LineJoin"));
sl.Shade = QStoInt(MuL.attribute("Shade"));
sl.Width = QStodouble(MuL.attribute("Width"));
sl.Dash = MuL.attribute("Dash").toInt();
sl.LineEnd = MuL.attribute("LineEnd").toInt();
sl.LineJoin = MuL.attribute("LineJoin").toInt();
sl.Shade = MuL.attribute("Shade").toInt();
sl.Width = MuL.attribute("Width").toDouble();
ml.push_back(sl);
MuLn = MuLn.nextSibling();
}
566,7 → 566,7
}
doc->arrowStyles.append(arrow);
}
if (((pg.tagName()=="PAGE") || (pg.tagName()=="MASTERPAGE")) && (QStoInt(pg.attribute("NUM")) == PageToLoad))
if (((pg.tagName()=="PAGE") || (pg.tagName()=="MASTERPAGE")) && (pg.attribute("NUM").toInt() == PageToLoad))
{
a = doc->currentPage->pageNr();
Apage = doc->Pages->at(a);
577,34 → 577,34
}
if (Mpage)
{
Apage->LeftPg=QStoInt(pg.attribute("LEFT","0"));
Apage->LeftPg=pg.attribute("LEFT", "0").toInt();
Apage->setPageName(pg.attribute("NAM",""));
}
if (pg.hasAttribute("Size"))
Apage->PageSize = pg.attribute("Size");
if (pg.hasAttribute("Orientation"))
Apage->PageOri = QStoInt(pg.attribute("Orientation"));
Apage->PageOri = pg.attribute("Orientation").toInt();
if (pg.hasAttribute("PAGEWIDTH"))
Apage->setWidth(QStodouble(pg.attribute("PAGEWIDTH")));
Apage->setWidth(pg.attribute("PAGEWIDTH").toDouble());
else
Apage->setWidth(QStodouble(pg.attribute("PAGEWITH")));
Apage->setHeight(QStodouble(pg.attribute("PAGEHEIGHT")));
Apage->setWidth(pg.attribute("PAGEWITH").toDouble());
Apage->setHeight(pg.attribute("PAGEHEIGHT").toDouble());
Apage->setInitialHeight(Apage->height());
Apage->setInitialWidth(Apage->width());
Apage->initialMargins.Top = QStodouble(pg.attribute("BORDERTOP"));
Apage->initialMargins.Bottom = QStodouble(pg.attribute("BORDERBOTTOM"));
Apage->initialMargins.Left = QStodouble(pg.attribute("BORDERLEFT"));
Apage->initialMargins.Right = QStodouble(pg.attribute("BORDERRIGHT"));
Apage->initialMargins.Top = pg.attribute("BORDERTOP").toDouble();
Apage->initialMargins.Bottom = pg.attribute("BORDERBOTTOM").toDouble();
Apage->initialMargins.Left = pg.attribute("BORDERLEFT").toDouble();
Apage->initialMargins.Right = pg.attribute("BORDERRIGHT").toDouble();
Apage->Margins.Top = Apage->initialMargins.Top;
Apage->Margins.Bottom = Apage->initialMargins.Bottom;
pageX = QStodouble(pg.attribute("PAGEXPOS"));
pageY = QStodouble(pg.attribute("PAGEYPOS"));
if ((pg.hasAttribute("NumVGuides")) && (QStoInt(pg.attribute("NumVGuides","0")) != 0))
pageX = pg.attribute("PAGEXPOS").toDouble();
pageY = pg.attribute("PAGEYPOS").toDouble();
if ((pg.hasAttribute("NumVGuides")) && (pg.attribute("NumVGuides", "0").toInt() != 0))
{
tmp = pg.attribute("VerticalGuides");
QTextStream fgv(&tmp, IO_ReadOnly);
Apage->YGuides.clear();
for (int cxv = 0; cxv < QStoInt(pg.attribute("NumVGuides","0")); ++cxv)
for (int cxv = 0; cxv < pg.attribute("NumVGuides", "0").toInt(); ++cxv)
{
fgv >> xf;
Apage->YGuides.append(xf);
612,12 → 612,12
qHeapSort(Apage->YGuides);
tmp = "";
}
if ((pg.hasAttribute("NumHGuides")) && (QStoInt(pg.attribute("NumHGuides","0")) != 0))
if ((pg.hasAttribute("NumHGuides")) && (pg.attribute("NumHGuides", "0").toInt() != 0))
{
tmp = pg.attribute("HorizontalGuides");
QTextStream fgh(&tmp, IO_ReadOnly);
Apage->XGuides.clear();
for (int cxh = 0; cxh < QStoInt(pg.attribute("NumHGuides","0")); ++cxh)
for (int cxh = 0; cxh < pg.attribute("NumHGuides", "0").toInt(); ++cxh)
{
fgh >> xf;
Apage->XGuides.append(xf);
633,11 → 633,11
PAGE=PAGE.nextSibling();
continue;
}
if (QStoInt(pg.attribute("OwnPage")) == PageToLoad)
if (pg.attribute("OwnPage").toInt() == PageToLoad)
{
if (QStoInt(pg.attribute("NEXTITEM")) != -1)
if (pg.attribute("NEXTITEM").toInt() != -1)
{
if (QStoInt(pg.attribute("BACKITEM")) == -1)
if (pg.attribute("BACKITEM").toInt() == -1)
LFrames.append(doc->Items->count());
}
int docGc = doc->GroupCounter;
679,9 → 679,9
if (it.tagName()=="CSTOP")
{
QString name = it.attribute("NAME");
double ramp = QStodouble(it.attribute("RAMP","0.0"));
int shade = QStoInt(it.attribute("SHADE","100"));
double opa = QStodouble(it.attribute("TRANS","1"));
double ramp = it.attribute("RAMP", "0.0").toDouble();
int shade = it.attribute("SHADE", "100").toInt();
double opa = it.attribute("TRANS", "1").toDouble();
Neu->fill_gradient.addStop(SetColor(doc, name, shade), ramp, 0.5, opa, name, shade);
}
if (it.tagName()=="ITEXT")
716,17 → 716,17
Neu->fill_gradient.addStop(doc->PageColors[doc->toolSettings.dBrush].getRGBColor(), 0.0, 0.5, 1.0, doc->toolSettings.dBrush, 100);
Neu->fill_gradient.addStop(doc->PageColors[doc->toolSettings.dPen].getRGBColor(), 1.0, 0.5, 1.0, doc->toolSettings.dPen, 100);
}
// Neu->Language = ScApp->GetLang(pg.attribute("LANGUAGE", doc->Language));
// Neu->Language = ScMW->GetLang(pg.attribute("LANGUAGE", doc->Language));
Neu->Language = doc->Language;
Neu->isAutoText = static_cast<bool>(QStoInt(pg.attribute("AUTOTEXT")));
Neu->isEmbedded = static_cast<bool>(QStoInt(pg.attribute("isInline","0")));
Neu->gXpos = QStodouble(pg.attribute("gXpos","0.0"));
Neu->gYpos = QStodouble(pg.attribute("gYpos","0.0"));
Neu->isAutoText = static_cast<bool>(pg.attribute("AUTOTEXT").toInt());
Neu->isEmbedded = static_cast<bool>(pg.attribute("isInline", "0").toInt());
Neu->gXpos = pg.attribute("gXpos", "0.0").toDouble();
Neu->gYpos = pg.attribute("gYpos", "0.0").toDouble();
QString defaultVal;
defaultVal.setNum(Neu->width());
Neu->gWidth = QStodouble(pg.attribute("gWidth",defaultVal));
Neu->gWidth = pg.attribute("gWidth",defaultVal).toDouble();
defaultVal.setNum(Neu->height());
Neu->gHeight = QStodouble(pg.attribute("gHeight",defaultVal));
Neu->gHeight = pg.attribute("gHeight",defaultVal).toDouble();
if (Neu->LineSpMode == 3)
{
doc->docParagraphStyles[0].BaseAdj = true;
734,11 → 734,11
}
if (Neu->isAutoText)
doc->LastAuto = Neu;
Neu->NextIt = baseobj + QStoInt(pg.attribute("NEXTITEM"));
Neu->NextIt = baseobj + pg.attribute("NEXTITEM").toInt();
if (Neu->isTableItem)
{
TableItems.append(Neu);
TableID.insert(QStoInt(pg.attribute("OwnLINK","0")), Neu->ItemNr);
TableID.insert(pg.attribute("OwnLINK", "0").toInt(), Neu->ItemNr);
}
if (pg.tagName()=="FRAMEOBJECT")
{
851,15 → 851,15
//CB Add this in to set this in the file in memory. Its saved, why not load it.
//Will of course be replaced by per page settings although we still probably need a document default
doc->PageSize = dc.attribute("PAGESIZE");
doc->PageOri = QStoInt(dc.attribute("ORIENTATION","0"));
doc->FirstPnum = QStoInt(dc.attribute("FIRSTNUM","1"));
doc->currentPageLayout=QStoInt(dc.attribute("BOOK", "0"));
doc->PageOri = dc.attribute("ORIENTATION", "0").toInt();
doc->FirstPnum = dc.attribute("FIRSTNUM", "1").toInt();
doc->currentPageLayout=dc.attribute("BOOK", "0").toInt();
int fp;
if (doc->currentPageLayout == 0)
fp = 0;
else
{
if (QStoInt(dc.attribute("FIRSTLEFT","0")) == 1)
if (dc.attribute("FIRSTLEFT", "0").toInt() == 1)
fp = 0;
else
fp = 1;
867,15 → 867,15
if (DOC.namedItem("PageSets").isNull())
{
doc->pageSets[doc->currentPageLayout].FirstPage = fp;
doc->pageSets[doc->currentPageLayout].GapHorizontal = QStodouble(dc.attribute("GapHorizontal", "0"));
doc->pageSets[doc->currentPageLayout].GapHorizontal = dc.attribute("GapHorizontal", "0").toDouble();
doc->pageSets[doc->currentPageLayout].GapVertical = 0.0;
doc->pageSets[doc->currentPageLayout].GapBelow = QStodouble(dc.attribute("GapVertical", "40"));
doc->pageSets[doc->currentPageLayout].GapBelow = dc.attribute("GapVertical", "40").toDouble();
}
doc->setUsesAutomaticTextFrames(QStoInt(dc.attribute("AUTOTEXT")));
doc->PageSp=QStoInt(dc.attribute("AUTOSPALTEN"));
doc->PageSpa=QStodouble(dc.attribute("ABSTSPALTEN"));
doc->setUnitIndex(QStoInt(dc.attribute("UNITS","0")));
doc->toolSettings.defSize=qRound(QStodouble(dc.attribute("DSIZE")) * 10);
doc->setUsesAutomaticTextFrames(dc.attribute("AUTOTEXT").toInt());
doc->PageSp=dc.attribute("AUTOSPALTEN").toInt();
doc->PageSpa=dc.attribute("ABSTSPALTEN").toDouble();
doc->setUnitIndex(dc.attribute("UNITS", "0").toInt());
doc->toolSettings.defSize=qRound(dc.attribute("DSIZE").toDouble() * 10);
Defont=dc.attribute("DFONT");
if ((!avail.find(Defont)) || (!avail[Defont]->UseFont))
{
889,8 → 889,8
doc->AddFont(Defont, qRound(doc->toolSettings.defSize / 10.0));
}
doc->toolSettings.defFont = Defont;
doc->toolSettings.dCols=QStoInt(dc.attribute("DCOL", "1"));
doc->toolSettings.dGap=QStodouble(dc.attribute("DGAP", "0.0"));
doc->toolSettings.dCols=dc.attribute("DCOL", "1").toInt();
doc->toolSettings.dGap=dc.attribute("DGAP", "0.0").toDouble();
doc->documentInfo.setAuthor(dc.attribute("AUTHOR"));
doc->documentInfo.setComments(dc.attribute("COMMENTS"));
doc->documentInfo.setKeywords(dc.attribute("KEYWORDS",""));
906,87 → 906,87
doc->documentInfo.setCover(dc.attribute("DOCCOVER", ""));
doc->documentInfo.setRights(dc.attribute("DOCRIGHTS", ""));
doc->documentInfo.setContrib(dc.attribute("DOCCONTRIB", ""));
doc->typographicSettings.valueSuperScript = QStoInt(dc.attribute("VHOCH"));
doc->typographicSettings.scalingSuperScript = QStoInt(dc.attribute("VHOCHSC"));
doc->typographicSettings.valueSubScript = QStoInt(dc.attribute("VTIEF"));
doc->typographicSettings.scalingSubScript = QStoInt(dc.attribute("VTIEFSC"));
doc->typographicSettings.valueSmallCaps = QStoInt(dc.attribute("VKAPIT"));
doc->typographicSettings.valueBaseGrid = QStodouble(dc.attribute("BASEGRID", "12"));
doc->typographicSettings.offsetBaseGrid = QStodouble(dc.attribute("BASEO", "0"));
doc->typographicSettings.autoLineSpacing = QStoInt(dc.attribute("AUTOL","20"));
doc->typographicSettings.valueUnderlinePos = QStoInt(dc.attribute("UnderlinePos","-1"));
doc->typographicSettings.valueUnderlineWidth = QStoInt(dc.attribute("UnderlineWidth","-1"));
doc->typographicSettings.valueStrikeThruPos = QStoInt(dc.attribute("StrikeThruPos","-1"));
doc->typographicSettings.valueStrikeThruWidth = QStoInt(dc.attribute("StrikeThruWidth","-1"));
doc->GroupCounter=QStoInt(dc.attribute("GROUPC","1"));
doc->HasCMS = static_cast<bool>(QStoInt(dc.attribute("HCMS","0")));
doc->CMSSettings.SoftProofOn = static_cast<bool>(QStoInt(dc.attribute("DPSo","0")));
doc->CMSSettings.CMSinUse = static_cast<bool>(QStoInt(dc.attribute("DPuse","0")));
doc->CMSSettings.GamutCheck = static_cast<bool>(QStoInt(dc.attribute("DPgam","0")));
doc->CMSSettings.BlackPoint = static_cast<bool>(QStoInt(dc.attribute("DPbla","1")));
doc->typographicSettings.valueSuperScript = dc.attribute("VHOCH").toInt();
doc->typographicSettings.scalingSuperScript = dc.attribute("VHOCHSC").toInt();
doc->typographicSettings.valueSubScript = dc.attribute("VTIEF").toInt();
doc->typographicSettings.scalingSubScript = dc.attribute("VTIEFSC").toInt();
doc->typographicSettings.valueSmallCaps = dc.attribute("VKAPIT").toInt();
doc->typographicSettings.valueBaseGrid = dc.attribute("BASEGRID", "12").toDouble();
doc->typographicSettings.offsetBaseGrid = dc.attribute("BASEO", "0").toDouble();
doc->typographicSettings.autoLineSpacing = dc.attribute("AUTOL", "20").toInt();
doc->typographicSettings.valueUnderlinePos = dc.attribute("UnderlinePos", "-1").toInt();
doc->typographicSettings.valueUnderlineWidth = dc.attribute("UnderlineWidth", "-1").toInt();
doc->typographicSettings.valueStrikeThruPos = dc.attribute("StrikeThruPos", "-1").toInt();
doc->typographicSettings.valueStrikeThruWidth = dc.attribute("StrikeThruWidth", "-1").toInt();
doc->GroupCounter=dc.attribute("GROUPC", "1").toInt();
doc->HasCMS = static_cast<bool>(dc.attribute("HCMS", "0").toInt());
doc->CMSSettings.SoftProofOn = static_cast<bool>(dc.attribute("DPSo", "0").toInt());
doc->CMSSettings.CMSinUse = static_cast<bool>(dc.attribute("DPuse", "0").toInt());
doc->CMSSettings.GamutCheck = static_cast<bool>(dc.attribute("DPgam", "0").toInt());
doc->CMSSettings.BlackPoint = static_cast<bool>(dc.attribute("DPbla", "1").toInt());
doc->CMSSettings.DefaultMonitorProfile = dc.attribute("DPMo","");
doc->CMSSettings.DefaultPrinterProfile = dc.attribute("DPPr","");
doc->CMSSettings.DefaultImageRGBProfile = dc.attribute("DPIn","");
doc->CMSSettings.DefaultImageCMYKProfile = dc.attribute("DPInCMYK","");
doc->CMSSettings.DefaultSolidColorProfile = dc.attribute("DPIn2","");
doc->CMSSettings.DefaultIntentPrinter = QStoInt(dc.attribute("DIPr","0"));
doc->CMSSettings.DefaultIntentMonitor = QStoInt(dc.attribute("DIMo","1"));
doc->CMSSettings.DefaultIntentImages = QStoInt(dc.attribute("DIMo2","1"));
layerToSetActive=QStoInt(dc.attribute("ALAYER","0"));
doc->CMSSettings.DefaultIntentPrinter = dc.attribute("DIPr", "0").toInt();
doc->CMSSettings.DefaultIntentMonitor = dc.attribute("DIMo", "1").toInt();
doc->CMSSettings.DefaultIntentImages = dc.attribute("DIMo2", "1").toInt();
layerToSetActive=dc.attribute("ALAYER", "0").toInt();
doc->Language = dc.attribute("LANGUAGE", "");
doc->MinWordLen = QStoInt(dc.attribute("MINWORDLEN", "3"));
doc->HyCount = QStoInt(dc.attribute("HYCOUNT", "2"));
doc->MinWordLen = dc.attribute("MINWORDLEN", "3").toInt();
doc->HyCount = dc.attribute("HYCOUNT", "2").toInt();
if (dc.hasAttribute("PAGEWIDTH"))
doc->pageWidth=QStodouble(dc.attribute("PAGEWIDTH"));
doc->pageWidth=dc.attribute("PAGEWIDTH").toDouble();
else
doc->pageWidth=QStodouble(dc.attribute("PAGEWITH"));
doc->pageHeight=QStodouble(dc.attribute("PAGEHEIGHT"));
doc->pageMargins.Left=QStodouble(dc.attribute("BORDERLEFT"));
doc->pageMargins.Right=QStodouble(dc.attribute("BORDERRIGHT"));
doc->pageMargins.Top=QStodouble(dc.attribute("BORDERTOP"));
doc->pageMargins.Bottom=QStodouble(dc.attribute("BORDERBOTTOM"));
doc->Automatic = static_cast<bool>(QStoInt(dc.attribute("AUTOMATIC", "1")));
doc->AutoCheck = static_cast<bool>(QStoInt(dc.attribute("AUTOCHECK", "0")));
doc->GuideLock = static_cast<bool>(QStoInt(dc.attribute("GUIDELOCK", "0")));
doc->guidesSettings.minorGrid = QStodouble(dc.attribute("MINGRID", tmp.setNum(prefsManager->appPrefs.guidesSettings.minorGrid)));
doc->guidesSettings.majorGrid = QStodouble(dc.attribute("MAJGRID", tmp.setNum(prefsManager->appPrefs.guidesSettings.majorGrid)));
doc->guidesSettings.gridShown = static_cast<bool>(QStoInt(dc.attribute("SHOWGRID", "0")));
doc->guidesSettings.guidesShown = static_cast<bool>(QStoInt(dc.attribute("SHOWGUIDES", "1")));
doc->guidesSettings.framesShown = static_cast<bool>(QStoInt(dc.attribute("SHOWFRAME", "1")));
doc->guidesSettings.marginsShown = static_cast<bool>(QStoInt(dc.attribute("SHOWMARGIN", "1")));
doc->guidesSettings.baseShown = static_cast<bool>(QStoInt(dc.attribute("SHOWBASE", "0")));
doc->guidesSettings.showPic = static_cast<bool>(QStoInt(dc.attribute("SHOWPICT", "1")));
doc->guidesSettings.linkShown = static_cast<bool>(QStoInt(dc.attribute("SHOWLINK", "0")));
doc->guidesSettings.showControls = static_cast<bool>(QStoInt(dc.attribute("SHOWControl","0")));
doc->guidesSettings.rulerMode = static_cast<bool>(QStoInt(dc.attribute("rulerMode","1")));
doc->rulerXoffset = QStodouble(dc.attribute("rulerXoffset", "0"));
doc->rulerYoffset =QStodouble(dc.attribute("rulerYoffset", "0"));
doc->SnapGuides = static_cast<bool>(QStoInt(dc.attribute("SnapToGuides","0")));
doc->useRaster = static_cast<bool>(QStoInt(dc.attribute("SnapToGrid","0")));
doc->toolSettings.polyC = QStoInt(dc.attribute("POLYC", "4"));
doc->toolSettings.polyF = QStodouble(dc.attribute("POLYF", "0.5"));
doc->toolSettings.polyR = QStodouble(dc.attribute("POLYR", "0"));
doc->toolSettings.polyFd = QStoInt(dc.attribute("POLYFD", "0"));
doc->toolSettings.polyS = static_cast<bool>(QStoInt(dc.attribute("POLYS", "0")));
doc->AutoSave = static_cast<bool>(QStoInt(dc.attribute("AutoSave","0")));
doc->AutoSaveTime = QStoInt(dc.attribute("AutoSaveTime","600000"));
doc->ScratchBottom = QStodouble(dc.attribute("ScratchBottom", "20"));
doc->pageWidth=dc.attribute("PAGEWITH").toDouble();
doc->pageHeight=dc.attribute("PAGEHEIGHT").toDouble();
doc->pageMargins.Left=dc.attribute("BORDERLEFT").toDouble();
doc->pageMargins.Right=dc.attribute("BORDERRIGHT").toDouble();
doc->pageMargins.Top=dc.attribute("BORDERTOP").toDouble();
doc->pageMargins.Bottom=dc.attribute("BORDERBOTTOM").toDouble();
doc->Automatic = static_cast<bool>(dc.attribute("AUTOMATIC", "1").toInt());
doc->AutoCheck = static_cast<bool>(dc.attribute("AUTOCHECK", "0").toInt());
doc->GuideLock = static_cast<bool>(dc.attribute("GUIDELOCK", "0").toInt());
doc->guidesSettings.minorGrid = dc.attribute("MINGRID", tmp.setNum(prefsManager->appPrefs.guidesSettings.minorGrid)).toDouble();
doc->guidesSettings.majorGrid = dc.attribute("MAJGRID", tmp.setNum(prefsManager->appPrefs.guidesSettings.majorGrid)).toDouble();
doc->guidesSettings.gridShown = static_cast<bool>(dc.attribute("SHOWGRID", "0").toInt());
doc->guidesSettings.guidesShown = static_cast<bool>(dc.attribute("SHOWGUIDES", "1").toInt());
doc->guidesSettings.framesShown = static_cast<bool>(dc.attribute("SHOWFRAME", "1").toInt());
doc->guidesSettings.marginsShown = static_cast<bool>(dc.attribute("SHOWMARGIN", "1").toInt());
doc->guidesSettings.baseShown = static_cast<bool>(dc.attribute("SHOWBASE", "0").toInt());
doc->guidesSettings.showPic = static_cast<bool>(dc.attribute("SHOWPICT", "1").toInt());
doc->guidesSettings.linkShown = static_cast<bool>(dc.attribute("SHOWLINK", "0").toInt());
doc->guidesSettings.showControls = static_cast<bool>(dc.attribute("SHOWControl", "0").toInt());
doc->guidesSettings.rulerMode = static_cast<bool>(dc.attribute("rulerMode", "1").toInt());
doc->rulerXoffset = dc.attribute("rulerXoffset", "0").toDouble();
doc->rulerYoffset =dc.attribute("rulerYoffset", "0").toDouble();
doc->SnapGuides = static_cast<bool>(dc.attribute("SnapToGuides", "0").toInt());
doc->useRaster = static_cast<bool>(dc.attribute("SnapToGrid", "0").toInt());
doc->toolSettings.polyC = dc.attribute("POLYC", "4").toInt();
doc->toolSettings.polyF = dc.attribute("POLYF", "0.5").toDouble();
doc->toolSettings.polyR = dc.attribute("POLYR", "0").toDouble();
doc->toolSettings.polyFd = dc.attribute("POLYFD", "0").toInt();
doc->toolSettings.polyS = static_cast<bool>(dc.attribute("POLYS", "0").toInt());
doc->AutoSave = static_cast<bool>(dc.attribute("AutoSave", "0").toInt());
doc->AutoSaveTime = dc.attribute("AutoSaveTime", "600000").toInt();
doc->ScratchBottom = dc.attribute("ScratchBottom", "20").toDouble();
// FIXME A typo in early 1.3cvs (MAR 05) means we must support loading of
// FIXME 'ScatchLeft' for a while too. This can be removed in a few months.
if (dc.hasAttribute("ScatchLeft"))
doc->ScratchLeft = QStodouble(dc.attribute("ScatchLeft", "100"));
doc->ScratchLeft = dc.attribute("ScatchLeft", "100").toDouble();
else
doc->ScratchLeft = QStodouble(dc.attribute("ScratchLeft", "100"));
doc->ScratchRight = QStodouble(dc.attribute("ScratchRight", "100"));
doc->ScratchTop = QStodouble(dc.attribute("ScratchTop", "20"));
doc->toolSettings.dStartArrow = QStoInt(dc.attribute("StartArrow", "0"));
doc->toolSettings.dEndArrow = QStoInt(dc.attribute("EndArrow", "0"));
doc->toolSettings.scaleX = QStodouble(dc.attribute("PICTSCX","1"));
doc->toolSettings.scaleY = QStodouble(dc.attribute("PICTSCY","1"));
doc->toolSettings.scaleType = static_cast<bool>(QStoInt(dc.attribute("PSCALE", "1")));
doc->toolSettings.aspectRatio = static_cast<bool>(QStoInt(dc.attribute("PASPECT", "0")));
doc->toolSettings.lowResType = QStoInt(dc.attribute("HalfRes", "1"));
doc->toolSettings.useEmbeddedPath = static_cast<bool>(QStoInt(dc.attribute("EmbeddedPath", "0")));
doc->ScratchLeft = dc.attribute("ScratchLeft", "100").toDouble();
doc->ScratchRight = dc.attribute("ScratchRight", "100").toDouble();
doc->ScratchTop = dc.attribute("ScratchTop", "20").toDouble();
doc->toolSettings.dStartArrow = dc.attribute("StartArrow", "0").toInt();
doc->toolSettings.dEndArrow = dc.attribute("EndArrow", "0").toInt();
doc->toolSettings.scaleX = dc.attribute("PICTSCX", "1").toDouble();
doc->toolSettings.scaleY = dc.attribute("PICTSCY", "1").toDouble();
doc->toolSettings.scaleType = static_cast<bool>(dc.attribute("PSCALE", "1").toInt());
doc->toolSettings.aspectRatio = static_cast<bool>(dc.attribute("PASPECT", "0").toInt());
doc->toolSettings.lowResType = dc.attribute("HalfRes", "1").toInt();
doc->toolSettings.useEmbeddedPath = static_cast<bool>(dc.attribute("EmbeddedPath", "0").toInt());
if (dc.hasAttribute("PEN"))
doc->toolSettings.dPen = dc.attribute("PEN");
if (dc.hasAttribute("BRUSH"))
999,25 → 999,25
doc->toolSettings.dStrokeText = dc.attribute("StrokeText");
doc->toolSettings.dTextBackGround = dc.attribute("TextBackGround", "None");
doc->toolSettings.dTextLineColor = dc.attribute("TextLineColor", "None");
doc->toolSettings.dTextBackGroundShade = QStoInt(dc.attribute("TextBackGroundShade", "100"));
doc->toolSettings.dTextLineShade = QStoInt(dc.attribute("TextLineShade", "100"));
doc->toolSettings.dTextPenShade = QStoInt(dc.attribute("TextPenShade", "100"));
doc->toolSettings.dTextStrokeShade = QStoInt(dc.attribute("TextStrokeShade", "100"));
doc->toolSettings.dLineArt = static_cast<Qt::PenStyle>(QStoInt(dc.attribute("STIL")));
doc->toolSettings.dLstyleLine = static_cast<Qt::PenStyle>(QStoInt(dc.attribute("STILLINE")));
doc->toolSettings.dWidth = QStodouble(dc.attribute("WIDTH", "1"));
doc->toolSettings.dWidthLine = QStodouble(dc.attribute("WIDTHLINE", "1"));
doc->toolSettings.dShade2 = QStoInt(dc.attribute("PENSHADE", "100"));
doc->toolSettings.dShadeLine = QStoInt(dc.attribute("LINESHADE", "100"));
doc->toolSettings.dShade = QStoInt(dc.attribute("BRUSHSHADE", "100"));
doc->toolSettings.magMin = QStoInt(dc.attribute("MAGMIN","10"));
doc->toolSettings.magMax = QStoInt(dc.attribute("MAGMAX","3200"));
doc->toolSettings.magStep = QStoInt(dc.attribute("MAGSTEP","25"));
doc->toolSettings.dTextBackGroundShade = dc.attribute("TextBackGroundShade", "100").toInt();
doc->toolSettings.dTextLineShade = dc.attribute("TextLineShade", "100").toInt();
doc->toolSettings.dTextPenShade = dc.attribute("TextPenShade", "100").toInt();
doc->toolSettings.dTextStrokeShade = dc.attribute("TextStrokeShade", "100").toInt();
doc->toolSettings.dLineArt = static_cast<Qt::PenStyle>(dc.attribute("STIL").toInt());
doc->toolSettings.dLstyleLine = static_cast<Qt::PenStyle>(dc.attribute("STILLINE").toInt());
doc->toolSettings.dWidth = dc.attribute("WIDTH", "1").toDouble();
doc->toolSettings.dWidthLine = dc.attribute("WIDTHLINE", "1").toDouble();
doc->toolSettings.dShade2 = dc.attribute("PENSHADE", "100").toInt();
doc->toolSettings.dShadeLine = dc.attribute("LINESHADE", "100").toInt();
doc->toolSettings.dShade = dc.attribute("BRUSHSHADE", "100").toInt();
doc->toolSettings.magMin = dc.attribute("MAGMIN", "10").toInt();
doc->toolSettings.magMax = dc.attribute("MAGMAX", "3200").toInt();
doc->toolSettings.magStep = dc.attribute("MAGSTEP", "25").toInt();
doc->toolSettings.tabFillChar = dc.attribute("TabFill","");
doc->toolSettings.dTabWidth=QStodouble(dc.attribute("TabWidth", "36.0"));
doc->toolSettings.dTabWidth=dc.attribute("TabWidth", "36.0").toDouble();
if (dc.hasAttribute("CPICT"))
doc->toolSettings.dBrushPict = dc.attribute("CPICT");
doc->toolSettings.shadePict = QStoInt(dc.attribute("PICTSHADE","100"));
doc->toolSettings.shadePict = dc.attribute("PICTSHADE", "100").toInt();
if (dc.hasAttribute("PAGEC"))
doc->papColor = QColor(dc.attribute("PAGEC"));
if (dc.hasAttribute("MARGC"))
1030,10 → 1030,10
doc->guidesSettings.guideColor = QColor(dc.attribute("GuideC"));
if (dc.hasAttribute("BaseC"))
doc->guidesSettings.baseColor = QColor(dc.attribute("BaseC"));
doc->marginColored = static_cast<bool>(QStoInt(dc.attribute("RANDF","0")));
doc->guidesSettings.before = static_cast<bool>(QStoInt(dc.attribute("BACKG","1")));
doc->guidesSettings.guideRad = QStodouble(dc.attribute("GuideRad","10"));
doc->guidesSettings.grabRad = QStoInt(dc.attribute("GRAB","4"));
doc->marginColored = static_cast<bool>(dc.attribute("RANDF", "0").toInt());
doc->guidesSettings.before = static_cast<bool>(dc.attribute("BACKG", "1").toInt());
doc->guidesSettings.guideRad = dc.attribute("GuideRad", "10").toDouble();
doc->guidesSettings.grabRad = dc.attribute("GRAB", "4").toInt();
if (dc.hasAttribute("currentProfile"))
{
doc->checkerProfiles.clear();
1058,12 → 1058,12
{
struct PageSet pageS;
pageS.Name = PgsAttr.attribute("Name");
pageS.FirstPage = QStoInt(PgsAttr.attribute("FirstPage","0"));
pageS.Rows = QStoInt(PgsAttr.attribute("Rows","1"));
pageS.Columns = QStoInt(PgsAttr.attribute("Columns","1"));
pageS.GapHorizontal = QStodouble(PgsAttr.attribute("GapHorizontal","0"));
pageS.GapVertical = QStodouble(PgsAttr.attribute("GapVertical","0"));
pageS.GapBelow = QStodouble(PgsAttr.attribute("GapBelow","0"));
pageS.FirstPage = PgsAttr.attribute("FirstPage", "0").toInt();
pageS.Rows = PgsAttr.attribute("Rows", "1").toInt();
pageS.Columns = PgsAttr.attribute("Columns", "1").toInt();
pageS.GapHorizontal = PgsAttr.attribute("GapHorizontal", "0").toDouble();
pageS.GapVertical = PgsAttr.attribute("GapVertical", "0").toDouble();
pageS.GapBelow = PgsAttr.attribute("GapBelow", "0").toDouble();
pageS.pageNames.clear();
QDomNode PGSN = PGS.firstChild();
while(!PGSN.isNull())
1081,17 → 1081,17
if (pg.tagName()=="CheckProfile")
{
struct checkerPrefs checkerSettings;
checkerSettings.ignoreErrors = static_cast<bool>(QStoInt(pg.attribute("ignoreErrors", "0")));
checkerSettings.autoCheck = static_cast<bool>(QStoInt(pg.attribute("autoCheck", "1")));
checkerSettings.checkGlyphs = static_cast<bool>(QStoInt(pg.attribute("checkGlyphs", "1")));
checkerSettings.checkOrphans = static_cast<bool>(QStoInt(pg.attribute("checkOrphans", "1")));
checkerSettings.checkOverflow = static_cast<bool>(QStoInt(pg.attribute("checkOverflow", "1")));
checkerSettings.checkPictures = static_cast<bool>(QStoInt(pg.attribute("checkPictures", "1")));
checkerSettings.checkResolution = static_cast<bool>(QStoInt(pg.attribute("checkResolution", "1")));
checkerSettings.checkTransparency = static_cast<bool>(QStoInt(pg.attribute("checkTransparency", "1")));
checkerSettings.minResolution = QStodouble(pg.attribute("minResolution","72"));
checkerSettings.checkAnnotations = static_cast<bool>(QStoInt(pg.attribute("checkAnnotations", "0")));
checkerSettings.checkRasterPDF = static_cast<bool>(QStoInt(pg.attribute("checkRasterPDF", "1")));
checkerSettings.ignoreErrors = static_cast<bool>(pg.attribute("ignoreErrors", "0").toInt());
checkerSettings.autoCheck = static_cast<bool>(pg.attribute("autoCheck", "1").toInt());
checkerSettings.checkGlyphs = static_cast<bool>(pg.attribute("checkGlyphs", "1").toInt());
checkerSettings.checkOrphans = static_cast<bool>(pg.attribute("checkOrphans", "1").toInt());
checkerSettings.checkOverflow = static_cast<bool>(pg.attribute("checkOverflow", "1").toInt());
checkerSettings.checkPictures = static_cast<bool>(pg.attribute("checkPictures", "1").toInt());
checkerSettings.checkResolution = static_cast<bool>(pg.attribute("checkResolution", "1").toInt());
checkerSettings.checkTransparency = static_cast<bool>(pg.attribute("checkTransparency", "1").toInt());
checkerSettings.minResolution = pg.attribute("minResolution", "72").toDouble();
checkerSettings.checkAnnotations = static_cast<bool>(pg.attribute("checkAnnotations", "0").toInt());
checkerSettings.checkRasterPDF = static_cast<bool>(pg.attribute("checkRasterPDF", "1").toInt());
doc->checkerProfiles[pg.attribute("Name")] = checkerSettings;
}
// 10/25/2004 pv - None is "reserved" color. cannot be defined in any file...
1102,11 → 1102,11
else
lf.fromQColor(QColor(pg.attribute("RGB")));
if (pg.hasAttribute("Spot"))
lf.setSpotColor(static_cast<bool>(QStoInt(pg.attribute("Spot"))));
lf.setSpotColor(static_cast<bool>(pg.attribute("Spot").toInt()));
else
lf.setSpotColor(false);
if (pg.hasAttribute("Register"))
lf.setRegistrationColor(static_cast<bool>(QStoInt(pg.attribute("Register"))));
lf.setRegistrationColor(static_cast<bool>(pg.attribute("Register").toInt()));
else
lf.setRegistrationColor(false);
doc->PageColors[pg.attribute("NAME")] = lf;
1114,13 → 1114,13
if(pg.tagName()=="STYLE")
{
vg.Vname = pg.attribute("NAME");
vg.LineSpaMode = QStoInt(pg.attribute("LINESPMode","0"));
vg.LineSpa = QStodouble(pg.attribute("LINESP"));
vg.Indent = QStodouble(pg.attribute("INDENT","0"));
vg.First = QStodouble(pg.attribute("FIRST","0"));
vg.textAlignment = QStoInt(pg.attribute("ALIGN"));
vg.gapBefore = QStodouble(pg.attribute("VOR","0"));
vg.gapAfter = QStodouble(pg.attribute("NACH","0"));
vg.LineSpaMode = pg.attribute("LINESPMode", "0").toInt();
vg.LineSpa = pg.attribute("LINESP").toDouble();
vg.Indent = pg.attribute("INDENT", "0").toDouble();
vg.First = pg.attribute("FIRST", "0").toDouble();
vg.textAlignment = pg.attribute("ALIGN").toInt();
vg.gapBefore = pg.attribute("VOR", "0").toDouble();
vg.gapAfter = pg.attribute("NACH", "0").toDouble();
tmpf = pg.attribute("FONT", doc->toolSettings.defFont);
if ((!avail.find(tmpf)) || (!avail[tmpf]->UseFont))
{
1142,34 → 1142,34
}
}
vg.Font = tmpf;
vg.FontSize = qRound(QStodouble(pg.attribute("FONTSIZE","12")) * 10.0);
vg.Drop = static_cast<bool>(QStoInt(pg.attribute("DROP","0")));
vg.DropLin = QStoInt(pg.attribute("DROPLIN","2"));
vg.DropDist = QStodouble(pg.attribute("DROPDIST","0"));
vg.FontEffect = QStoInt(pg.attribute("EFFECT","0"));
vg.FontSize = qRound(pg.attribute("FONTSIZE", "12").toDouble() * 10.0);
vg.Drop = static_cast<bool>(pg.attribute("DROP", "0").toInt());
vg.DropLin = pg.attribute("DROPLIN", "2").toInt();
vg.DropDist = pg.attribute("DROPDIST", "0").toDouble();
vg.FontEffect = pg.attribute("EFFECT", "0").toInt();
vg.FColor = pg.attribute("FCOLOR", doc->toolSettings.dBrush);
vg.FShade = QStoInt(pg.attribute("FSHADE","100"));
vg.FShade = pg.attribute("FSHADE", "100").toInt();
vg.SColor = pg.attribute("SCOLOR", doc->toolSettings.dPen);
vg.SShade = QStoInt(pg.attribute("SSHADE","100"));
vg.BaseAdj = static_cast<bool>(QStoInt(pg.attribute("BASE","0")));
vg.txtShadowX=qRound(QStodouble(pg.attribute("TXTSHX", "5")) * 10);
vg.txtShadowY=qRound(QStodouble(pg.attribute("TXTSHY", "-5")) * 10);
vg.txtOutline=qRound(QStodouble(pg.attribute("TXTOUT", "1")) * 10);
vg.txtUnderPos=qRound(QStodouble(pg.attribute("TXTULP", "-0.1")) * 10);
vg.txtUnderWidth=qRound(QStodouble(pg.attribute("TXTULW", "-0.1")) * 10);
vg.txtStrikePos=qRound(QStodouble(pg.attribute("TXTSTP", "-0.1")) * 10);
vg.txtStrikeWidth=qRound(QStodouble(pg.attribute("TXTSTW", "-0.1")) * 10);
vg.scaleH = qRound(QStodouble(pg.attribute("SCALEH", "100")) * 10);
vg.scaleV = qRound(QStodouble(pg.attribute("SCALEV", "100")) * 10);
vg.baseOff = qRound(QStodouble(pg.attribute("BASEO", "0")) * 10);
vg.kernVal = qRound(QStodouble(pg.attribute("KERN", "0")) * 10);
vg.SShade = pg.attribute("SSHADE", "100").toInt();
vg.BaseAdj = static_cast<bool>(pg.attribute("BASE", "0").toInt());
vg.txtShadowX=qRound(pg.attribute("TXTSHX", "5").toDouble() * 10);
vg.txtShadowY=qRound(pg.attribute("TXTSHY", "-5").toDouble() * 10);
vg.txtOutline=qRound(pg.attribute("TXTOUT", "1").toDouble() * 10);
vg.txtUnderPos=qRound(pg.attribute("TXTULP", "-0.1").toDouble() * 10);
vg.txtUnderWidth=qRound(pg.attribute("TXTULW", "-0.1").toDouble() * 10);
vg.txtStrikePos=qRound(pg.attribute("TXTSTP", "-0.1").toDouble() * 10);
vg.txtStrikeWidth=qRound(pg.attribute("TXTSTW", "-0.1").toDouble() * 10);
vg.scaleH = qRound(pg.attribute("SCALEH", "100").toDouble() * 10);
vg.scaleV = qRound(pg.attribute("SCALEV", "100").toDouble() * 10);
vg.baseOff = qRound(pg.attribute("BASEO", "0").toDouble() * 10);
vg.kernVal = qRound(pg.attribute("KERN", "0").toDouble() * 10);
vg.TabValues.clear();
if ((pg.hasAttribute("NUMTAB")) && (QStoInt(pg.attribute("NUMTAB","0")) != 0))
if ((pg.hasAttribute("NUMTAB")) && (pg.attribute("NUMTAB", "0").toInt() != 0))
{
struct PageItem::TabRecord tb;
tmp = pg.attribute("TABS");
QTextStream tgv(&tmp, IO_ReadOnly);
for (int cxv = 0; cxv < QStoInt(pg.attribute("NUMTAB","0")); cxv += 2)
for (int cxv = 0; cxv < pg.attribute("NUMTAB", "0").toInt(); cxv += 2)
{
tgv >> xf;
tgv >> xf2;
1189,8 → 1189,8
if (it.tagName()=="Tabs")
{
struct PageItem::TabRecord tb;
tb.tabPosition = QStodouble(it.attribute("Pos"));
tb.tabType = QStoInt(it.attribute("Type"));
tb.tabPosition = it.attribute("Pos").toDouble();
tb.tabType = it.attribute("Type").toInt();
QString tbCh = "";
tbCh = it.attribute("Fill","");
if (tbCh.isEmpty())
1208,11 → 1208,11
doc->JavaScripts[pg.attribute("NAME")] = pg.attribute("SCRIPT");
if(pg.tagName()=="LAYERS")
{
la.LNr = QStoInt(pg.attribute("NUMMER"));
la.Level = QStoInt(pg.attribute("LEVEL"));
la.LNr = pg.attribute("NUMMER").toInt();
la.Level = pg.attribute("LEVEL").toInt();
la.Name = pg.attribute("NAME");
la.isViewable = QStoInt(pg.attribute("SICHTBAR"));
la.isPrintable = QStoInt(pg.attribute("DRUCKEN"));
la.isViewable = pg.attribute("SICHTBAR").toInt();
la.isPrintable = pg.attribute("DRUCKEN").toInt();
doc->Layers.append(la);
}
if(pg.tagName()=="Bookmark")
1220,14 → 1220,14
bok.Title = pg.attribute("Title");
bok.Text = pg.attribute("Text");
bok.Aktion = pg.attribute("Aktion");
bok.ItemNr = QStoInt(pg.attribute("ItemNr"));
bok.Seite = QStoInt(pg.attribute("Seite"));
bok.Element = QStoInt(pg.attribute("Element"));
bok.First = QStoInt(pg.attribute("First"));
bok.Last = QStoInt(pg.attribute("Last"));
bok.Prev = QStoInt(pg.attribute("Prev"));
bok.Next = QStoInt(pg.attribute("Next"));
bok.Parent = QStoInt(pg.attribute("Parent"));
bok.ItemNr = pg.attribute("ItemNr").toInt();
bok.Seite = pg.attribute("Seite").toInt();
bok.Element = pg.attribute("Element").toInt();
bok.First = pg.attribute("First").toInt();
bok.Last = pg.attribute("Last").toInt();
bok.Prev = pg.attribute("Prev").toInt();
bok.Next = pg.attribute("Next").toInt();
bok.Parent = pg.attribute("Parent").toInt();
doc->BookMarks.append(bok);
}
if(pg.tagName()=="MultiLine")
1239,11 → 1239,11
QDomElement MuL = MuLn.toElement();
struct SingleLine sl;
sl.Color = MuL.attribute("Color");
sl.Dash = QStoInt(MuL.attribute("Dash"));
sl.LineEnd = QStoInt(MuL.attribute("LineEnd"));
sl.LineJoin = QStoInt(MuL.attribute("LineJoin"));
sl.Shade = QStoInt(MuL.attribute("Shade"));
sl.Width = QStodouble(MuL.attribute("Width"));
sl.Dash = MuL.attribute("Dash").toInt();
sl.LineEnd = MuL.attribute("LineEnd").toInt();
sl.LineJoin = MuL.attribute("LineJoin").toInt();
sl.Shade = MuL.attribute("Shade").toInt();
sl.Width = MuL.attribute("Width").toDouble();
ml.push_back(sl);
MuLn = MuLn.nextSibling();
}
1267,55 → 1267,55
}
if(pg.tagName()=="PDF")
{
doc->PDF_Options.Articles = static_cast<bool>(QStoInt(pg.attribute("Articles")));
doc->PDF_Options.Thumbnails = static_cast<bool>(QStoInt(pg.attribute("Thumbnails")));
doc->PDF_Options.Compress = static_cast<bool>(QStoInt(pg.attribute("Compress")));
doc->PDF_Options.CompressMethod = QStoInt(pg.attribute("CMethod","0"));
doc->PDF_Options.Quality = QStoInt(pg.attribute("Quality","0"));
doc->PDF_Options.RecalcPic = static_cast<bool>(QStoInt(pg.attribute("RecalcPic")));
doc->PDF_Options.Bookmarks = static_cast<bool>(QStoInt(pg.attribute("Bookmarks")));
doc->PDF_Options.Articles = static_cast<bool>(pg.attribute("Articles").toInt());
doc->PDF_Options.Thumbnails = static_cast<bool>(pg.attribute("Thumbnails").toInt());
doc->PDF_Options.Compress = static_cast<bool>(pg.attribute("Compress").toInt());
doc->PDF_Options.CompressMethod = pg.attribute("CMethod", "0").toInt();
doc->PDF_Options.Quality = pg.attribute("Quality", "0").toInt();
doc->PDF_Options.RecalcPic = static_cast<bool>(pg.attribute("RecalcPic").toInt());
doc->PDF_Options.Bookmarks = static_cast<bool>(pg.attribute("Bookmarks").toInt());
if (pg.hasAttribute("MirrorH"))
doc->PDF_Options.MirrorH = static_cast<bool>(QStoInt(pg.attribute("MirrorH")));
doc->PDF_Options.MirrorH = static_cast<bool>(pg.attribute("MirrorH").toInt());
else
doc->PDF_Options.MirrorH = false;
if (pg.hasAttribute("MirrorV"))
doc->PDF_Options.MirrorV = static_cast<bool>(QStoInt(pg.attribute("MirrorV")));
doc->PDF_Options.MirrorV = static_cast<bool>(pg.attribute("MirrorV").toInt());
else
doc->PDF_Options.MirrorV = false;
if (pg.hasAttribute("RotateDeg"))
doc->PDF_Options.RotateDeg = QStoInt(pg.attribute("RotateDeg","0"));
doc->PDF_Options.RotateDeg = pg.attribute("RotateDeg", "0").toInt();
else
doc->PDF_Options.RotateDeg = 0;
doc->PDF_Options.PresentMode = static_cast<bool>(QStoInt(pg.attribute("PresentMode")));
doc->PDF_Options.PicRes = QStoInt(pg.attribute("PicRes"));
doc->PDF_Options.PresentMode = static_cast<bool>(pg.attribute("PresentMode").toInt());
doc->PDF_Options.PicRes = pg.attribute("PicRes").toInt();
// Fixme: check input pdf version
doc->PDF_Options.Version = (PDFOptions::PDFVersion)QStoInt(pg.attribute("Version"));
doc->PDF_Options.Resolution = QStoInt(pg.attribute("Resolution"));
doc->PDF_Options.Binding = QStoInt(pg.attribute("Binding"));
doc->PDF_Options.Version = (PDFOptions::PDFVersion)pg.attribute("Version").toInt();
doc->PDF_Options.Resolution = pg.attribute("Resolution").toInt();
doc->PDF_Options.Binding = pg.attribute("Binding").toInt();
doc->PDF_Options.Datei = "";
doc->PDF_Options.isGrayscale = static_cast<bool>(QStoInt(pg.attribute("Grayscale","0")));
doc->PDF_Options.UseRGB = static_cast<bool>(QStoInt(pg.attribute("RGBMode","0")));
doc->PDF_Options.UseProfiles = static_cast<bool>(QStoInt(pg.attribute("UseProfiles","0")));
doc->PDF_Options.UseProfiles2 = static_cast<bool>(QStoInt(pg.attribute("UseProfiles2","0")));
doc->PDF_Options.Intent = QStoInt(pg.attribute("Intent","1"));
doc->PDF_Options.Intent2 = QStoInt(pg.attribute("Intent2","1"));
doc->PDF_Options.isGrayscale = static_cast<bool>(pg.attribute("Grayscale", "0").toInt());
doc->PDF_Options.UseRGB = static_cast<bool>(pg.attribute("RGBMode", "0").toInt());
doc->PDF_Options.UseProfiles = static_cast<bool>(pg.attribute("UseProfiles", "0").toInt());
doc->PDF_Options.UseProfiles2 = static_cast<bool>(pg.attribute("UseProfiles2", "0").toInt());
doc->PDF_Options.Intent = pg.attribute("Intent", "1").toInt();
doc->PDF_Options.Intent2 = pg.attribute("Intent2", "1").toInt();
doc->PDF_Options.SolidProf = pg.attribute("SolidP", "");
doc->PDF_Options.ImageProf = pg.attribute("ImageP", "");
doc->PDF_Options.PrintProf = pg.attribute("PrintP", "");
doc->PDF_Options.Info = pg.attribute("InfoString", "");
doc->PDF_Options.BleedTop = QStodouble(pg.attribute("BTop","0"));
doc->PDF_Options.BleedLeft = QStodouble(pg.attribute("BLeft","0"));
doc->PDF_Options.BleedRight = QStodouble(pg.attribute("BRight","0"));
doc->PDF_Options.BleedBottom = QStodouble(pg.attribute("BBottom","0"));
doc->PDF_Options.EmbeddedI = static_cast<bool>(QStoInt(pg.attribute("ImagePr","0")));
doc->PDF_Options.BleedTop = pg.attribute("BTop", "0").toDouble();
doc->PDF_Options.BleedLeft = pg.attribute("BLeft", "0").toDouble();
doc->PDF_Options.BleedRight = pg.attribute("BRight", "0").toDouble();
doc->PDF_Options.BleedBottom = pg.attribute("BBottom", "0").toDouble();
doc->PDF_Options.EmbeddedI = static_cast<bool>(pg.attribute("ImagePr", "0").toInt());
doc->PDF_Options.PassOwner = pg.attribute("PassOwner", "");
doc->PDF_Options.PassUser = pg.attribute("PassUser", "");
doc->PDF_Options.Permissions = QStoInt(pg.attribute("Permissions","-4"));
doc->PDF_Options.Encrypt = static_cast<bool>(QStoInt(pg.attribute("Encrypt","0")));
doc->PDF_Options.useLayers = static_cast<bool>(QStoInt(pg.attribute("UseLayers","0")));
doc->PDF_Options.UseLPI = static_cast<bool>(QStoInt(pg.attribute("UseLpi","0")));
doc->PDF_Options.UseSpotColors = static_cast<bool>(QStoInt(dc.attribute("UseSpotColors","1")));
doc->PDF_Options.doMultiFile = static_cast<bool>(QStoInt(dc.attribute("doMultiFile","0")));
doc->PDF_Options.Permissions = pg.attribute("Permissions", "-4").toInt();
doc->PDF_Options.Encrypt = static_cast<bool>(pg.attribute("Encrypt", "0").toInt());
doc->PDF_Options.useLayers = static_cast<bool>(pg.attribute("UseLayers", "0").toInt());
doc->PDF_Options.UseLPI = static_cast<bool>(pg.attribute("UseLpi", "0").toInt());
doc->PDF_Options.UseSpotColors = static_cast<bool>(dc.attribute("UseSpotColors", "1").toInt());
doc->PDF_Options.doMultiFile = static_cast<bool>(dc.attribute("doMultiFile", "0").toInt());
QDomNode PFO = PAGE.firstChild();
while(!PFO.isNull())
{
1323,9 → 1323,9
if(pdfF.tagName() == "LPI")
{
struct LPIData lpo;
lpo.Angle = QStoInt(pdfF.attribute("Angle"));
lpo.Frequency = QStoInt(pdfF.attribute("Frequency"));
lpo.SpotFunc = QStoInt(pdfF.attribute("SpotFunction"));
lpo.Angle = pdfF.attribute("Angle").toInt();
lpo.Frequency = pdfF.attribute("Frequency").toInt();
lpo.SpotFunc = pdfF.attribute("SpotFunction").toInt();
doc->PDF_Options.LPISettings[pdfF.attribute("Color")] = lpo;
}
if(pdfF.tagName() == "Fonts")
1341,12 → 1341,12
if(pdfF.tagName() == "Effekte")
{
struct PDFPresentationData ef;
ef.pageEffectDuration = QStoInt(pdfF.attribute("pageEffectDuration"));
ef.pageViewDuration = QStoInt(pdfF.attribute("pageViewDuration"));
ef.effectType = QStoInt(pdfF.attribute("effectType"));
ef.Dm = QStoInt(pdfF.attribute("Dm"));
ef.M = QStoInt(pdfF.attribute("M"));
ef.Di = QStoInt(pdfF.attribute("Di"));
ef.pageEffectDuration = pdfF.attribute("pageEffectDuration").toInt();
ef.pageViewDuration = pdfF.attribute("pageViewDuration").toInt();
ef.effectType = pdfF.attribute("effectType").toInt();
ef.Dm = pdfF.attribute("Dm").toInt();
ef.M = pdfF.attribute("M").toInt();
ef.Di = pdfF.attribute("Di").toInt();
doc->PDF_Options.PresentVals.append(ef);
}
PFO = PFO.nextSibling();
1410,10 → 1410,10
if(sectionElem.tagName() == "Section")
{
struct DocumentSection newSection;
newSection.number=QStoInt(sectionElem.attribute("Number"));
newSection.number=sectionElem.attribute("Number").toInt();
newSection.name=sectionElem.attribute("Name");
newSection.fromindex=QStoInt(sectionElem.attribute("From"));
newSection.toindex=QStoInt(sectionElem.attribute("To"));
newSection.fromindex=sectionElem.attribute("From").toInt();
newSection.toindex=sectionElem.attribute("To").toInt();
if (sectionElem.attribute("Type")=="Type_1_2_3")
newSection.type=Type_1_2_3;
if (sectionElem.attribute("Type")=="Type_i_ii_iii")
1424,9 → 1424,9
newSection.type=Type_a_b_c;
if (sectionElem.attribute("Type")=="Type_A_B_C")
newSection.type=Type_A_B_C;
newSection.sectionstartindex=QStoInt(sectionElem.attribute("Start"));
newSection.reversed=static_cast<bool>(QStoInt(sectionElem.attribute("Reversed")));
newSection.active=static_cast<bool>(QStoInt(sectionElem.attribute("Active")));
newSection.sectionstartindex=sectionElem.attribute("Start").toInt();
newSection.reversed=static_cast<bool>(sectionElem.attribute("Reversed").toInt());
newSection.active=static_cast<bool>(sectionElem.attribute("Active").toInt());
doc->sections.insert(newSection.number, newSection);
}
Section = Section.nextSibling();
1434,7 → 1434,7
}
if ((pg.tagName()=="PAGE") || (pg.tagName()=="MASTERPAGE"))
{
a = QStoInt(pg.attribute("NUM"));
a = pg.attribute("NUM").toInt();
PgNam = "";
PgNam = pg.attribute("NAM", "");
//Pgc = doc->pageCount;
1455,7 → 1455,7
}
//CB: Stop calling damn GUI code in loading docs! IT doesnt *look* like
//this makes a difference apart from being faster, of course.
//ScApp->slotNewPage(a);
//ScMW->slotNewPage(a);
//Apage = doc->Pages.at(a);
if (PgNam.isEmpty())
{
1472,7 → 1472,7
//doc->pageCount = Pgc;
}
//doc->setUsesAutomaticTextFrames(AtFl);
Apage->LeftPg=QStoInt(pg.attribute("LEFT","0"));
Apage->LeftPg=pg.attribute("LEFT", "0").toInt();
QString Mus = "";
Mus = pg.attribute("MNAM","Normal");
if (!doc->masterPageMode())
1482,30 → 1482,30
if (pg.hasAttribute("Size"))
Apage->PageSize = pg.attribute("Size");
if (pg.hasAttribute("Orientation"))
Apage->PageOri = QStoInt(pg.attribute("Orientation"));
Apage->setXOffset(QStodouble(pg.attribute("PAGEXPOS")));
Apage->setYOffset(QStodouble(pg.attribute("PAGEYPOS")));
Apage->PageOri = pg.attribute("Orientation").toInt();
Apage->setXOffset(pg.attribute("PAGEXPOS").toDouble());
Apage->setYOffset(pg.attribute("PAGEYPOS").toDouble());
if (pg.hasAttribute("PAGEWIDTH"))
Apage->setWidth(QStodouble(pg.attribute("PAGEWIDTH")));
Apage->setWidth(pg.attribute("PAGEWIDTH").toDouble());
else
Apage->setWidth(QStodouble(pg.attribute("PAGEWITH")));
Apage->setHeight(QStodouble(pg.attribute("PAGEHEIGHT")));
Apage->setWidth(pg.attribute("PAGEWITH").toDouble());
Apage->setHeight(pg.attribute("PAGEHEIGHT").toDouble());
Apage->setInitialHeight(Apage->height());
Apage->setInitialWidth(Apage->width());
Apage->initialMargins.Top = QStodouble(pg.attribute("BORDERTOP"));
Apage->initialMargins.Bottom = QStodouble(pg.attribute("BORDERBOTTOM"));
Apage->initialMargins.Left = QStodouble(pg.attribute("BORDERLEFT"));
Apage->initialMargins.Right = QStodouble(pg.attribute("BORDERRIGHT"));
Apage->initialMargins.Top = pg.attribute("BORDERTOP").toDouble();
Apage->initialMargins.Bottom = pg.attribute("BORDERBOTTOM").toDouble();
Apage->initialMargins.Left = pg.attribute("BORDERLEFT").toDouble();
Apage->initialMargins.Right = pg.attribute("BORDERRIGHT").toDouble();
Apage->Margins.Top = Apage->initialMargins.Top;
Apage->Margins.Bottom = Apage->initialMargins.Bottom;
doc->setMasterPageMode(false);
//doc->Pages=&doc->DocPages;
if ((pg.hasAttribute("NumVGuides")) && (QStoInt(pg.attribute("NumVGuides","0")) != 0))
if ((pg.hasAttribute("NumVGuides")) && (pg.attribute("NumVGuides", "0").toInt() != 0))
{
tmp = pg.attribute("VerticalGuides");
QTextStream fgv(&tmp, IO_ReadOnly);
Apage->YGuides.clear();
for (int cxv = 0; cxv < QStoInt(pg.attribute("NumVGuides","0")); ++cxv)
for (int cxv = 0; cxv < pg.attribute("NumVGuides", "0").toInt(); ++cxv)
{
fgv >> xf;
Apage->YGuides.append(xf);
1515,12 → 1515,12
}
else
Apage->YGuides.clear();
if ((pg.hasAttribute("NumHGuides")) && (QStoInt(pg.attribute("NumHGuides","0")) != 0))
if ((pg.hasAttribute("NumHGuides")) && (pg.attribute("NumHGuides", "0").toInt() != 0))
{
tmp = pg.attribute("HorizontalGuides");
QTextStream fgh(&tmp, IO_ReadOnly);
Apage->XGuides.clear();
for (int cxh = 0; cxh < QStoInt(pg.attribute("NumHGuides","0")); ++cxh)
for (int cxh = 0; cxh < pg.attribute("NumHGuides", "0").toInt(); ++cxh)
{
fgh >> xf;
Apage->XGuides.append(xf);
1547,9 → 1547,9
}
if ((!pg.attribute("OnMasterPage").isEmpty()) && (pg.tagName()=="MASTEROBJECT"))
doc->currentPage = doc->MasterPages.at(doc->MasterNames[pg.attribute("OnMasterPage")]);
if ((QStoInt(pg.attribute("NEXTITEM")) != -1) || (static_cast<bool>(QStoInt(pg.attribute("AUTOTEXT")))))
if ((pg.attribute("NEXTITEM").toInt() != -1) || (static_cast<bool>(pg.attribute("AUTOTEXT").toInt())))
{
if (QStoInt(pg.attribute("BACKITEM")) == -1)
if (pg.attribute("BACKITEM").toInt() == -1)
LFrames.append(doc->Items->count());
}
int docGc = doc->GroupCounter;
1588,9 → 1588,9
if (it.tagName()=="CSTOP")
{
QString name = it.attribute("NAME");
double ramp = QStodouble(it.attribute("RAMP","0.0"));
int shade = QStoInt(it.attribute("SHADE","100"));
double opa = QStodouble(it.attribute("TRANS","1"));
double ramp = it.attribute("RAMP", "0.0").toDouble();
int shade = it.attribute("SHADE", "100").toInt();
double opa = it.attribute("TRANS", "1").toDouble();
Neu->fill_gradient.addStop(SetColor(doc, name, shade), ramp, 0.5, opa, name, shade);
}
if (it.tagName()=="ITEXT")
1627,16 → 1627,16
Neu->fill_gradient.addStop(doc->PageColors[doc->toolSettings.dBrush].getRGBColor(), 0.0, 0.5, 1.0, doc->toolSettings.dBrush, 100);
Neu->fill_gradient.addStop(doc->PageColors[doc->toolSettings.dPen].getRGBColor(), 1.0, 0.5, 1.0, doc->toolSettings.dPen, 100);
}
Neu->Language = ScApp->GetLang(pg.attribute("LANGUAGE", doc->Language));
Neu->isAutoText = static_cast<bool>(QStoInt(pg.attribute("AUTOTEXT")));
Neu->isEmbedded = static_cast<bool>(QStoInt(pg.attribute("isInline","0")));
Neu->gXpos = QStodouble(pg.attribute("gXpos","0.0"));
Neu->gYpos = QStodouble(pg.attribute("gYpos","0.0"));
Neu->Language = ScMW->GetLang(pg.attribute("LANGUAGE", doc->Language));
Neu->isAutoText = static_cast<bool>(pg.attribute("AUTOTEXT").toInt());
Neu->isEmbedded = static_cast<bool>(pg.attribute("isInline", "0").toInt());
Neu->gXpos = pg.attribute("gXpos", "0.0").toDouble();
Neu->gYpos = pg.attribute("gYpos", "0.0").toDouble();
QString defaultVal;
defaultVal.setNum(Neu->width());
Neu->gWidth = QStodouble(pg.attribute("gWidth",defaultVal));
Neu->gWidth = pg.attribute("gWidth",defaultVal).toDouble();
defaultVal.setNum(Neu->height());
Neu->gHeight = QStodouble(pg.attribute("gHeight",defaultVal));
Neu->gHeight = pg.attribute("gHeight",defaultVal).toDouble();
if (Neu->LineSpMode == 3)
{
doc->docParagraphStyles[0].BaseAdj = true;
1644,11 → 1644,11
}
if (Neu->isAutoText)
doc->LastAuto = Neu;
Neu->NextIt = QStoInt(pg.attribute("NEXTITEM"));
Neu->NextIt = pg.attribute("NEXTITEM").toInt();
if (Neu->isTableItem)
{
TableItems.append(Neu);
TableID.insert(QStoInt(pg.attribute("OwnLINK","0")), Neu->ItemNr);
TableID.insert(pg.attribute("OwnLINK", "0").toInt(), Neu->ItemNr);
}
if (pg.tagName()=="FRAMEOBJECT")
{
1703,7 → 1703,7
doc->setMasterPageMode(false);
doc->pageCount = doc->Pages->count();
//doc->Items = doc->DocItems;
//ScApp->view->reformPages();
//ScMW->view->reformPages();
doc->reformPages(maximumX, maximumY);
if (doc->Layers.count() == 0)
{
1787,29 → 1787,29
doc->AddFont(tmpf, qRound(doc->toolSettings.defSize / 10.0));
}
}
int size = qRound(QStodouble(it->attribute("CSIZE")) * 10);
int size = qRound(it->attribute("CSIZE").toDouble() * 10);
QString fcolor = it->attribute("CCOLOR");
int extra;
if (it->hasAttribute("CEXTRA"))
extra = qRound(QStodouble(it->attribute("CEXTRA")) / QStodouble(it->attribute("CSIZE")) * 1000.0);
extra = qRound(it->attribute("CEXTRA").toDouble() / it->attribute("CSIZE").toDouble() * 1000.0);
else
extra = QStoInt(it->attribute("CKERN"));
int shade = QStoInt(it->attribute("CSHADE"));
int style = QStoInt(it->attribute("CSTYLE"));
int ab = QStoInt(it->attribute("CAB","0"));
extra = it->attribute("CKERN").toInt();
int shade = it->attribute("CSHADE").toInt();
int style = it->attribute("CSTYLE").toInt();
int ab = it->attribute("CAB", "0").toInt();
QString stroke = it->attribute("CSTROKE","None");
int shade2 = QStoInt(it->attribute("CSHADE2","100"));
int scale = qRound(QStodouble(it->attribute("CSCALE","100")) * 10);
int scalev = qRound(QStodouble(it->attribute("CSCALEV","100")) * 10);
int base = qRound(QStodouble(it->attribute("CBASE","0")) * 10);
int shX = qRound(QStodouble(it->attribute("CSHX","5")) * 10);
int shY = qRound(QStodouble(it->attribute("CSHY","-5")) * 10);
int outL = qRound(QStodouble(it->attribute("COUT","1")) * 10);
int ulp = qRound(QStodouble(it->attribute("CULP","-0.1")) * 10);
int ulw = qRound(QStodouble(it->attribute("CULW","-0.1")) * 10);
int stp = qRound(QStodouble(it->attribute("CSTP","-0.1")) * 10);
int stw = qRound(QStodouble(it->attribute("CSTW","-0.1")) * 10);
int iobj = QStoInt(it->attribute("COBJ","-1"));
int shade2 = it->attribute("CSHADE2", "100").toInt();
int scale = qRound(it->attribute("CSCALE", "100").toDouble() * 10);
int scalev = qRound(it->attribute("CSCALEV", "100").toDouble() * 10);
int base = qRound(it->attribute("CBASE", "0").toDouble() * 10);
int shX = qRound(it->attribute("CSHX", "5").toDouble() * 10);
int shY = qRound(it->attribute("CSHY", "-5").toDouble() * 10);
int outL = qRound(it->attribute("COUT", "1").toDouble() * 10);
int ulp = qRound(it->attribute("CULP", "-0.1").toDouble() * 10);
int ulw = qRound(it->attribute("CULW", "-0.1").toDouble() * 10);
int stp = qRound(it->attribute("CSTP", "-0.1").toDouble() * 10);
int stw = qRound(it->attribute("CSTW", "-0.1").toDouble() * 10);
int iobj = it->attribute("COBJ", "-1").toInt();
for (uint cxx=0; cxx<tmp2.length(); ++cxx)
{
hg = new ScText;
1871,14 → 1871,14
PageItem* FileLoader::PasteItem(QDomElement *obj, ScribusDoc *doc)
{
int z = 0;
PageItem::ItemType pt = static_cast<PageItem::ItemType>(QStoInt(obj->attribute("PTYPE")));
double x = QStodouble(obj->attribute("XPOS"));
double y = QStodouble(obj->attribute("YPOS"));
double w = QStodouble(obj->attribute("WIDTH"));
double h = QStodouble(obj->attribute("HEIGHT"));
double pw = QStodouble(obj->attribute("PWIDTH"));
double scx = QStodouble(obj->attribute("LOCALSCX"));
double scy = QStodouble(obj->attribute("LOCALSCY"));
PageItem::ItemType pt = static_cast<PageItem::ItemType>(obj->attribute("PTYPE").toInt());
double x = obj->attribute("XPOS").toDouble();
double y = obj->attribute("YPOS").toDouble();
double w = obj->attribute("WIDTH").toDouble();
double h = obj->attribute("HEIGHT").toDouble();
double pw = obj->attribute("PWIDTH").toDouble();
double scx = obj->attribute("LOCALSCX").toDouble();
double scy = obj->attribute("LOCALSCY").toDouble();
QString Pcolor = obj->attribute("PCOLOR");
QString Pcolor2 = obj->attribute("PCOLOR2");
QColor tmpc;
1900,13 → 1900,13
z = doc->itemAdd(PageItem::ImageFrame, PageItem::Unspecified, x, y, w, h, 1, doc->toolSettings.dBrushPict, "None", true);
currItem = doc->Items->at(z);
currItem->setImageXYScale(scx, scy);
currItem->setImageXYOffset(QStodouble(obj->attribute("LOCALX")), QStodouble(obj->attribute("LOCALY")));
currItem->setImageXYOffset(obj->attribute("LOCALX").toDouble(), obj->attribute("LOCALY").toDouble());
currItem->Pfile = obj->attribute("PFILE");
currItem->IProfile = obj->attribute("PRFILE","");
currItem->EmProfile = obj->attribute("EPROF","");
currItem->IRender = QStoInt(obj->attribute("IRENDER","1"));
currItem->UseEmbedded = QStoInt(obj->attribute("EMBEDDED","1"));
currItem->pixm.imgInfo.lowResType = QStoInt(obj->attribute("ImageRes","1"));
currItem->IRender = obj->attribute("IRENDER", "1").toInt();
currItem->UseEmbedded = obj->attribute("EMBEDDED", "1").toInt();
currItem->pixm.imgInfo.lowResType = obj->attribute("ImageRes", "1").toInt();
IT = obj->firstChild();
while(!IT.isNull())
{
1915,7 → 1915,7
{
struct ScImage::imageEffect ef;
ef.effectParameters = it.attribute("Param");
ef.effectCode = QStoInt(it.attribute("Code"));
ef.effectCode = it.attribute("Code").toInt();
currItem->effectsInUse.append(ef);
}
IT=IT.nextSibling();
1924,8 → 1924,8
doc->loadPict(currItem->Pfile, currItem, false);
currItem->IProfile = obj->attribute("PRFILE","");
currItem->EmProfile = obj->attribute("EPROF","");
currItem->IRender = QStoInt(obj->attribute("IRENDER","1"));
currItem->UseEmbedded = QStoInt(obj->attribute("EMBEDDED","1"));
currItem->IRender = obj->attribute("IRENDER", "1").toInt();
currItem->UseEmbedded = obj->attribute("EMBEDDED", "1").toInt();
currItem->setImageXYScale(scx, scy);
clPath = obj->attribute("ImageClip", "");
if (currItem->pixm.imgInfo.PDSpathData.contains(clPath))
1937,11 → 1937,11
cl.scale(currItem->imageXScale(), currItem->imageYScale());
currItem->imageClip.map(cl);
}
currItem->PicArt = QStoInt(obj->attribute("PICART"));
currItem->BBoxX = QStodouble(obj->attribute("BBOXX"));
currItem->BBoxH = QStodouble(obj->attribute("BBOXH"));
currItem->ScaleType = QStoInt(obj->attribute("SCALETYPE","1"));
currItem->AspectRatio = QStoInt(obj->attribute("RATIO","0"));
currItem->PicArt = obj->attribute("PICART").toInt();
currItem->BBoxX = obj->attribute("BBOXX").toDouble();
currItem->BBoxH = obj->attribute("BBOXH").toDouble();
currItem->ScaleType = obj->attribute("SCALETYPE", "1").toInt();
currItem->AspectRatio = obj->attribute("RATIO", "0").toInt();
currItem->Pwidth = pw;
break;
// OBSOLETE CR 2005-02-06
1953,53 → 1953,53
case PageItem::PathText:
z = doc->itemAdd(PageItem::PathText, PageItem::Unspecified, x, y, w, h, pw, "None", Pcolor, true);
currItem = doc->Items->at(z);
if ((QStoInt(obj->attribute("ANNOTATION","0"))) && (static_cast<bool>(QStoInt(obj->attribute("ANICON","0")))))
if ((obj->attribute("ANNOTATION", "0").toInt()) && (static_cast<bool>(obj->attribute("ANICON", "0").toInt())))
{
currItem->setImageXYScale(scx, scy);
currItem->setImageXYOffset(QStodouble(obj->attribute("LOCALX")), QStodouble(obj->attribute("LOCALY")));
currItem->setImageXYOffset(obj->attribute("LOCALX").toDouble(), obj->attribute("LOCALY").toDouble());
currItem->Pfile = obj->attribute("PFILE");
currItem->Pfile2 = obj->attribute("PFILE2","");
currItem->Pfile3 = obj->attribute("PFILE3","");
currItem->IProfile = obj->attribute("PRFILE","");
currItem->EmProfile = obj->attribute("EPROF","");
currItem->IRender = QStoInt(obj->attribute("IRENDER","1"));
currItem->UseEmbedded = QStoInt(obj->attribute("EMBEDDED","1"));
currItem->IRender = obj->attribute("IRENDER", "1").toInt();
currItem->UseEmbedded = obj->attribute("EMBEDDED", "1").toInt();
doc->LoadPict(currItem->Pfile, z);
currItem->setImageXYScale(scx, scy);
currItem->PicArt = QStoInt(obj->attribute("PICART"));
currItem->BBoxX = QStodouble(obj->attribute("BBOXX"));
currItem->BBoxH = QStodouble(obj->attribute("BBOXH"));
currItem->ScaleType = QStoInt(obj->attribute("SCALETYPE","1"));
currItem->AspectRatio = QStoInt(obj->attribute("RATIO","0"));
currItem->PicArt = obj->attribute("PICART").toInt();
currItem->BBoxX = obj->attribute("BBOXX").toDouble();
currItem->BBoxH = obj->attribute("BBOXH").toDouble();
currItem->ScaleType = obj->attribute("SCALETYPE", "1").toInt();
currItem->AspectRatio = obj->attribute("RATIO", "0").toInt();
}
currItem->LineSp = QStodouble(obj->attribute("LINESP"));
currItem->LineSpMode = QStoInt(obj->attribute("LINESPMode","0"));
currItem->LineSp = obj->attribute("LINESP").toDouble();
currItem->LineSpMode = obj->attribute("LINESPMode", "0").toInt();
//currItem->convertTo(pt);
break;
case PageItem::TextFrame:
z = doc->itemAdd(PageItem::TextFrame, PageItem::Unspecified, x, y, w, h, pw, "None", Pcolor, true);
currItem = doc->Items->at(z);
if ((QStoInt(obj->attribute("ANNOTATION","0"))) && (static_cast<bool>(QStoInt(obj->attribute("ANICON","0")))))
if ((obj->attribute("ANNOTATION", "0").toInt()) && (static_cast<bool>(obj->attribute("ANICON", "0").toInt())))
{
currItem->setImageXYScale(scx, scy);
currItem->setImageXYOffset(QStodouble(obj->attribute("LOCALX")), QStodouble(obj->attribute("LOCALY")));
currItem->setImageXYOffset(obj->attribute("LOCALX").toDouble(), obj->attribute("LOCALY").toDouble());
currItem->Pfile = obj->attribute("PFILE");
currItem->Pfile2 = obj->attribute("PFILE2","");
currItem->Pfile3 = obj->attribute("PFILE3","");
currItem->IProfile = obj->attribute("PRFILE","");
currItem->EmProfile = obj->attribute("EPROF","");
currItem->IRender = QStoInt(obj->attribute("IRENDER","1"));
currItem->UseEmbedded = QStoInt(obj->attribute("EMBEDDED","1"));
currItem->IRender = obj->attribute("IRENDER", "1").toInt();
currItem->UseEmbedded = obj->attribute("EMBEDDED", "1").toInt();
doc->LoadPict(currItem->Pfile, z);
currItem->setImageXYScale(scx, scy);
currItem->PicArt = QStoInt(obj->attribute("PICART"));
currItem->BBoxX = QStodouble(obj->attribute("BBOXX"));
currItem->BBoxH = QStodouble(obj->attribute("BBOXH"));
currItem->ScaleType = QStoInt(obj->attribute("SCALETYPE","1"));
currItem->AspectRatio = QStoInt(obj->attribute("RATIO","0"));
currItem->PicArt = obj->attribute("PICART").toInt();
currItem->BBoxX = obj->attribute("BBOXX").toDouble();
currItem->BBoxH = obj->attribute("BBOXH").toDouble();
currItem->ScaleType = obj->attribute("SCALETYPE", "1").toInt();
currItem->AspectRatio = obj->attribute("RATIO", "0").toInt();
}
currItem->LineSp = QStodouble(obj->attribute("LINESP"));
currItem->LineSpMode = QStoInt(obj->attribute("LINESPMode","0"));
currItem->LineSp = obj->attribute("LINESP").toDouble();
currItem->LineSpMode = obj->attribute("LINESPMode", "0").toInt();
//currItem->convertTo(pt);
break;
case PageItem::Line:
2015,23 → 2015,23
currItem = doc->Items->at(z);
break;
}
currItem->FrameType = QStoInt(obj->attribute("FRTYPE", "0"));
currItem->startArrowIndex = QStoInt(obj->attribute("startArrowIndex","0"));
currItem->endArrowIndex = QStoInt(obj->attribute("endArrowIndex","0"));
currItem->FrameType = obj->attribute("FRTYPE", "0").toInt();
currItem->startArrowIndex = obj->attribute("startArrowIndex", "0").toInt();
currItem->endArrowIndex = obj->attribute("endArrowIndex", "0").toInt();
currItem->NamedLStyle = obj->attribute("NAMEDLST", "");
currItem->isBookmark = QStoInt(obj->attribute("BOOKMARK"));
currItem->isBookmark = obj->attribute("BOOKMARK").toInt();
if ((currItem->isBookmark) && (doc->BookMarks.count() == 0))
doc->OldBM = true;
currItem->BMnr = QStoInt(obj->attribute("BookNr","0"));
currItem->textAlignment = QStoInt(obj->attribute("ALIGN","0"));
currItem->setImageFlippedH(QStoInt(obj->attribute("FLIPPEDH")));
currItem->setImageFlippedV(QStoInt(obj->attribute("FLIPPEDV")));
currItem->setCornerRadius(QStodouble(obj->attribute("RADRECT","0")));
currItem->ClipEdited = QStoInt(obj->attribute("CLIPEDIT", "0"));
currItem->BMnr = obj->attribute("BookNr", "0").toInt();
currItem->textAlignment = obj->attribute("ALIGN", "0").toInt();
currItem->setImageFlippedH(obj->attribute("FLIPPEDH").toInt());
currItem->setImageFlippedV(obj->attribute("FLIPPEDV").toInt());
currItem->setCornerRadius(obj->attribute("RADRECT", "0").toDouble());
currItem->ClipEdited = obj->attribute("CLIPEDIT", "0").toInt();
currItem->setFillColor(Pcolor);
currItem->setLineColor(Pcolor2);
currItem->setFillShade(QStoInt(obj->attribute("SHADE")));
currItem->setLineShade(QStoInt(obj->attribute("SHADE2")));
currItem->setFillShade(obj->attribute("SHADE").toInt());
currItem->setLineShade(obj->attribute("SHADE2").toInt());
//CB Moved to setFillColor and setFillShade
//if (currItem->fillColor() != "None")
// currItem->fillQColor = doc->PageColors[currItem->fillColor()].getShadeColorProof(currItem->fillShade());
2040,31 → 2040,31
 
currItem->TxtStroke = obj->attribute("TXTSTROKE", "None");
currItem->TxtFill = obj->attribute("TXTFILL", "Black");
currItem->ShTxtStroke = QStoInt(obj->attribute("TXTSTRSH", "100"));
currItem->ShTxtFill = QStoInt(obj->attribute("TXTFILLSH", "100"));
currItem->TxtScale=qRound(QStodouble(obj->attribute("TXTSCALE", "100")) * 10);
currItem->TxtScaleV=qRound(QStodouble(obj->attribute("TXTSCALEV", "100")) * 10);
currItem->TxtBase=qRound(QStodouble(obj->attribute("TXTBASE", "0")) * 10);
currItem->TxtShadowX=qRound(QStodouble(obj->attribute("TXTSHX", "5")) * 10);
currItem->TxtShadowY=qRound(QStodouble(obj->attribute("TXTSHY", "-5")) * 10);
currItem->TxtOutline=qRound(QStodouble(obj->attribute("TXTOUT", "1")) * 10);
currItem->TxtUnderPos=qRound(QStodouble(obj->attribute("TXTULP", "-0.1")) * 10);
currItem->TxtUnderWidth=qRound(QStodouble(obj->attribute("TXTULW", "-0.1")) * 10);
currItem->TxtStrikePos=qRound(QStodouble(obj->attribute("TXTSTP", "-0.1")) * 10);
currItem->TxtStrikeWidth=qRound(QStodouble(obj->attribute("TXTSTW", "-0.1")) * 10);
currItem->TxTStyle = QStoInt(obj->attribute("TXTSTYLE", "0"));
currItem->setRotation(QStodouble(obj->attribute("ROT")));
currItem->setTextToFrameDist(QStodouble(obj->attribute("EXTRA")),
QStodouble(obj->attribute("REXTRA", "1")),
QStodouble(obj->attribute("TEXTRA", "1")),
QStodouble(obj->attribute("BEXTRA", "1")));
currItem->ShTxtStroke = obj->attribute("TXTSTRSH", "100").toInt();
currItem->ShTxtFill = obj->attribute("TXTFILLSH", "100").toInt();
currItem->TxtScale=qRound(obj->attribute("TXTSCALE", "100").toDouble() * 10);
currItem->TxtScaleV=qRound(obj->attribute("TXTSCALEV", "100").toDouble() * 10);
currItem->TxtBase=qRound(obj->attribute("TXTBASE", "0").toDouble() * 10);
currItem->TxtShadowX=qRound(obj->attribute("TXTSHX", "5").toDouble() * 10);
currItem->TxtShadowY=qRound(obj->attribute("TXTSHY", "-5").toDouble() * 10);
currItem->TxtOutline=qRound(obj->attribute("TXTOUT", "1").toDouble() * 10);
currItem->TxtUnderPos=qRound(obj->attribute("TXTULP", "-0.1").toDouble() * 10);
currItem->TxtUnderWidth=qRound(obj->attribute("TXTULW", "-0.1").toDouble() * 10);
currItem->TxtStrikePos=qRound(obj->attribute("TXTSTP", "-0.1").toDouble() * 10);
currItem->TxtStrikeWidth=qRound(obj->attribute("TXTSTW", "-0.1").toDouble() * 10);
currItem->TxTStyle = obj->attribute("TXTSTYLE", "0").toInt();
currItem->setRotation(obj->attribute("ROT").toDouble());
currItem->setTextToFrameDist(obj->attribute("EXTRA").toDouble(),
obj->attribute("REXTRA", "1").toDouble(),
obj->attribute("TEXTRA", "1").toDouble(),
obj->attribute("BEXTRA", "1").toDouble());
currItem->PLineArt = Qt::PenStyle(QStoInt(obj->attribute("PLINEART")));
currItem->PLineEnd = Qt::PenCapStyle(QStoInt(obj->attribute("PLINEEND","0")));
currItem->PLineJoin = Qt::PenJoinStyle(QStoInt(obj->attribute("PLINEJOIN","0")));
currItem->setPrintable(QStoInt(obj->attribute("PRINTABLE")));
currItem->isAnnotation = QStoInt(obj->attribute("ANNOTATION","0"));
currItem->AnType = QStoInt(obj->attribute("ANTYPE","0"));
currItem->PLineArt = Qt::PenStyle(obj->attribute("PLINEART").toInt());
currItem->PLineEnd = Qt::PenCapStyle(obj->attribute("PLINEEND", "0").toInt());
currItem->PLineJoin = Qt::PenJoinStyle(obj->attribute("PLINEJOIN", "0").toInt());
currItem->setPrintable(obj->attribute("PRINTABLE").toInt());
currItem->isAnnotation = obj->attribute("ANNOTATION", "0").toInt();
currItem->AnType = obj->attribute("ANTYPE", "0").toInt();
QString AnName = obj->attribute("ANNAME","");
if (!AnName.isEmpty())
{
2086,7 → 2086,7
currItem->An_F_act = obj->attribute("ANFACT","");
currItem->An_V_act = obj->attribute("ANVACT","");
currItem->An_C_act = obj->attribute("ANCACT","");
currItem->AnActType = QStoInt(obj->attribute("ANACTYP","0"));
currItem->AnActType = obj->attribute("ANACTYP", "0").toInt();
currItem->An_Extern = obj->attribute("ANEXTERN","");
if ((!currItem->An_Extern.isEmpty()) && (currItem->AnActType != 8))
{
2093,67 → 2093,67
QFileInfo efp(currItem->An_Extern);
currItem->An_Extern = efp.absFilePath();
}
currItem->AnZiel = QStoInt(obj->attribute("ANZIEL","0"));
currItem->AnZiel = obj->attribute("ANZIEL", "0").toInt();
currItem->AnToolTip = obj->attribute("ANTOOLTIP","");
currItem->AnRollOver = obj->attribute("ANROLL","");
currItem->AnDown = obj->attribute("ANDOWN","");
currItem->AnBwid = QStoInt(obj->attribute("ANBWID","1"));
currItem->AnBsty = QStoInt(obj->attribute("ANBSTY","0"));
currItem->AnFeed = QStoInt(obj->attribute("ANFEED","1"));
currItem->AnFlag = QStoInt(obj->attribute("ANFLAG","0"));
currItem->AnFont = QStoInt(obj->attribute("ANFONT","4"));
currItem->AnFormat = QStoInt(obj->attribute("ANFORMAT","0"));
currItem->AnVis = QStoInt(obj->attribute("ANVIS","0"));
currItem->AnIsChk = static_cast<bool>(QStoInt(obj->attribute("ANCHK","0")));
currItem->AnAAact = static_cast<bool>(QStoInt(obj->attribute("ANAA","0")));
currItem->AnHTML = static_cast<bool>(QStoInt(obj->attribute("ANHTML","0")));
currItem->AnUseIcons = static_cast<bool>(QStoInt(obj->attribute("ANICON","0")));
currItem->AnChkStil = QStoInt(obj->attribute("ANCHKS","0"));
currItem->AnMaxChar = QStoInt(obj->attribute("ANMC","-1"));
currItem->AnBwid = obj->attribute("ANBWID", "1").toInt();
currItem->AnBsty = obj->attribute("ANBSTY", "0").toInt();
currItem->AnFeed = obj->attribute("ANFEED", "1").toInt();
currItem->AnFlag = obj->attribute("ANFLAG", "0").toInt();
currItem->AnFont = obj->attribute("ANFONT", "4").toInt();
currItem->AnFormat = obj->attribute("ANFORMAT", "0").toInt();
currItem->AnVis = obj->attribute("ANVIS", "0").toInt();
currItem->AnIsChk = static_cast<bool>(obj->attribute("ANCHK", "0").toInt());
currItem->AnAAact = static_cast<bool>(obj->attribute("ANAA", "0").toInt());
currItem->AnHTML = static_cast<bool>(obj->attribute("ANHTML", "0").toInt());
currItem->AnUseIcons = static_cast<bool>(obj->attribute("ANICON", "0").toInt());
currItem->AnChkStil = obj->attribute("ANCHKS", "0").toInt();
currItem->AnMaxChar = obj->attribute("ANMC", "-1").toInt();
currItem->AnBColor = obj->attribute("ANBCOL","None");
currItem->AnIPlace = QStoInt(obj->attribute("ANPLACE","1"));
currItem->AnScaleW = QStoInt(obj->attribute("ANSCALE","0"));
currItem->TopLine = static_cast<bool>(QStoInt(obj->attribute("TopLine","0")));
currItem->LeftLine = static_cast<bool>(QStoInt(obj->attribute("LeftLine","0")));
currItem->RightLine = static_cast<bool>(QStoInt(obj->attribute("RightLine","0")));
currItem->BottomLine = static_cast<bool>(QStoInt(obj->attribute("BottomLine","0")));
currItem->isTableItem = static_cast<bool>(QStoInt(obj->attribute("isTableItem","0")));
currItem->TopLinkID = QStoInt(obj->attribute("TopLINK","-1"));
currItem->LeftLinkID = QStoInt(obj->attribute("LeftLINK","-1"));
currItem->RightLinkID = QStoInt(obj->attribute("RightLINK","-1"));
currItem->BottomLinkID = QStoInt(obj->attribute("BottomLINK","-1"));
currItem->PoShow = QStoInt(obj->attribute("PLTSHOW","0"));
currItem->BaseOffs = QStodouble(obj->attribute("BASEOF","0"));
currItem->setTextFlowsAroundFrame(QStoInt(obj->attribute("TEXTFLOW")));
currItem->setTextFlowUsesBoundingBox(QStoInt(obj->attribute("TEXTFLOW2","0")));
currItem->ISize = qRound(QStodouble(obj->attribute("ISIZE","12")) * 10);
currItem->AnIPlace = obj->attribute("ANPLACE", "1").toInt();
currItem->AnScaleW = obj->attribute("ANSCALE", "0").toInt();
currItem->TopLine = static_cast<bool>(obj->attribute("TopLine", "0").toInt());
currItem->LeftLine = static_cast<bool>(obj->attribute("LeftLine", "0").toInt());
currItem->RightLine = static_cast<bool>(obj->attribute("RightLine", "0").toInt());
currItem->BottomLine = static_cast<bool>(obj->attribute("BottomLine", "0").toInt());
currItem->isTableItem = static_cast<bool>(obj->attribute("isTableItem", "0").toInt());
currItem->TopLinkID = obj->attribute("TopLINK", "-1").toInt();
currItem->LeftLinkID = obj->attribute("LeftLINK", "-1").toInt();
currItem->RightLinkID = obj->attribute("RightLINK", "-1").toInt();
currItem->BottomLinkID = obj->attribute("BottomLINK", "-1").toInt();
currItem->PoShow = obj->attribute("PLTSHOW", "0").toInt();
currItem->BaseOffs = obj->attribute("BASEOF", "0").toDouble();
currItem->setTextFlowsAroundFrame(obj->attribute("TEXTFLOW").toInt());
currItem->setTextFlowUsesBoundingBox(obj->attribute("TEXTFLOW2", "0").toInt());
currItem->ISize = qRound(obj->attribute("ISIZE", "12").toDouble() * 10);
if (obj->hasAttribute("EXTRAV"))
currItem->ExtraV = qRound(QStodouble(obj->attribute("EXTRAV","0")) / QStodouble(obj->attribute("ISIZE","12")) * 1000.0);
currItem->ExtraV = qRound(obj->attribute("EXTRAV", "0").toDouble() / obj->attribute("ISIZE", "12").toDouble() * 1000.0);
else
currItem->ExtraV = QStoInt(obj->attribute("TXTKERN"));
currItem->DashOffset = QStodouble(obj->attribute("DASHOFF","0.0"));
currItem->setReversed(static_cast<bool>(QStoInt(obj->attribute("REVERS","0"))));
currItem->setLocked(static_cast<bool>(QStoInt(obj->attribute("LOCK","0"))));
currItem->setSizeLocked(static_cast<bool>(QStoInt(obj->attribute("LOCKR","0"))));
currItem->setFillTransparency(QStodouble(obj->attribute("TransValue","0.0")));
currItem->ExtraV = obj->attribute("TXTKERN").toInt();
currItem->DashOffset = obj->attribute("DASHOFF", "0.0").toDouble();
currItem->setReversed(static_cast<bool>(obj->attribute("REVERS", "0").toInt()));
currItem->setLocked(static_cast<bool>(obj->attribute("LOCK", "0").toInt()));
currItem->setSizeLocked(static_cast<bool>(obj->attribute("LOCKR", "0").toInt()));
currItem->setFillTransparency(obj->attribute("TransValue", "0.0").toDouble());
if (obj->hasAttribute("TransValueS"))
currItem->setLineTransparency(QStodouble(obj->attribute("TransValueS","0.0")));
currItem->setLineTransparency(obj->attribute("TransValueS", "0.0").toDouble());
else
currItem->setLineTransparency(QStodouble(obj->attribute("TransValue","0.0")));
if (QStoInt(obj->attribute("TRANSPARENT","0")) == 1)
currItem->setLineTransparency(obj->attribute("TransValue", "0.0").toDouble());
if (obj->attribute("TRANSPARENT", "0").toInt() == 1)
currItem->setFillColor("None");
currItem->Cols = QStoInt(obj->attribute("COLUMNS","1"));
currItem->ColGap = QStodouble(obj->attribute("COLGAP","0.0"));
if (QStoInt(obj->attribute("LAYER","0")) != -1)
currItem->LayerNr = QStoInt(obj->attribute("LAYER","0"));
currItem->setTextFlowUsesContourLine(QStoInt(obj->attribute("TEXTFLOW3","0")));
currItem->Cols = obj->attribute("COLUMNS", "1").toInt();
currItem->ColGap = obj->attribute("COLGAP", "0.0").toDouble();
if (obj->attribute("LAYER", "0").toInt() != -1)
currItem->LayerNr = obj->attribute("LAYER", "0").toInt();
currItem->setTextFlowUsesContourLine(obj->attribute("TEXTFLOW3", "0").toInt());
tmp = "";
if ((obj->hasAttribute("GROUPS")) && (QStoInt(obj->attribute("NUMGROUP","0")) != 0))
if ((obj->hasAttribute("GROUPS")) && (obj->attribute("NUMGROUP", "0").toInt() != 0))
{
tmp = obj->attribute("GROUPS");
QTextStream fg(&tmp, IO_ReadOnly);
currItem->Groups.clear();
for (int cx = 0; cx < QStoInt(obj->attribute("NUMGROUP","0")); ++cx)
for (int cx = 0; cx < obj->attribute("NUMGROUP", "0").toInt(); ++cx)
{
fg >> xi;
currItem->Groups.push(xi);
2164,12 → 2164,12
currItem->Groups.clear();
tmp = "";
currItem->TabValues.clear();
if ((obj->hasAttribute("NUMTAB")) && (QStoInt(obj->attribute("NUMTAB","0")) != 0))
if ((obj->hasAttribute("NUMTAB")) && (obj->attribute("NUMTAB", "0").toInt() != 0))
{
struct PageItem::TabRecord tb;
tmp = obj->attribute("TABS");
QTextStream tgv(&tmp, IO_ReadOnly);
for (int cxv = 0; cxv < QStoInt(obj->attribute("NUMTAB","0")); cxv += 2)
for (int cxv = 0; cxv < obj->attribute("NUMTAB", "0").toInt(); cxv += 2)
{
tgv >> xf;
tgv >> xf2;
2189,8 → 2189,8
if (it.tagName()=="Tabs")
{
struct PageItem::TabRecord tb;
tb.tabPosition = QStodouble(it.attribute("Pos"));
tb.tabType = QStoInt(it.attribute("Type"));
tb.tabPosition = it.attribute("Pos").toDouble();
tb.tabType = it.attribute("Type").toInt();
QString tbCh = "";
tbCh = it.attribute("Fill","");
if (tbCh.isEmpty())
2202,12 → 2202,12
IT=IT.nextSibling();
}
}
if ((obj->hasAttribute("NUMDASH")) && (QStoInt(obj->attribute("NUMDASH","0")) != 0))
if ((obj->hasAttribute("NUMDASH")) && (obj->attribute("NUMDASH", "0").toInt() != 0))
{
tmp = obj->attribute("DASHS");
QTextStream dgv(&tmp, IO_ReadOnly);
currItem->DashValues.clear();
for (int cxv = 0; cxv < QStoInt(obj->attribute("NUMDASH","0")); ++cxv)
for (int cxv = 0; cxv < obj->attribute("NUMDASH", "0").toInt(); ++cxv)
{
dgv >> xf;
currItem->DashValues.append(xf);
2267,7 → 2267,7
currItem->UpdatePolyClip();
currItem->Frame = true;
}
currItem->GrType = QStoInt(obj->attribute("GRTYP","0"));
currItem->GrType = obj->attribute("GRTYP", "0").toInt();
QString GrColor;
QString GrColor2;
int GrShade;
2274,16 → 2274,16
int GrShade2;
if (currItem->GrType != 0)
{
currItem->GrStartX = QStodouble(obj->attribute("GRSTARTX","0.0"));
currItem->GrStartY = QStodouble(obj->attribute("GRSTARTY","0.0"));
currItem->GrEndX = QStodouble(obj->attribute("GRENDX","0.0"));
currItem->GrEndY = QStodouble(obj->attribute("GRENDY","0.0"));
currItem->GrStartX = obj->attribute("GRSTARTX", "0.0").toDouble();
currItem->GrStartY = obj->attribute("GRSTARTY", "0.0").toDouble();
currItem->GrEndX = obj->attribute("GRENDX", "0.0").toDouble();
currItem->GrEndY = obj->attribute("GRENDY", "0.0").toDouble();
GrColor = obj->attribute("GRCOLOR","");
if (!GrColor.isEmpty())
{
GrColor2 = obj->attribute("GRCOLOR2","");
GrShade = QStoInt(obj->attribute("GRSHADE","100"));
GrShade2 = QStoInt(obj->attribute("GRSHADE2","100"));
GrShade = obj->attribute("GRSHADE", "100").toInt();
GrShade2 = obj->attribute("GRSHADE2", "100").toInt();
}
}
if (currItem->GrType != 0)
2310,7 → 2310,7
currItem->fill_gradient.addStop(tmpc, 1.0, 0.5, 1.0, GrColor, GrShade);
}
}
//ScApp->view->updateGradientVectors(currItem);
//ScMW->view->updateGradientVectors(currItem);
currItem->updateGradientVectors();
}
//currItem->setRedrawBounding();
2326,13 → 2326,13
fou = false;
bool tabEQ = false;
vg->Vname = pg->attribute("NAME");
vg->LineSpaMode = QStoInt(pg->attribute("LINESPMode","0"));
vg->LineSpa = QStodouble(pg->attribute("LINESP"));
vg->Indent = QStodouble(pg->attribute("INDENT","0"));
vg->First = QStodouble(pg->attribute("FIRST","0"));
vg->textAlignment = QStoInt(pg->attribute("ALIGN"));
vg->gapBefore = QStodouble(pg->attribute("VOR","0"));
vg->gapAfter = QStodouble(pg->attribute("NACH","0"));
vg->LineSpaMode = pg->attribute("LINESPMode", "0").toInt();
vg->LineSpa = pg->attribute("LINESP").toDouble();
vg->Indent = pg->attribute("INDENT", "0").toDouble();
vg->First = pg->attribute("FIRST", "0").toDouble();
vg->textAlignment = pg->attribute("ALIGN").toInt();
vg->gapBefore = pg->attribute("VOR", "0").toDouble();
vg->gapAfter = pg->attribute("NACH", "0").toDouble();
tmpf = pg->attribute("FONT", doc->toolSettings.defFont);
if ((!prefsManager->appPrefs.AvailFonts.find(tmpf)) || (!prefsManager->appPrefs.AvailFonts[tmpf]->UseFont))
{
2354,35 → 2354,35
}
}
vg->Font = tmpf;
vg->FontSize = qRound(QStodouble(pg->attribute("FONTSIZE","12")) * 10.0);
vg->Drop = static_cast<bool>(QStoInt(pg->attribute("DROP","0")));
vg->DropLin = QStoInt(pg->attribute("DROPLIN","2"));
vg->DropDist = QStodouble(pg->attribute("DROPDIST","0"));
vg->FontEffect = QStoInt(pg->attribute("EFFECT","0"));
vg->FontSize = qRound(pg->attribute("FONTSIZE", "12").toDouble() * 10.0);
vg->Drop = static_cast<bool>(pg->attribute("DROP", "0").toInt());
vg->DropLin = pg->attribute("DROPLIN", "2").toInt();
vg->DropDist = pg->attribute("DROPDIST", "0").toDouble();
vg->FontEffect = pg->attribute("EFFECT", "0").toInt();
vg->FColor = pg->attribute("FCOLOR", doc->toolSettings.dBrush);
vg->FShade = QStoInt(pg->attribute("FSHADE", "100"));
vg->FShade = pg->attribute("FSHADE", "100").toInt();
vg->SColor = pg->attribute("SCOLOR", doc->toolSettings.dPen);
vg->SShade = QStoInt(pg->attribute("SSHADE", "100"));
vg->BaseAdj = static_cast<bool>(QStoInt(pg->attribute("BASE","0")));
vg->txtShadowX = qRound(QStodouble(pg->attribute("TXTSHX", "5")) * 10);
vg->txtShadowY = qRound(QStodouble(pg->attribute("TXTSHY", "-5")) * 10);
vg->txtOutline = qRound(QStodouble(pg->attribute("TXTOUT", "1")) * 10);
vg->txtUnderPos = qRound(QStodouble(pg->attribute("TXTULP", "-0.1")) * 10);
vg->txtUnderWidth = qRound(QStodouble(pg->attribute("TXTULW", "-0.1")) * 10);
vg->txtStrikePos = qRound(QStodouble(pg->attribute("TXTSTP", "-0.1")) * 10);
vg->txtStrikeWidth = qRound(QStodouble(pg->attribute("TXTSTW", "-0.1")) * 10);
vg->scaleH = qRound(QStodouble(pg->attribute("SCALEH", "100")) * 10);
vg->scaleV = qRound(QStodouble(pg->attribute("SCALEV", "100")) * 10);
vg->baseOff = qRound(QStodouble(pg->attribute("BASEO", "0")) * 10);
vg->kernVal = qRound(QStodouble(pg->attribute("KERN", "0")) * 10);
vg->SShade = pg->attribute("SSHADE", "100").toInt();
vg->BaseAdj = static_cast<bool>(pg->attribute("BASE", "0").toInt());
vg->txtShadowX = qRound(pg->attribute("TXTSHX", "5").toDouble() * 10);
vg->txtShadowY = qRound(pg->attribute("TXTSHY", "-5").toDouble() * 10);
vg->txtOutline = qRound(pg->attribute("TXTOUT", "1").toDouble() * 10);
vg->txtUnderPos = qRound(pg->attribute("TXTULP", "-0.1").toDouble() * 10);
vg->txtUnderWidth = qRound(pg->attribute("TXTULW", "-0.1").toDouble() * 10);
vg->txtStrikePos = qRound(pg->attribute("TXTSTP", "-0.1").toDouble() * 10);
vg->txtStrikeWidth = qRound(pg->attribute("TXTSTW", "-0.1").toDouble() * 10);
vg->scaleH = qRound(pg->attribute("SCALEH", "100").toDouble() * 10);
vg->scaleV = qRound(pg->attribute("SCALEV", "100").toDouble() * 10);
vg->baseOff = qRound(pg->attribute("BASEO", "0").toDouble() * 10);
vg->kernVal = qRound(pg->attribute("KERN", "0").toDouble() * 10);
vg->TabValues.clear();
if ((pg->hasAttribute("NUMTAB")) && (QStoInt(pg->attribute("NUMTAB","0")) != 0))
if ((pg->hasAttribute("NUMTAB")) && (pg->attribute("NUMTAB", "0").toInt() != 0))
{
struct PageItem::TabRecord tb;
QString tmp = pg->attribute("TABS");
QTextStream tgv(&tmp, IO_ReadOnly);
vg->TabValues.clear();
for (int cxv = 0; cxv < QStoInt(pg->attribute("NUMTAB","0")); cxv += 2)
for (int cxv = 0; cxv < pg->attribute("NUMTAB", "0").toInt(); cxv += 2)
{
tgv >> xf;
tgv >> xf2;
2402,8 → 2402,8
if (it.tagName()=="Tabs")
{
struct PageItem::TabRecord tb;
tb.tabPosition = QStodouble(it.attribute("Pos"));
tb.tabType = QStoInt(it.attribute("Type"));
tb.tabPosition = it.attribute("Pos").toDouble();
tb.tabType = it.attribute("Type").toInt();
QString tbCh = "";
tbCh = it.attribute("Fill","");
if (tbCh.isEmpty())
2571,9 → 2571,9
 
bool FileLoader::postLoad(bool is12doc)
{
/* for (uint d = 0; d < ScApp->doc->MasterItems.count(); ++d)
/* for (uint d = 0; d < ScMW->doc->MasterItems.count(); ++d)
{
PageItem *it = ScApp->doc->MasterItems.at(d);
PageItem *it = ScMW->doc->MasterItems.at(d);
if ((it->itemType() == PageItem::TextFrame) || (it->itemType() == PageItem::PathText))
{
for (uint e = 0; e < it->itemText.count(); ++e)
2580,15 → 2580,15
{
ScText *hl = it->itemText.at(e);
if ((hl->ch == QChar(25)) && ((int)hl->cembedded != -1))
hl->cembedded = ScApp->doc->FrameItems.at((int)hl->cembedded);
hl->cembedded = ScMW->doc->FrameItems.at((int)hl->cembedded);
else
hl->cembedded = 0;
}
}
}
for (uint d = 0; d < ScApp->doc->DocItems.count(); ++d)
for (uint d = 0; d < ScMW->doc->DocItems.count(); ++d)
{
PageItem *it = ScApp->doc->DocItems.at(d);
PageItem *it = ScMW->doc->DocItems.at(d);
if ((it->itemType() == PageItem::TextFrame) || (it->itemType() == PageItem::PathText))
{
for (uint e = 0; e < it->itemText.count(); ++e)
2595,7 → 2595,7
{
ScText *hl = it->itemText.at(e);
if ((hl->ch == QChar(25)) && ((int)hl->cembedded != -1))
hl->cembedded = ScApp->doc->FrameItems.at((int)hl->cembedded);
hl->cembedded = ScMW->doc->FrameItems.at((int)hl->cembedded);
else
hl->cembedded = 0;
}
2623,80 → 2623,80
return false;
}
}
for (uint d = 0; d < ScApp->doc->MasterItems.count(); ++d)
for (uint d = 0; d < ScMW->doc->MasterItems.count(); ++d)
{
PageItem *it = ScApp->doc->MasterItems.at(d);
if ((!ScApp->doc->UsedFonts.contains(it->IFont)) && (!it->IFont.isEmpty()))
PageItem *it = ScMW->doc->MasterItems.at(d);
if ((!ScMW->doc->UsedFonts.contains(it->IFont)) && (!it->IFont.isEmpty()))
it->IFont = ReplacedFonts[it->IFont];
if ((it->asTextFrame()) || (it->asPathText()))
{
for (uint e = 0; e < it->itemText.count(); ++e)
{
if (!ScApp->doc->UsedFonts.contains(it->itemText.at(e)->cfont->scName()))
it->itemText.at(e)->cfont = (*ScApp->doc->AllFonts)[ReplacedFonts[it->itemText.at(e)->cfont->scName()]];
if (!ScMW->doc->UsedFonts.contains(it->itemText.at(e)->cfont->scName()))
it->itemText.at(e)->cfont = (*ScMW->doc->AllFonts)[ReplacedFonts[it->itemText.at(e)->cfont->scName()]];
}
}
}
for (uint d = 0; d < ScApp->doc->DocItems.count(); ++d)
for (uint d = 0; d < ScMW->doc->DocItems.count(); ++d)
{
PageItem *it = ScApp->doc->DocItems.at(d);
if ((!ScApp->doc->UsedFonts.contains(it->IFont)) && (!it->IFont.isEmpty()))
PageItem *it = ScMW->doc->DocItems.at(d);
if ((!ScMW->doc->UsedFonts.contains(it->IFont)) && (!it->IFont.isEmpty()))
it->IFont = ReplacedFonts[it->IFont];
if ((it->asTextFrame()) || (it->asPathText()))
{
for (uint e = 0; e < it->itemText.count(); ++e)
{
if (!ScApp->doc->UsedFonts.contains(it->itemText.at(e)->cfont->scName()))
it->itemText.at(e)->cfont = (*ScApp->doc->AllFonts)[ReplacedFonts[it->itemText.at(e)->cfont->scName()]];
if (!ScMW->doc->UsedFonts.contains(it->itemText.at(e)->cfont->scName()))
it->itemText.at(e)->cfont = (*ScMW->doc->AllFonts)[ReplacedFonts[it->itemText.at(e)->cfont->scName()]];
}
}
}
for (uint d = 0; d < ScApp->doc->FrameItems.count(); ++d)
for (uint d = 0; d < ScMW->doc->FrameItems.count(); ++d)
{
PageItem *it = ScApp->doc->FrameItems.at(d);
if ((!ScApp->doc->UsedFonts.contains(it->IFont)) && (!it->IFont.isEmpty()))
PageItem *it = ScMW->doc->FrameItems.at(d);
if ((!ScMW->doc->UsedFonts.contains(it->IFont)) && (!it->IFont.isEmpty()))
it->IFont = ReplacedFonts[it->IFont];
if ((it->asTextFrame()) || (it->asPathText()))
{
for (uint e = 0; e < it->itemText.count(); ++e)
{
if (!ScApp->doc->UsedFonts.contains(it->itemText.at(e)->cfont->scName()))
it->itemText.at(e)->cfont = (*ScApp->doc->AllFonts)[ReplacedFonts[it->itemText.at(e)->cfont->scName()]];
if (!ScMW->doc->UsedFonts.contains(it->itemText.at(e)->cfont->scName()))
it->itemText.at(e)->cfont = (*ScMW->doc->AllFonts)[ReplacedFonts[it->itemText.at(e)->cfont->scName()]];
}
}
}
for (uint a = 0; a < ScApp->doc->docParagraphStyles.count(); ++a)
for (uint a = 0; a < ScMW->doc->docParagraphStyles.count(); ++a)
{
if ((!ScApp->doc->UsedFonts.contains(ScApp->doc->docParagraphStyles[a].Font)) && (!ScApp->doc->docParagraphStyles[a].Font.isEmpty()))
ScApp->doc->docParagraphStyles[a].Font = ReplacedFonts[ScApp->doc->docParagraphStyles[a].Font];
if ((!ScMW->doc->UsedFonts.contains(ScMW->doc->docParagraphStyles[a].Font)) && (!ScMW->doc->docParagraphStyles[a].Font.isEmpty()))
ScMW->doc->docParagraphStyles[a].Font = ReplacedFonts[ScMW->doc->docParagraphStyles[a].Font];
}
QValueList<QString> tmpList;
tmpList.clear();
for (uint fe = 0; fe < ScApp->doc->PDF_Options.EmbedList.count(); ++fe)
for (uint fe = 0; fe < ScMW->doc->PDF_Options.EmbedList.count(); ++fe)
{
if (ReplacedFonts.contains(ScApp->doc->PDF_Options.EmbedList[fe]))
tmpList.append(ReplacedFonts[ScApp->doc->PDF_Options.EmbedList[fe]]);
if (ReplacedFonts.contains(ScMW->doc->PDF_Options.EmbedList[fe]))
tmpList.append(ReplacedFonts[ScMW->doc->PDF_Options.EmbedList[fe]]);
else
tmpList.append(ScApp->doc->PDF_Options.EmbedList[fe]);
tmpList.append(ScMW->doc->PDF_Options.EmbedList[fe]);
}
ScApp->doc->PDF_Options.EmbedList = tmpList;
ScMW->doc->PDF_Options.EmbedList = tmpList;
tmpList.clear();
for (uint fe = 0; fe < ScApp->doc->PDF_Options.SubsetList.count(); ++fe)
for (uint fe = 0; fe < ScMW->doc->PDF_Options.SubsetList.count(); ++fe)
{
if (ReplacedFonts.contains(ScApp->doc->PDF_Options.SubsetList[fe]))
tmpList.append(ReplacedFonts[ScApp->doc->PDF_Options.SubsetList[fe]]);
if (ReplacedFonts.contains(ScMW->doc->PDF_Options.SubsetList[fe]))
tmpList.append(ReplacedFonts[ScMW->doc->PDF_Options.SubsetList[fe]]);
else
tmpList.append(ScApp->doc->PDF_Options.SubsetList[fe]);
tmpList.append(ScMW->doc->PDF_Options.SubsetList[fe]);
}
ScApp->doc->PDF_Options.SubsetList = tmpList;
ScMW->doc->PDF_Options.SubsetList = tmpList;
QMap<QString,QString>::Iterator itfsu;
for (itfsu = ReplacedFonts.begin(); itfsu != ReplacedFonts.end(); ++itfsu)
{
if (!ScApp->doc->UsedFonts.contains(itfsu.data()))
if (!ScMW->doc->UsedFonts.contains(itfsu.data()))
{
// QFont fo = prefsManager->appPrefs.AvailFonts[itfsu.data()]->Font;
// fo.setPointSize(qRound(ScApp->doc->toolSettings.defSize / 10.0));
ScApp->doc->AddFont(itfsu.data(), qRound(ScApp->doc->toolSettings.defSize / 10.0));
// fo.setPointSize(qRound(ScMW->doc->toolSettings.defSize / 10.0));
ScMW->doc->AddFont(itfsu.data(), qRound(ScMW->doc->toolSettings.defSize / 10.0));
}
}
if (prefsManager->appPrefs.askBeforeSubstituite)
2708,9 → 2708,9
if (!is12doc)
{
FPoint mincp, maxcp;
ScApp->doc->canvasMinMax(mincp, maxcp);
ScMW->doc->canvasMinMax(mincp, maxcp);
FPoint maximumCanvas(QMAX(maxcp.x(), maximumX), QMAX(maxcp.y(), maximumY));
ScApp->view->adjustCanvas(mincp, maximumCanvas);
ScMW->view->adjustCanvas(mincp, maximumCanvas);
}
return true;
2727,6 → 2727,6
{
mess += it.key() + tr(" was replaced by: ")+ it.data() +"\n";
}
QMessageBox::warning(ScApp, CommonStrings::trWarning, mess, 1, 0, 0);
QMessageBox::warning(ScMW, CommonStrings::trWarning, mess, 1, 0, 0);
}
}
/branches/Version13x/Scribus/scribus/actionmanager.h
24,7 → 24,7
#include "scribusapi.h"
#include "scraction.h"
 
class ScribusApp;
class ScribusMainWindow;
class ScribusQApp;
class ScribusView;
class UndoManager;
71,7 → 71,7
void initSpecialActions();
QPixmap noIcon;
ScribusApp *ScApp;
ScribusMainWindow *ScMW;
ScribusQApp *ScQApp;
UndoManager *undoManager;
QMap<QString, QGuardedPtr<ScrAction> > *scrActions;
/branches/Version13x/Scribus/scribus/hyphenator.cpp
32,13 → 32,13
 
 
/*!
\fn Hyphenator::Hyphenator(QWidget* parent, ScribusDoc *dok, ScribusApp* app)
\fn Hyphenator::Hyphenator(QWidget* parent, ScribusDoc *dok, ScribusMainWindow* app)
\brief Constructor reads user configuration and sets hyphenator properties.
\date
\author Franz Schmid
\param parent unused
\param dok ScribusDoc reference. It's used for preferences accessing.
\param app ScribusApp reference. It's used for preferences accessing.
\param app ScribusMainWindow reference. It's used for preferences accessing.
\retval None
*/
Hyphenator::Hyphenator(QWidget* parent, ScribusDoc *dok)
53,7 → 53,7
codec(0)
{
QString pfad = ScPaths::instance().libDir();
if (ScApp->Sprachen.contains(doc->Language))
if (ScMW->Sprachen.contains(doc->Language))
Language = doc->Language;
else
{
60,7 → 60,7
Language = PrefsManager::instance()->appPrefs.Language;
doc->Language = Language;
}
pfad += "dicts/" + ScApp->Sprachen[Language];
pfad += "dicts/" + ScMW->Sprachen[Language];
QFile f(pfad);
if (f.open(IO_ReadOnly))
{
105,7 → 105,7
*/
void Hyphenator::slotNewDict(QString name)
{
if (!ScApp->Sprachen.contains(name))
if (!ScMW->Sprachen.contains(name))
return;
char *filename = NULL;
if (hdict != NULL)
113,7 → 113,7
QString pfad = ScPaths::instance().libDir();
Language = name;
doc->Language = name;
pfad += "dicts/" + ScApp->Sprachen[Language];
pfad += "dicts/" + ScMW->Sprachen[Language];
QFile f(pfad);
if (f.open(IO_ReadOnly))
{
169,7 → 169,7
*/
void Hyphenator::slotHyphenateWord(PageItem* it, QString text, int firstC)
{
if ((!useAble) || (!ScApp->Sprachen.contains(it->Language)))
if ((!useAble) || (!ScMW->Sprachen.contains(it->Language)))
return;
const char *word;
char *buffer;
/branches/Version13x/Scribus/scribus/gtaction.cpp
33,8 → 33,8
gtAction::gtAction(bool append)
{
prefsManager=PrefsManager::instance();
//textFrame = ScApp->view->SelItem.at(0);
textFrame = ScApp->doc->selection->itemAt(0);
//textFrame = ScMW->view->SelItem.at(0);
textFrame = ScMW->doc->selection->itemAt(0);
it = textFrame;
lastParagraphStyle = -1;
inPara = false;
63,20 → 63,20
 
void gtAction::setProgressInfo()
{
ScApp->mainWindowStatusLabel->setText(QObject::tr("Importing text"));
ScApp->mainWindowProgressBar->reset();
ScApp->mainWindowProgressBar->setTotalSteps(0);
ScMW->mainWindowStatusLabel->setText(QObject::tr("Importing text"));
ScMW->mainWindowProgressBar->reset();
ScMW->mainWindowProgressBar->setTotalSteps(0);
}
 
void gtAction::setProgressInfoDone()
{
ScApp->mainWindowStatusLabel->setText("");
ScApp->mainWindowProgressBar->reset();
ScMW->mainWindowStatusLabel->setText("");
ScMW->mainWindowProgressBar->reset();
}
 
void gtAction::setInfo(QString infoText)
{
ScApp->mainWindowStatusLabel->setText(infoText);
ScMW->mainWindowStatusLabel->setText(infoText);
}
 
void gtAction::clearFrame()
85,13 → 85,13
{
if ((it->ch == QChar(25)) && (it->cembedded != 0))
{
ScApp->doc->FrameItems.remove(it->cembedded);
ScMW->doc->FrameItems.remove(it->cembedded);
delete it->cembedded;
}
}
textFrame->itemText.clear();
textFrame->CPos = 0;
ScApp->doc->updateFrameItems();
ScMW->doc->updateFrameItems();
}
 
void gtAction::write(const QString& text, gtStyle *style)
109,7 → 109,7
{
if ((itx->ch == QChar(25)) && (itx->cembedded != 0))
{
ScApp->doc->FrameItems.remove(itx->cembedded);
ScMW->doc->FrameItems.remove(itx->cembedded);
delete itx->cembedded;
}
}
122,13 → 122,13
{
if ((itx->ch == QChar(25)) && (itx->cembedded != 0))
{
ScApp->doc->FrameItems.remove(itx->cembedded);
ScMW->doc->FrameItems.remove(itx->cembedded);
delete itx->cembedded;
}
}
it->itemText.clear();
it->CPos = 0;
ScApp->doc->updateFrameItems();
ScMW->doc->updateFrameItems();
}
}
int paragraphStyle = -1;
150,12 → 150,12
 
 
if (paragraphStyle == -1)
paragraphStyle = ScApp->doc->currentParaStyle;
paragraphStyle = ScMW->doc->currentParaStyle;
 
gtFont* font = style->getFont();
QString fontName = validateFont(font);
gtFont* font2 = new gtFont(*font);
font2->setName(ScApp->doc->docParagraphStyles[paragraphStyle].Font);
font2->setName(ScMW->doc->docParagraphStyles[paragraphStyle].Font);
QString fontName2 = validateFont(font2);
for (uint a = 0; a < text.length(); ++a)
{
167,20 → 167,20
hg->ch = QChar(13);
if ((inPara) && (!overridePStyleFont))
{
if (ScApp->doc->docParagraphStyles[paragraphStyle].Font.isEmpty())
hg->cfont = (*ScApp->doc->AllFonts)[fontName2];
if (ScMW->doc->docParagraphStyles[paragraphStyle].Font.isEmpty())
hg->cfont = (*ScMW->doc->AllFonts)[fontName2];
else
hg->cfont = (*ScApp->doc->AllFonts)[ScApp->doc->docParagraphStyles[paragraphStyle].Font];
hg->csize = ScApp->doc->docParagraphStyles[paragraphStyle].FontSize;
hg->ccolor = ScApp->doc->docParagraphStyles[paragraphStyle].FColor;
hg->cshade = ScApp->doc->docParagraphStyles[paragraphStyle].FShade;
hg->cstroke = ScApp->doc->docParagraphStyles[paragraphStyle].SColor;
hg->cshade2 = ScApp->doc->docParagraphStyles[paragraphStyle].SShade;
hg->cstyle = ScApp->doc->docParagraphStyles[paragraphStyle].FontEffect;
hg->cfont = (*ScMW->doc->AllFonts)[ScMW->doc->docParagraphStyles[paragraphStyle].Font];
hg->csize = ScMW->doc->docParagraphStyles[paragraphStyle].FontSize;
hg->ccolor = ScMW->doc->docParagraphStyles[paragraphStyle].FColor;
hg->cshade = ScMW->doc->docParagraphStyles[paragraphStyle].FShade;
hg->cstroke = ScMW->doc->docParagraphStyles[paragraphStyle].SColor;
hg->cshade2 = ScMW->doc->docParagraphStyles[paragraphStyle].SShade;
hg->cstyle = ScMW->doc->docParagraphStyles[paragraphStyle].FontEffect;
}
else
{
hg->cfont = (*ScApp->doc->AllFonts)[fontName];
hg->cfont = (*ScMW->doc->AllFonts)[fontName];
hg->csize = font->getSize();
hg->ccolor = parseColor(font->getColor());
hg->cshade = font->getShade();
223,9 → 223,9
int gtAction::findParagraphStyle(const QString& name)
{
int pstyleIndex = -1;
for (uint i = 0; i < ScApp->doc->docParagraphStyles.size(); ++i)
for (uint i = 0; i < ScMW->doc->docParagraphStyles.size(); ++i)
{
if (ScApp->doc->docParagraphStyles[i].Vname == name)
if (ScMW->doc->docParagraphStyles[i].Vname == name)
{
pstyleIndex = i;
break;
240,7 → 240,7
if (pstyleIndex == -1)
{
createParagraphStyle(pstyle);
pstyleIndex = ScApp->doc->docParagraphStyles.size() - 1;
pstyleIndex = ScMW->doc->docParagraphStyles.size() - 1;
}
else if (updateParagraphStyles)
{
378,12 → 378,12
vg.scaleV = 1000;
vg.baseOff = 0;
vg.kernVal = 0;
vg.txtUnderPos = ScApp->doc->typographicSettings.valueUnderlinePos;
vg.txtUnderWidth = ScApp->doc->typographicSettings.valueUnderlineWidth;
vg.txtStrikePos = ScApp->doc->typographicSettings.valueStrikeThruPos;
vg.txtStrikeWidth = ScApp->doc->typographicSettings.valueStrikeThruPos;
vg.txtUnderPos = ScMW->doc->typographicSettings.valueUnderlinePos;
vg.txtUnderWidth = ScMW->doc->typographicSettings.valueUnderlineWidth;
vg.txtStrikePos = ScMW->doc->typographicSettings.valueStrikeThruPos;
vg.txtStrikeWidth = ScMW->doc->typographicSettings.valueStrikeThruPos;
textFrame->Doc->docParagraphStyles.append(vg);
ScApp->propertiesPalette->Spal->updateFormatList();
ScMW->propertiesPalette->Spal->updateFormatList();
}
 
void gtAction::removeParagraphStyle(const QString& name)
395,8 → 395,8
 
void gtAction::removeParagraphStyle(int index)
{
QValueList<ParagraphStyle>::iterator it = ScApp->doc->docParagraphStyles.at(index);
ScApp->doc->docParagraphStyles.remove(it);
QValueList<ParagraphStyle>::iterator it = ScMW->doc->docParagraphStyles.at(index);
ScMW->doc->docParagraphStyles.remove(it);
}
 
void gtAction::updateParagraphStyle(const QString&, gtParagraphStyle* pstyle)
448,11 → 448,11
vg.scaleV = 1000;
vg.baseOff = 0;
vg.kernVal = 0;
vg.txtUnderPos = ScApp->doc->typographicSettings.valueUnderlinePos;
vg.txtUnderWidth = ScApp->doc->typographicSettings.valueUnderlineWidth;
vg.txtStrikePos = ScApp->doc->typographicSettings.valueStrikeThruPos;
vg.txtStrikeWidth = ScApp->doc->typographicSettings.valueStrikeThruPos;
ScApp->doc->docParagraphStyles[pstyleIndex] = vg;
vg.txtUnderPos = ScMW->doc->typographicSettings.valueUnderlinePos;
vg.txtUnderWidth = ScMW->doc->typographicSettings.valueUnderlineWidth;
vg.txtStrikePos = ScMW->doc->typographicSettings.valueStrikeThruPos;
vg.txtStrikeWidth = ScMW->doc->typographicSettings.valueStrikeThruPos;
ScMW->doc->docParagraphStyles[pstyleIndex] = vg;
}
 
QString gtAction::validateFont(gtFont* font)
508,7 → 508,7
{
if (!prefsManager->appPrefs.GFontSub.contains(font->getName()))
{
MissingFont *dia = new MissingFont(0, useFont, ScApp->doc);
MissingFont *dia = new MissingFont(0, useFont, ScMW->doc);
dia->exec();
useFont = dia->getReplacementFont();
prefsManager->appPrefs.GFontSub[font->getName()] = useFont;
520,8 → 520,8
}
}
 
if(!ScApp->doc->UsedFonts.contains(useFont))
ScApp->doc->AddFont(useFont);
if(!ScMW->doc->UsedFonts.contains(useFont))
ScMW->doc->AddFont(useFont);
return useFont;
}
 
542,7 → 542,7
 
double gtAction::getLineSpacing(int fontSize)
{
return ((fontSize / 10.0) * static_cast<double>(ScApp->doc->typographicSettings.autoLineSpacing) / 100) + (fontSize / 10.0);
return ((fontSize / 10.0) * static_cast<double>(ScMW->doc->typographicSettings.autoLineSpacing) / 100) + (fontSize / 10.0);
}
 
double gtAction::getFrameWidth()
581,7 → 581,7
return ret; // don't want None to become Black or any color
bool found = false;
ColorList::Iterator it;
for (it = ScApp->doc->PageColors.begin(); it != ScApp->doc->PageColors.end(); ++it)
for (it = ScMW->doc->PageColors.begin(); it != ScMW->doc->PageColors.end(); ++it)
{
if (it.key() == s)
{
625,9 → 625,9
c = parseColorN( rgbColor );
}
found = false;
for (it = ScApp->doc->PageColors.begin(); it != ScApp->doc->PageColors.end(); ++it)
for (it = ScMW->doc->PageColors.begin(); it != ScMW->doc->PageColors.end(); ++it)
{
if (c == ScApp->doc->PageColors[it.key()].getRGBColor())
if (c == ScMW->doc->PageColors[it.key()].getRGBColor())
{
ret = it.key();
found = true;
637,8 → 637,8
{
ScColor tmp;
tmp.fromQColor(c);
ScApp->doc->PageColors.insert("FromGetText"+c.name(), tmp);
ScApp->propertiesPalette->updateColorList();
ScMW->doc->PageColors.insert("FromGetText"+c.name(), tmp);
ScMW->propertiesPalette->updateColorList();
ret = "FromGetText"+c.name();
}
}
654,10 → 654,10
 
void gtAction::finalize()
{
if (ScApp->doc->docHyphenator->AutoCheck)
ScApp->doc->docHyphenator->slotHyphenate(textFrame);
ScApp->view->DrawNew();
ScApp->slotDocCh();
if (ScMW->doc->docHyphenator->AutoCheck)
ScMW->doc->docHyphenator->slotHyphenate(textFrame);
ScMW->view->DrawNew();
ScMW->slotDocCh();
}
 
gtAction::~gtAction()
/branches/Version13x/Scribus/scribus/mpalette.cpp
798,22 → 798,22
connect(endArrow, SIGNAL(activated(int)), this, SLOT(setEndArrow(int )));
connect(lineSpacingPop, SIGNAL(activated(int)), this, SLOT(setLspMode(int )));
connect(this, SIGNAL(DocChanged()), ScApp, SLOT(slotDocCh()));
connect(this, SIGNAL(NewAbStyle(int)), ScApp, SLOT(setNewAbStyle(int)));
connect(this, SIGNAL(Stellung(int)), ScApp, SLOT(setItemHoch(int)));
connect(this, SIGNAL(EditCL()), ScApp, SLOT(ToggleFrameEdit()));
connect(this, SIGNAL(NewTF(const QString&)), ScApp, SLOT(SetNewFont(const QString&)));
connect(this, SIGNAL(UpdtGui(int)), ScApp, SLOT(HaveNewSel(int)));
connect(this->Cpal, SIGNAL(NewPen(QString)), ScApp, SLOT(setPenFarbe(QString)));
connect(this->Cpal, SIGNAL(NewBrush(QString)), ScApp, SLOT(setBrushFarbe(QString)));
connect(this->Cpal, SIGNAL(NewPenShade(int)), ScApp, SLOT(setPenShade(int)));
connect(this->Cpal, SIGNAL(NewBrushShade(int)), ScApp, SLOT(setBrushShade(int)));
connect(this->Cpal, SIGNAL(NewTrans(double)), ScApp, SLOT(setItemFillTransparency(double)));
connect(this->Cpal, SIGNAL(NewTransS(double)), ScApp, SLOT(setItemLineTransparency(double)));
connect(this->Cpal, SIGNAL(NewGradient(int)), ScApp, SLOT(setGradFill(int)));
connect(this->Cpal->gradEdit->Preview, SIGNAL(gradientChanged()), ScApp, SLOT(updtGradFill()));
connect(this->Cpal, SIGNAL(gradientChanged()), ScApp, SLOT(updtGradFill()));
connect(this->Cpal, SIGNAL(QueryItem()), ScApp, SLOT(GetBrushPen()));
connect(this, SIGNAL(DocChanged()), ScMW, SLOT(slotDocCh()));
connect(this, SIGNAL(NewAbStyle(int)), ScMW, SLOT(setNewAbStyle(int)));
connect(this, SIGNAL(Stellung(int)), ScMW, SLOT(setItemHoch(int)));
connect(this, SIGNAL(EditCL()), ScMW, SLOT(ToggleFrameEdit()));
connect(this, SIGNAL(NewTF(const QString&)), ScMW, SLOT(SetNewFont(const QString&)));
connect(this, SIGNAL(UpdtGui(int)), ScMW, SLOT(HaveNewSel(int)));
connect(this->Cpal, SIGNAL(NewPen(QString)), ScMW, SLOT(setPenFarbe(QString)));
connect(this->Cpal, SIGNAL(NewBrush(QString)), ScMW, SLOT(setBrushFarbe(QString)));
connect(this->Cpal, SIGNAL(NewPenShade(int)), ScMW, SLOT(setPenShade(int)));
connect(this->Cpal, SIGNAL(NewBrushShade(int)), ScMW, SLOT(setBrushShade(int)));
connect(this->Cpal, SIGNAL(NewTrans(double)), ScMW, SLOT(setItemFillTransparency(double)));
connect(this->Cpal, SIGNAL(NewTransS(double)), ScMW, SLOT(setItemLineTransparency(double)));
connect(this->Cpal, SIGNAL(NewGradient(int)), ScMW, SLOT(setGradFill(int)));
connect(this->Cpal->gradEdit->Preview, SIGNAL(gradientChanged()), ScMW, SLOT(updtGradFill()));
connect(this->Cpal, SIGNAL(gradientChanged()), ScMW, SLOT(updtGradFill()));
connect(this->Cpal, SIGNAL(QueryItem()), ScMW, SLOT(GetBrushPen()));
847,7 → 847,7
 
void Mpalette::SelTab(int t)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem) && (t == 5))
{
908,7 → 908,7
 
void Mpalette::setCurrentItem(PageItem *i)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
//CB We shouldnt really need to process this if our item is the same one
//maybe we do if the item has been changed by scripter.. but that should probably
943,7 → 943,7
FlipV->setOn(i->imageFlippedV());
connect(FlipH, SIGNAL(clicked()), this, SLOT(DoFlipH()));
connect(FlipV, SIGNAL(clicked()), this, SLOT(DoFlipV()));
langCombo->setCurrentText(ScApp->LangTransl[i->Language]);
langCombo->setCurrentText(ScMW->LangTransl[i->Language]);
if (TabStack->currentIndex() == 5)
Cpal->setActGradient(CurItem->GrType);
updateColorSpecialGradient();
1118,7 → 1118,7
 
void Mpalette::SetCurItem(PageItem *i)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
//CB We shouldnt really need to process this if our item is the same one
//maybe we do if the item has been changed by scripter.. but that should probably
1195,7 → 1195,7
FlipV->setOn(i->imageFlippedV());
connect(FlipH, SIGNAL(clicked()), this, SLOT(DoFlipH()));
connect(FlipV, SIGNAL(clicked()), this, SLOT(DoFlipV()));
langCombo->setCurrentText(ScApp->LangTransl[i->Language]);
langCombo->setCurrentText(ScMW->LangTransl[i->Language]);
bool setter;
if (i->NamedLStyle.isEmpty())
{
1320,25 → 1320,25
 
void Mpalette::NewSel(int nr)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
int visID;
disconnect(TabStack, SIGNAL(currentChanged(int)), this, SLOT(SelTab(int)));
if (ScApp->view->GroupSel)
if (ScMW->view->GroupSel)
{
RoVal = 0;
double gx, gy, gh, gw;
ScApp->view->getGroupRect(&gx, &gy, &gw, &gh);
ScMW->view->getGroupRect(&gx, &gy, &gw, &gh);
if (TopLeft->isChecked())
ScApp->view->RCenter = FPoint(gx, gy);
ScMW->view->RCenter = FPoint(gx, gy);
if (TopRight->isChecked())
ScApp->view->RCenter = FPoint(gx + gw, gy);
ScMW->view->RCenter = FPoint(gx + gw, gy);
if (Center->isChecked())
ScApp->view->RCenter = FPoint(gx + gw / 2.0, gy + gh / 2.0);
ScMW->view->RCenter = FPoint(gx + gw / 2.0, gy + gh / 2.0);
if (BottomLeft->isChecked())
ScApp->view->RCenter = FPoint(gx, gy + gh);
ScMW->view->RCenter = FPoint(gx, gy + gh);
if (BottomRight->isChecked())
ScApp->view->RCenter = FPoint(gx + gw, gy + gh);
ScMW->view->RCenter = FPoint(gx + gw, gy + gh);
xposLabel->setText( tr( "&X-Pos:" ) );
widthLabel->setText( tr( "&Width:" ) );
yposLabel->setText( tr( "&Y-Pos:" ) );
1418,7 → 1418,7
FlipH->setEnabled(true);
FlipV->setEnabled(true);
ShapeGroup->setEnabled(true);
//if ((ScApp->view->SelItem.at(0)->FrameType == 0) || (ScApp->view->SelItem.at(0)->FrameType == 2))
//if ((ScMW->view->SelItem.at(0)->FrameType == 0) || (ScMW->view->SelItem.at(0)->FrameType == 2))
if ((doc->selection->itemAt(0)->FrameType == 0) || (doc->selection->itemAt(0)->FrameType == 2))
RoundRect->setEnabled(true);
EditShape->setEnabled(true);
1434,7 → 1434,7
FlipH->setEnabled(true);
FlipV->setEnabled(true);
ShapeGroup->setEnabled(true);
//if ((ScApp->view->SelItem.at(0)->FrameType == 0) || (ScApp->view->SelItem.at(0)->FrameType == 2))
//if ((ScMW->view->SelItem.at(0)->FrameType == 0) || (ScMW->view->SelItem.at(0)->FrameType == 2))
if ((doc->selection->itemAt(0)->FrameType == 0) || (doc->selection->itemAt(0)->FrameType == 2))
RoundRect->setEnabled(true);
Distance->setEnabled(true);
1469,7 → 1469,7
EditShape->setEnabled(true);
FlipH->setEnabled(true);
FlipV->setEnabled(true);
//if ((ScApp->view->SelItem.at(0)->FrameType == 0) || (ScApp->view->SelItem.at(0)->FrameType == 2))
//if ((ScMW->view->SelItem.at(0)->FrameType == 0) || (ScMW->view->SelItem.at(0)->FrameType == 2))
if ((doc->selection->itemAt(0)->FrameType == 0) || (doc->selection->itemAt(0)->FrameType == 2))
RoundRect->setEnabled(true);
if ((visID == 2) || (visID == 3))
1596,7 → 1596,7
 
void Mpalette::setXY(double x, double y)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
disconnect(Xpos, SIGNAL(valueChanged(int)), this, SLOT(NewX()));
disconnect(Ypos, SIGNAL(valueChanged(int)), this, SLOT(NewY()));
1606,9 → 1606,9
FPoint n;
if (HaveItem)
{
if (ScApp->view->GroupSel)
if (ScMW->view->GroupSel)
{
ScApp->view->getGroupRect(&dummy1, &dummy2, &b, &h);
ScMW->view->getGroupRect(&dummy1, &dummy2, &b, &h);
r = 0.0;
}
else
1660,7 → 1660,7
 
void Mpalette::setBH(double x, double y)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
bool tmp = HaveItem;
HaveItem = false;
1686,7 → 1686,7
 
void Mpalette::setR(double r)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
bool tmp = HaveItem;
double rr = r;
1699,7 → 1699,7
 
void Mpalette::setRR(double r)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
bool tmp = HaveItem;
HaveItem = false;
1709,7 → 1709,7
 
void Mpalette::setCols(int r, double g)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
bool tmp = HaveItem;
HaveItem = false;
1744,7 → 1744,7
{
if ((HaveDoc) && (HaveItem))
{
ScApp->view->ChLineSpaMode(lineSpacingPop->indexOf(id));
ScMW->view->ChLineSpaMode(lineSpacingPop->indexOf(id));
emit DocChanged();
}
}
1751,7 → 1751,7
 
void Mpalette::setLsp(double r)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
bool tmp = HaveItem;
HaveItem = false;
1773,7 → 1773,7
 
void Mpalette::setDvals(double left, double top, double bottom, double right)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
bool tmp = HaveItem;
HaveItem = false;
1786,7 → 1786,7
 
void Mpalette::setSize(int s)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
bool tmp = HaveItem;
HaveItem = false;
1796,7 → 1796,7
 
void Mpalette::setExtra(int e)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
bool tmp = HaveItem;
HaveItem = false;
1806,7 → 1806,7
 
void Mpalette::ChangeScaling()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if (FreeScale == sender())
{
1843,7 → 1843,7
 
void Mpalette::setLvalue(double scx, double scy, double x, double y)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
bool tmp = HaveItem;
HaveItem = false;
1870,7 → 1870,7
 
void Mpalette::setSvalue(double s)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
bool tmp = HaveItem;
HaveItem = false;
1880,7 → 1880,7
 
void Mpalette::setLIvalue(PenStyle p, PenCapStyle pc, PenJoinStyle pj)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
bool tmp = HaveItem;
HaveItem = false;
1940,7 → 1940,7
 
void Mpalette::setStil(int s)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
StrokeIcon->setEnabled(false);
TxStroke->setEnabled(false);
1956,7 → 1956,7
 
void Mpalette::setAli(int e)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
bool tmp = HaveItem;
HaveItem = false;
1973,7 → 1973,7
 
void Mpalette::setTScaleV(int e)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
bool tmp = HaveItem;
HaveItem = false;
1985,7 → 1985,7
{
if ((HaveDoc) && (HaveItem))
{
ScApp->view->ItemTextScaleV(qRound(ChScaleV->value() * 10));
ScMW->view->ItemTextScaleV(qRound(ChScaleV->value() * 10));
doc->CurrTextScaleV = qRound(ChScaleV->value() * 10);
emit DocChanged();
}
1995,7 → 1995,7
{
if ((HaveDoc) && (HaveItem))
{
ScApp->view->setItemTextBase(qRound(ChBase->value() * 10));
ScMW->view->setItemTextBase(qRound(ChBase->value() * 10));
doc->CurrTextBase = qRound(ChBase->value() * 10);
emit DocChanged();
}
2003,7 → 2003,7
 
void Mpalette::setTScale(int e)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
bool tmp = HaveItem;
HaveItem = false;
2013,7 → 2013,7
 
void Mpalette::setTBase(int e)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
bool tmp = HaveItem;
HaveItem = false;
2025,7 → 2025,7
{
if ((HaveDoc) && (HaveItem))
{
ScApp->view->ItemTextScale(qRound(ChScale->value() * 10));
ScMW->view->ItemTextScale(qRound(ChScale->value() * 10));
doc->CurrTextScale = qRound(ChScale->value() * 10);
emit DocChanged();
}
2033,7 → 2033,7
 
void Mpalette::NewX()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
double x,y,w,h, gx, gy, gh, gw, base;
QWMatrix ma;
2051,9 → 2051,9
x += doc->currentPage->xOffset();
y += doc->currentPage->yOffset();
}
if (ScApp->view->GroupSel)
if (ScMW->view->GroupSel)
{
ScApp->view->getGroupRect(&gx, &gy, &gw, &gh);
ScMW->view->getGroupRect(&gx, &gy, &gw, &gh);
if ((TopLeft->isChecked()) || (BottomLeft->isChecked()))
base = gx;
if (Center->isChecked())
2060,7 → 2060,7
base = gx + gw / 2.0;
if ((TopRight->isChecked()) || (BottomRight->isChecked()))
base = gx + gw;
ScApp->view->moveGroup(x - base, 0, true);
ScMW->view->moveGroup(x - base, 0, true);
}
else
{
2068,9 → 2068,9
{
double r = atan2(h-y,w-x)*(180.0/M_PI);
w = sqrt(pow(w-x,2)+pow(h-y,2));
ScApp->view->MoveItem(x - CurItem->xPos(), 0, CurItem, true);
ScApp->view->SizeItem(w, CurItem->height(), CurItem->ItemNr, true);
ScApp->view->RotateItem(r, CurItem->ItemNr);
ScMW->view->MoveItem(x - CurItem->xPos(), 0, CurItem, true);
ScMW->view->SizeItem(w, CurItem->height(), CurItem->ItemNr, true);
ScMW->view->RotateItem(r, CurItem->ItemNr);
}
else
{
2086,7 → 2086,7
base = ma.m11() * CurItem->width() + ma.m21() * CurItem->height() + ma.dx();
if (BottomLeft->isChecked())
base = ma.m11() * 0.0 + ma.m21() * CurItem->height() + ma.dx();
ScApp->view->MoveItem(x - base, 0, CurItem, true);
ScMW->view->MoveItem(x - base, 0, CurItem, true);
}
}
emit DocChanged();
2095,7 → 2095,7
 
void Mpalette::NewY()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
double x,y,w,h, gx, gy, gh, gw, base;
QWMatrix ma;
2113,9 → 2113,9
x += doc->currentPage->xOffset();
y += doc->currentPage->yOffset();
}
if (ScApp->view->GroupSel)
if (ScMW->view->GroupSel)
{
ScApp->view->getGroupRect(&gx, &gy, &gw, &gh);
ScMW->view->getGroupRect(&gx, &gy, &gw, &gh);
if ((TopLeft->isChecked()) || (TopRight->isChecked()))
base = gy;
if (Center->isChecked())
2122,7 → 2122,7
base = gy + gh / 2.0;
if ((BottomLeft->isChecked()) || (BottomRight->isChecked()))
base = gy + gh;
ScApp->view->moveGroup(0, y - base, true);
ScMW->view->moveGroup(0, y - base, true);
}
else
{
2130,9 → 2130,9
{
double r = atan2(h-y,w-x)*(180.0/M_PI);
w = sqrt(pow(w-x,2)+pow(h-y,2));
ScApp->view->MoveItem(0, y - CurItem->yPos(), CurItem, true);
ScApp->view->SizeItem(w, CurItem->height(), CurItem->ItemNr, true);
ScApp->view->RotateItem(r, CurItem->ItemNr);
ScMW->view->MoveItem(0, y - CurItem->yPos(), CurItem, true);
ScMW->view->SizeItem(w, CurItem->height(), CurItem->ItemNr, true);
ScMW->view->RotateItem(r, CurItem->ItemNr);
}
else
{
2148,7 → 2148,7
base = ma.m22() * CurItem->height() + ma.m12() * CurItem->width() + ma.dy();
if (BottomLeft->isChecked())
base = ma.m22() * CurItem->height() + ma.m12() * 0.0 + ma.dy();
ScApp->view->MoveItem(0, y - base, CurItem, true);
ScMW->view->MoveItem(0, y - base, CurItem, true);
}
}
emit DocChanged();
2157,7 → 2157,7
 
void Mpalette::NewW()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
double x,y,w,h, gx, gy, gh, gw;
x = Xpos->value() / Umrech;
2166,19 → 2166,19
h = Height->value() / Umrech;
if ((HaveDoc) && (HaveItem))
{
if (ScApp->view->GroupSel)
if (ScMW->view->GroupSel)
{
ScApp->view->getGroupRect(&gx, &gy, &gw, &gh);
ScMW->view->getGroupRect(&gx, &gy, &gw, &gh);
if (keepFrameWHRatioButton->isOn())
{
ScApp->view->HowTo = 1;
ScApp->view->scaleGroup(w / gw, w / gw);
ScMW->view->HowTo = 1;
ScMW->view->scaleGroup(w / gw, w / gw);
setBH(w, (w / gw) * gh);
}
else
{
ScApp->view->HowTo = 6;
ScApp->view->scaleGroup(w / gw, 1.0);
ScMW->view->HowTo = 6;
ScMW->view->scaleGroup(w / gw, 1.0);
}
}
else
2190,10 → 2190,10
if (LMode)
{
double r = atan2(h-y,w-x)*(180.0/M_PI);
ScApp->view->RotateItem(r, CurItem->ItemNr);
ScMW->view->RotateItem(r, CurItem->ItemNr);
w = sqrt(pow(w-x,2)+pow(h-y,2));
}
ScApp->view->SizeItem(w, CurItem->height(), CurItem->ItemNr, true);
ScMW->view->SizeItem(w, CurItem->height(), CurItem->ItemNr, true);
}
else
{
2214,19 → 2214,19
bb2 = bb;
while (bb2->RightLink != 0)
{
ScApp->view->MoveRotated(bb2->RightLink, FPoint(dist, 0), true);
ScMW->view->MoveRotated(bb2->RightLink, FPoint(dist, 0), true);
bb2 = bb2->RightLink;
}
ScApp->view->MoveSizeItem(FPoint(0, 0), FPoint(-dist, 0), bb->ItemNr, true);
ScMW->view->MoveSizeItem(FPoint(0, 0), FPoint(-dist, 0), bb->ItemNr, true);
bb = bb->BottomLink;
}
bb2 = bb;
while (bb2->RightLink != 0)
{
ScApp->view->MoveRotated(bb2->RightLink, FPoint(dist, 0), true);
ScMW->view->MoveRotated(bb2->RightLink, FPoint(dist, 0), true);
bb2 = bb2->RightLink;
}
ScApp->view->MoveSizeItem(FPoint(0, 0), FPoint(-dist, 0), bb->ItemNr, true);
ScMW->view->MoveSizeItem(FPoint(0, 0), FPoint(-dist, 0), bb->ItemNr, true);
doc->RotMode = rmo;
if (keepFrameWHRatioButton->isOn())
{
2241,10 → 2241,10
if (keepFrameWHRatioButton->isOn())
{
setBH(w, (w / CurItem->width()) * CurItem->height());
ScApp->view->SizeItem(w, (w / CurItem->width()) * CurItem->height(), CurItem->ItemNr, true);
ScMW->view->SizeItem(w, (w / CurItem->width()) * CurItem->height(), CurItem->ItemNr, true);
}
else
ScApp->view->SizeItem(w, CurItem->height(), CurItem->ItemNr, true);
ScMW->view->SizeItem(w, CurItem->height(), CurItem->ItemNr, true);
}
}
emit DocChanged();
2254,7 → 2254,7
 
void Mpalette::NewH()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
double x,y,w,h, gx, gy, gh, gw;
x = Xpos->value() / Umrech;
2263,19 → 2263,19
h = Height->value() / Umrech;
if ((HaveDoc) && (HaveItem))
{
if (ScApp->view->GroupSel)
if (ScMW->view->GroupSel)
{
ScApp->view->getGroupRect(&gx, &gy, &gw, &gh);
ScMW->view->getGroupRect(&gx, &gy, &gw, &gh);
if (keepFrameWHRatioButton->isOn())
{
ScApp->view->HowTo = 1;
ScApp->view->scaleGroup(h / gh, h / gh);
ScMW->view->HowTo = 1;
ScMW->view->scaleGroup(h / gh, h / gh);
setBH((h / gh) * gw, h);
}
else
{
ScApp->view->HowTo = 5;
ScApp->view->scaleGroup(1.0, h / gh);
ScMW->view->HowTo = 5;
ScMW->view->scaleGroup(1.0, h / gh);
}
}
else
2287,10 → 2287,10
if (LMode)
{
double r = atan2(h-y,w-x)*(180.0/M_PI);
ScApp->view->RotateItem(r, CurItem->ItemNr);
ScMW->view->RotateItem(r, CurItem->ItemNr);
w = sqrt(pow(w-x,2)+pow(h-y,2));
}
ScApp->view->SizeItem(w, CurItem->height(), CurItem->ItemNr, true);
ScMW->view->SizeItem(w, CurItem->height(), CurItem->ItemNr, true);
}
else
{
2311,19 → 2311,19
bb2 = bb;
while (bb2->BottomLink != 0)
{
ScApp->view->MoveRotated(bb2->BottomLink, FPoint(0, dist), true);
ScMW->view->MoveRotated(bb2->BottomLink, FPoint(0, dist), true);
bb2 = bb2->BottomLink;
}
ScApp->view->MoveSizeItem(FPoint(0, 0), FPoint(0, -dist), bb->ItemNr, true);
ScMW->view->MoveSizeItem(FPoint(0, 0), FPoint(0, -dist), bb->ItemNr, true);
bb = bb->RightLink;
}
bb2 = bb;
while (bb2->BottomLink != 0)
{
ScApp->view->MoveRotated(bb2->BottomLink, FPoint(0, dist), true);
ScMW->view->MoveRotated(bb2->BottomLink, FPoint(0, dist), true);
bb2 = bb2->BottomLink;
}
ScApp->view->MoveSizeItem(FPoint(0, 0), FPoint(0, -dist), bb->ItemNr, true);
ScMW->view->MoveSizeItem(FPoint(0, 0), FPoint(0, -dist), bb->ItemNr, true);
doc->RotMode = rmo;
if (keepFrameWHRatioButton->isOn())
{
2338,10 → 2338,10
if (keepFrameWHRatioButton->isOn())
{
setBH((h / CurItem->height()) * CurItem->width(), h);
ScApp->view->SizeItem((h / CurItem->height()) * CurItem->width(), h, CurItem->ItemNr, true);
ScMW->view->SizeItem((h / CurItem->height()) * CurItem->width(), h, CurItem->ItemNr, true);
}
else
ScApp->view->SizeItem(CurItem->width(), h, CurItem->ItemNr, true);
ScMW->view->SizeItem(CurItem->width(), h, CurItem->ItemNr, true);
}
}
}
2351,19 → 2351,19
 
void Mpalette::NewR()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
double gx, gy, gh, gw;
if ((HaveDoc) && (HaveItem))
{
if (ScApp->view->GroupSel)
if (ScMW->view->GroupSel)
{
ScApp->view->RotateGroup((Rot->value() - RoVal)*(-1));
ScApp->view->getGroupRect(&gx, &gy, &gw, &gh);
ScMW->view->RotateGroup((Rot->value() - RoVal)*(-1));
ScMW->view->getGroupRect(&gx, &gy, &gw, &gh);
setXY(gx, gy);
}
else
ScApp->view->RotateItem(Rot->value()*(-1), CurItem->ItemNr);
ScMW->view->RotateItem(Rot->value()*(-1), CurItem->ItemNr);
emit DocChanged();
RoVal = Rot->value();
}
2371,12 → 2371,12
 
void Mpalette::NewRR()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
CurItem->setCornerRadius(RoundRect->value() / Umrech);
ScApp->view->SetFrameRounded();
ScMW->view->SetFrameRounded();
emit DocChanged();
}
}
2383,11 → 2383,11
 
void Mpalette::NewLsp()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
ScApp->view->ChLineSpa(LineSp->value());
ScMW->view->ChLineSpa(LineSp->value());
emit DocChanged();
}
}
2407,13 → 2407,13
 
void Mpalette::NewCols()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
CurItem->Cols = DCol->value();
setCols(CurItem->Cols, CurItem->ColGap);
ScApp->view->RefreshItem(CurItem);
ScMW->view->RefreshItem(CurItem);
emit DocChanged();
}
}
2420,7 → 2420,7
 
void Mpalette::NewGap()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
2437,7 → 2437,7
double newGap = QMAX(((CurItem->width() - CurItem->textToFrameDistLeft() - CurItem->textToFrameDistRight() - lineCorr) - (newWidth * CurItem->Cols)) / (CurItem->Cols - 1), 0);
CurItem->ColGap = newGap;
}
ScApp->view->RefreshItem(CurItem);
ScMW->view->RefreshItem(CurItem);
emit DocChanged();
}
}
2444,11 → 2444,11
 
void Mpalette::NewSize()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
ScApp->view->chFSize(qRound(Size->value()*10.0));
ScMW->view->chFSize(qRound(Size->value()*10.0));
emit DocChanged();
}
}
2455,13 → 2455,13
 
void Mpalette::NewExtra()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
if ((CurItem->HasSel) || (doc->appMode == modeNormal))
{
ScApp->view->chKerning(qRound(Extra->value() * 10.0));
ScMW->view->chKerning(qRound(Extra->value() * 10.0));
emit DocChanged();
}
else
2469,7 → 2469,7
if (uint(CurItem->CPos) != CurItem->itemText.count())
{
CurItem->itemText.at(CurItem->CPos)->cextra = qRound(Extra->value() * 10.0);
ScApp->view->RefreshItem(CurItem);
ScMW->view->RefreshItem(CurItem);
emit DocChanged();
}
}
2478,11 → 2478,11
 
void Mpalette::NewLocalXY()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
ScApp->view->ChLocalXY(LXpos->value() / Umrech / CurItem->imageXScale(), LYpos->value() / Umrech / CurItem->imageYScale());
ScMW->view->ChLocalXY(LXpos->value() / Umrech / CurItem->imageXScale(), LYpos->value() / Umrech / CurItem->imageYScale());
emit DocChanged();
}
}
2489,12 → 2489,12
 
void Mpalette::NewLocalSC()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
ScApp->view->ChLocalSc(ScaleX->value() / 100.0 / CurItem->pixm.imgInfo.xres * 72.0, ScaleY->value() / 100.0 / CurItem->pixm.imgInfo.yres * 72.0);
ScApp->view->ChLocalXY(LXpos->value() / Umrech / CurItem->imageXScale(), LYpos->value() / Umrech / CurItem->imageYScale());
ScMW->view->ChLocalSc(ScaleX->value() / 100.0 / CurItem->pixm.imgInfo.xres * 72.0, ScaleY->value() / 100.0 / CurItem->pixm.imgInfo.yres * 72.0);
ScMW->view->ChLocalXY(LXpos->value() / Umrech / CurItem->imageXScale(), LYpos->value() / Umrech / CurItem->imageYScale());
disconnect(imgDpiX, SIGNAL(valueChanged(int)), this, SLOT(HChangeD()));
disconnect(imgDpiY, SIGNAL(valueChanged(int)), this, SLOT(VChangeD()));
imgDpiX->setValue(qRound(720.0 / CurItem->imageXScale()) / 10.0);
2507,12 → 2507,12
 
void Mpalette::NewLocalDpi()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
ScApp->view->ChLocalSc(72.0 / imgDpiX->value(), 72.0 / imgDpiY->value());
ScApp->view->ChLocalXY(LXpos->value() / Umrech / CurItem->imageXScale(), LYpos->value() / Umrech / CurItem->imageYScale());
ScMW->view->ChLocalSc(72.0 / imgDpiX->value(), 72.0 / imgDpiY->value());
ScMW->view->ChLocalXY(LXpos->value() / Umrech / CurItem->imageXScale(), LYpos->value() / Umrech / CurItem->imageYScale());
disconnect(ScaleX, SIGNAL(valueChanged(int)), this, SLOT(HChange()));
disconnect(ScaleY, SIGNAL(valueChanged(int)), this, SLOT(VChange()));
ScaleX->setValue(CurItem->imageXScale() * 100 / 72.0 * CurItem->pixm.imgInfo.xres);
2525,11 → 2525,11
 
void Mpalette::NewLS()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
ScApp->view->ChLineWidth(LSize->value());
ScMW->view->ChLineWidth(LSize->value());
emit DocChanged();
}
}
2536,12 → 2536,12
 
void Mpalette::setStartArrow(int id)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
CurItem->setStartArrowIndex(id);
ScApp->view->RefreshItem(CurItem);
ScMW->view->RefreshItem(CurItem);
emit DocChanged();
}
}
2548,12 → 2548,12
 
void Mpalette::setEndArrow(int id)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
CurItem->setEndArrowIndex(id);
ScApp->view->RefreshItem(CurItem);
ScMW->view->RefreshItem(CurItem);
emit DocChanged();
}
}
2560,7 → 2560,7
 
void Mpalette::NewLSty()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
PenStyle c = SolidLine;
switch (LStyle->currentItem())
2583,7 → 2583,7
}
if ((HaveDoc) && (HaveItem))
{
ScApp->view->ChLineArt(c);
ScMW->view->ChLineArt(c);
emit DocChanged();
}
}
2590,7 → 2590,7
 
void Mpalette::NewLMode()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if (LineMode->currentItem() == 0)
{
2620,7 → 2620,7
 
void Mpalette::NewLJoin()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
PenJoinStyle c = MiterJoin;
switch (LJoinStyle->currentItem())
2637,7 → 2637,7
}
if ((HaveDoc) && (HaveItem))
{
ScApp->view->ChLineJoin(c);
ScMW->view->ChLineJoin(c);
emit DocChanged();
}
}
2644,7 → 2644,7
 
void Mpalette::NewLEnd()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
PenCapStyle c = FlatCap;
switch (LEndStyle->currentItem())
2661,7 → 2661,7
}
if ((HaveDoc) && (HaveItem))
{
ScApp->view->ChLineEnd(c);
ScMW->view->ChLineEnd(c);
emit DocChanged();
}
}
2668,7 → 2668,7
 
void Mpalette::ToggleKette()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
disconnect(ScaleX, SIGNAL(valueChanged(int)), this, SLOT(HChange()));
disconnect(ScaleY, SIGNAL(valueChanged(int)), this, SLOT(VChange()));
2708,7 → 2708,7
 
void Mpalette::ToggleKetteD()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
disconnect(imgDpiX, SIGNAL(valueChanged(int)), this, SLOT(HChangeD()));
disconnect(imgDpiY, SIGNAL(valueChanged(int)), this, SLOT(VChangeD()));
2748,14 → 2748,14
 
void Mpalette::DoFlipH()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
if ((CurItem->itemType() == PageItem::ImageFrame) || (CurItem->itemType() == PageItem::TextFrame))
ScApp->view->FlipImageH();
ScMW->view->FlipImageH();
else
ScApp->view->MirrorPolyH();
ScMW->view->MirrorPolyH();
emit DocChanged();
}
}
2762,14 → 2762,14
 
void Mpalette::DoFlipV()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
if ((CurItem->itemType() == PageItem::ImageFrame) || (CurItem->itemType() == PageItem::TextFrame))
ScApp->view->FlipImageV();
ScMW->view->FlipImageV();
else
ScApp->view->MirrorPolyV();
ScMW->view->MirrorPolyV();
emit DocChanged();
}
}
2776,7 → 2776,7
 
void Mpalette::NewAli(int a)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
2787,7 → 2787,7
 
void Mpalette::setTypeStyle(int s)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
emit Stellung(s);
}
2798,7 → 2798,7
int y = qRound(SeStyle->ShadowVal->Yoffset->value() * 10.0);
if ((HaveDoc) && (HaveItem))
{
ScApp->view->setItemTextShadow(x, y);
ScMW->view->setItemTextShadow(x, y);
doc->CurrTextShadowX = x;
doc->CurrTextShadowY = y;
emit DocChanged();
2807,7 → 2807,7
 
void Mpalette::setShadowOffs(int x, int y)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
disconnect(SeStyle->ShadowVal->Xoffset, SIGNAL(valueChanged(int)), this, SLOT(newShadowOffs()));
disconnect(SeStyle->ShadowVal->Yoffset, SIGNAL(valueChanged(int)), this, SLOT(newShadowOffs()));
2823,7 → 2823,7
int y = qRound(SeStyle->UnderlineVal->LWidth->value() * 10.0);
if ((HaveDoc) && (HaveItem))
{
ScApp->view->setItemTextUnderline(x, y);
ScMW->view->setItemTextUnderline(x, y);
doc->CurrTextUnderPos = x;
doc->CurrTextUnderWidth = y;
emit DocChanged();
2832,7 → 2832,7
 
void Mpalette::setUnderline(int p, int w)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
disconnect(SeStyle->UnderlineVal->LPos, SIGNAL(valueChanged(int)), this, SLOT(newUnderline()));
disconnect(SeStyle->UnderlineVal->LWidth, SIGNAL(valueChanged(int)), this, SLOT(newUnderline()));
2848,7 → 2848,7
int y = qRound(SeStyle->StrikeVal->LWidth->value() * 10.0);
if ((HaveDoc) && (HaveItem))
{
ScApp->view->setItemTextStrike(x, y);
ScMW->view->setItemTextStrike(x, y);
doc->CurrTextStrikePos = x;
doc->CurrTextStrikeWidth = y;
emit DocChanged();
2857,7 → 2857,7
 
void Mpalette::setStrike(int p, int w)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
disconnect(SeStyle->StrikeVal->LPos, SIGNAL(valueChanged(int)), this, SLOT(newStrike()));
disconnect(SeStyle->StrikeVal->LWidth, SIGNAL(valueChanged(int)), this, SLOT(newStrike()));
2869,7 → 2869,7
 
void Mpalette::setOutlineW(int x)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
disconnect(SeStyle->OutlineVal->LWidth, SIGNAL(valueChanged(int)), this, SLOT(newOutlineW()));
SeStyle->OutlineVal->LWidth->setValue(x / 10.0);
2881,7 → 2881,7
int x = qRound(SeStyle->OutlineVal->LWidth->value() * 10.0);
if ((HaveDoc) && (HaveItem))
{
ScApp->view->setItemTextOutline(x);
ScMW->view->setItemTextOutline(x);
doc->CurrTextOutline = x;
emit DocChanged();
}
2889,11 → 2889,11
 
void Mpalette::DoLower()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
ScApp->view->LowerItem();
ScMW->view->LowerItem();
emit DocChanged();
}
}
2900,11 → 2900,11
 
void Mpalette::DoRaise()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
ScApp->view->RaiseItem();
ScMW->view->RaiseItem();
emit DocChanged();
}
}
2911,11 → 2911,11
 
void Mpalette::DoFront()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
ScApp->view->ToFront();
ScMW->view->ToFront();
emit DocChanged();
}
}
2922,11 → 2922,11
 
void Mpalette::DoBack()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
ScApp->view->ToBack();
ScMW->view->ToBack();
emit DocChanged();
}
}
2933,7 → 2933,7
 
void Mpalette::NewRotMode(int m)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
double inX, inY, gx, gy, gh, gw;
inX = 0;
2941,37 → 2941,37
if ((HaveDoc) && (HaveItem))
{
HaveItem = false;
if (ScApp->view->GroupSel)
if (ScMW->view->GroupSel)
{
ScApp->view->setGroupRect();
ScApp->view->getGroupRect(&gx, &gy, &gw, &gh);
ScMW->view->setGroupRect();
ScMW->view->getGroupRect(&gx, &gy, &gw, &gh);
if (m == 0)
{
ScApp->view->RCenter = FPoint(gx, gy);
ScMW->view->RCenter = FPoint(gx, gy);
inX = gx;
inY = gy;
}
if (m == 1)
{
ScApp->view->RCenter = FPoint(gx+gw, gy);
ScMW->view->RCenter = FPoint(gx+gw, gy);
inX = gx+gw;
inY = gy;
}
if (m == 2)
{
ScApp->view->RCenter = FPoint(gx + gw / 2.0, gy + gh / 2.0);
ScMW->view->RCenter = FPoint(gx + gw / 2.0, gy + gh / 2.0);
inX = gx + gw / 2.0;
inY = gy + gh / 2.0;
}
if (m == 3)
{
ScApp->view->RCenter = FPoint(gx, gy+gh);
ScMW->view->RCenter = FPoint(gx, gy+gh);
inX = gx;
inY = gy+gh;
}
if (m == 4)
{
ScApp->view->RCenter = FPoint(gx+gw, gy+gh);
ScMW->view->RCenter = FPoint(gx+gw, gy+gh);
inX = gx+gw;
inY = gy+gh;
}
3010,7 → 3010,7
 
void Mpalette::DoFlow(int id)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
3038,7 → 3038,7
}
break;
}
ScApp->view->DrawNew();
ScMW->view->DrawNew();
emit DocChanged();
}
}
3045,7 → 3045,7
 
void Mpalette::MakeIrre(int f, int c, double *vals)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
3055,20 → 3055,20
{
case 0:
CurItem->SetRectFrame();
ScApp->view->setRedrawBounding(CurItem);
ScMW->view->setRedrawBounding(CurItem);
break;
case 1:
CurItem->SetOvalFrame();
ScApp->view->setRedrawBounding(CurItem);
ScMW->view->setRedrawBounding(CurItem);
break;
default:
CurItem->SetFrameShape(c, vals);
ScApp->view->setRedrawBounding(CurItem);
ScMW->view->setRedrawBounding(CurItem);
CurItem->FrameType = f+2;
break;
}
ScApp->SCustom->setPixmap(ScApp->SCustom->getIconPixmap(f));
ScApp->view->RefreshItem(CurItem);
ScMW->SCustom->setPixmap(ScMW->SCustom->getIconPixmap(f));
ScMW->view->RefreshItem(CurItem);
emit DocChanged();
if ((CurItem->itemType() == PageItem::ImageFrame) || (CurItem->itemType() == PageItem::TextFrame))
return;
3080,7 → 3080,7
 
void Mpalette::EditSh()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
3099,13 → 3099,13
 
void Mpalette::NewTDist()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
CurItem->setTextToFrameDist(DLeft->value() / Umrech, DRight->value() / Umrech, DTop->value() / Umrech, DBottom->value() / Umrech);
setCols(CurItem->Cols, CurItem->ColGap);
ScApp->view->RefreshItem(CurItem);
ScMW->view->RefreshItem(CurItem);
emit DocChanged();
}
}
3112,7 → 3112,7
 
void Mpalette::NewSpGradient(double x1, double y1, double x2, double y2)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
3120,7 → 3120,7
CurItem->GrStartY = y1 / Umrech;
CurItem->GrEndX = x2 / Umrech;
CurItem->GrEndY = y2 / Umrech;
ScApp->view->RefreshItem(CurItem);
ScMW->view->RefreshItem(CurItem);
emit DocChanged();
}
}
3127,21 → 3127,21
 
void Mpalette::toggleGradientEdit()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
if (Cpal->gradEditButton->isOn())
ScApp->setAppMode(modeEditGradientVectors);
ScMW->setAppMode(modeEditGradientVectors);
else
ScApp->setAppMode(modeNormal);
ScApp->view->RefreshItem(CurItem);
ScMW->setAppMode(modeNormal);
ScMW->view->RefreshItem(CurItem);
}
}
 
void Mpalette::NewTFont(QString c)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
emit NewTF(c);
3149,7 → 3149,7
 
void Mpalette::DoRevert()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
3156,7 → 3156,7
bool setter=Revert->isOn();
CurItem->setImageFlippedH(setter);
CurItem->setReversed(setter);
ScApp->view->RefreshItem(CurItem);
ScMW->view->RefreshItem(CurItem);
emit DocChanged();
}
}
3163,7 → 3163,7
 
void Mpalette::SetLineFormats(ScribusDoc *dd)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
disconnect(StyledLine, SIGNAL(clicked(QListBoxItem*)), this, SLOT(SetSTline(QListBoxItem*)));
StyledLine->clear();
3213,7 → 3213,7
 
void Mpalette::SetSTline(QListBoxItem *c)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if (c == NULL)
return;
3226,7 → 3226,7
LSize->setEnabled(setter);
LJoinStyle->setEnabled(setter);
LEndStyle->setEnabled(setter);
ScApp->view->RefreshItem(CurItem);
ScMW->view->RefreshItem(CurItem);
emit DocChanged();
}
 
3239,7 → 3239,7
 
void Mpalette::updateCList()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if (!HaveDoc)
return;
3261,7 → 3261,7
 
void Mpalette::updateCmsList()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if (HaveDoc)
{
3280,14 → 3280,14
if (CurItem->pixm.imgInfo.colorspace == 1)
{
ProfilesL::Iterator itP;
ProfilesL::Iterator itPend=ScApp->InputProfilesCMYK.end();
for (itP = ScApp->InputProfilesCMYK.begin(); itP != itPend; ++itP)
ProfilesL::Iterator itPend=ScMW->InputProfilesCMYK.end();
for (itP = ScMW->InputProfilesCMYK.begin(); itP != itPend; ++itP)
{
InputP->insertItem(itP.key());
if (itP.key() == CurItem->IProfile)
InputP->setCurrentItem(InputP->count()-1);
}
if (!ScApp->InputProfilesCMYK.contains(CurItem->IProfile))
if (!ScMW->InputProfilesCMYK.contains(CurItem->IProfile))
{
InputP->insertItem(CurItem->IProfile);
InputP->setCurrentItem(InputP->count()-1);
3301,14 → 3301,14
else
{
ProfilesL::Iterator itP;
ProfilesL::Iterator itPend=ScApp->InputProfiles.end();
for (itP = ScApp->InputProfiles.begin(); itP != itPend; ++itP)
ProfilesL::Iterator itPend=ScMW->InputProfiles.end();
for (itP = ScMW->InputProfiles.begin(); itP != itPend; ++itP)
{
InputP->insertItem(itP.key());
if (itP.key() == CurItem->IProfile)
InputP->setCurrentItem(InputP->count()-1);
}
if (!ScApp->InputProfiles.contains(CurItem->IProfile))
if (!ScMW->InputProfiles.contains(CurItem->IProfile))
{
InputP->insertItem(CurItem->IProfile);
InputP->setCurrentItem(InputP->count()-1);
3328,7 → 3328,7
 
void Mpalette::ChProf(const QString& prn)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
/* PFJ - 29.02.04 - Moved bool into if scope */
if ((HaveDoc) && (HaveItem))
3338,25 → 3338,25
bool EmbedP = prn.startsWith("Embedded") ? true : false;
CurItem->UseEmbedded = EmbedP;
doc->LoadPict(CurItem->Pfile, CurItem->ItemNr, true);
ScApp->view->RefreshItem(CurItem);
ScMW->view->RefreshItem(CurItem);
}
}
 
void Mpalette::ChIntent()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
CurItem->IRender = MonitorI->currentItem();
doc->LoadPict(CurItem->Pfile, CurItem->ItemNr, true);
ScApp->view->RefreshItem(CurItem);
ScMW->view->RefreshItem(CurItem);
}
}
 
void Mpalette::ShowCMS()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if (HaveItem)
updateCmsList();
3373,7 → 3373,7
{
if ((HaveDoc) && (HaveItem))
{
ScApp->view->ItemTextBrush(TxFill->currentText());
ScMW->view->ItemTextBrush(TxFill->currentText());
doc->CurrTextFill = TxFill->currentText();
emit DocChanged();
}
3383,7 → 3383,7
{
if ((HaveDoc) && (HaveItem))
{
ScApp->view->ItemTextPen(TxStroke->currentText());
ScMW->view->ItemTextPen(TxStroke->currentText());
doc->CurrTextStroke = TxStroke->currentText();
emit DocChanged();
}
3391,19 → 3391,19
 
void Mpalette::setActShade()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
int b;
if (PM1 == sender())
{
b = PM1->getValue();
ScApp->view->ItemTextPenS(b);
ScMW->view->ItemTextPenS(b);
doc->CurrTextFillSh = b;
}
else
{
b = PM2->getValue();
ScApp->view->ItemTextBrushS(b);
ScMW->view->ItemTextBrushS(b);
doc->CurrTextStrokeSh = b;
}
emit DocChanged();
3411,7 → 3411,7
 
void Mpalette::setActFarben(QString p, QString b, int shp, int shb)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
ColorList::Iterator it;
int c = 0;
3444,28 → 3444,28
 
void Mpalette::handleLock()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
//uint selectedItemCount=ScApp->view->SelItem.count();
//uint selectedItemCount=ScMW->view->SelItem.count();
uint selectedItemCount=doc->selection->count();
if (selectedItemCount > 1)
{
//if (ScApp->view->SelItem.at(0)->locked())
//if (ScMW->view->SelItem.at(0)->locked())
if (doc->selection->itemAt(0)->locked())
ScApp->view->undoManager->beginTransaction(Um::SelectionGroup,
ScMW->view->undoManager->beginTransaction(Um::SelectionGroup,
Um::IGroup, Um::UnLock, 0, Um::IUnLock);
else
ScApp->view->undoManager->beginTransaction(Um::SelectionGroup,
ScMW->view->undoManager->beginTransaction(Um::SelectionGroup,
Um::IGroup, Um::Lock, 0, Um::ILock);
}
for ( uint a = 0; a < selectedItemCount; ++a)
{
//ScApp->view->SelItem.at(a)->setLocked(Locked->isOn());
//ScMW->view->SelItem.at(a)->setLocked(Locked->isOn());
doc->selection->itemAt(a)->setLocked(Locked->isOn());
//ScApp->view->RefreshItem(ScApp->view->SelItem.at(a));
ScApp->view->RefreshItem(doc->selection->itemAt(a));
//ScMW->view->RefreshItem(ScMW->view->SelItem.at(a));
ScMW->view->RefreshItem(doc->selection->itemAt(a));
}
bool setter = Locked->isOn();
Xpos->setReadOnly(setter);
3479,7 → 3479,7
LayerGroup->setEnabled(!setter);
emit DocChanged();
if (selectedItemCount > 1)
ScApp->view->undoManager->commit();
ScMW->view->undoManager->commit();
}
}
 
3487,9 → 3487,9
{
if ((HaveDoc) && (HaveItem))
{
//for ( uint a = 0; a < ScApp->view->SelItem.count(); ++a)
//for ( uint a = 0; a < ScMW->view->SelItem.count(); ++a)
for ( uint a = 0; a < doc->selection->count(); ++a)
//ScApp->view->SelItem.at(a)->setPrintable(!NoPrint->isOn());
//ScMW->view->SelItem.at(a)->setPrintable(!NoPrint->isOn());
doc->selection->itemAt(a)->setPrintable(!NoPrint->isOn());
emit DocChanged();
}
3499,41 → 3499,41
{
if ((HaveDoc) && (HaveItem))
{
//uint selectedItemCount=ScApp->view->SelItem.count();
//uint selectedItemCount=ScMW->view->SelItem.count();
uint selectedItemCount=doc->selection->count();
if (selectedItemCount > 1)
{
//if (ScApp->view->SelItem.at(0)->sizeLocked())
//if (ScMW->view->SelItem.at(0)->sizeLocked())
if (doc->selection->itemAt(0)->sizeLocked())
ScApp->view->undoManager->beginTransaction(Um::SelectionGroup,
ScMW->view->undoManager->beginTransaction(Um::SelectionGroup,
Um::IGroup, Um::SizeUnLock, 0, Um::IUnLock);
else
ScApp->view->undoManager->beginTransaction(Um::SelectionGroup,
ScMW->view->undoManager->beginTransaction(Um::SelectionGroup,
Um::IGroup, Um::SizeLock, 0, Um::ILock);
}
for ( uint a = 0; a < selectedItemCount; ++a)
{
//ScApp->view->SelItem.at(a)->setSizeLocked(NoResize->isOn());
//ScMW->view->SelItem.at(a)->setSizeLocked(NoResize->isOn());
doc->selection->itemAt(a)->setSizeLocked(NoResize->isOn());
//ScApp->view->RefreshItem(ScApp->view->SelItem.at(a));
ScApp->view->RefreshItem(doc->selection->itemAt(a));
//ScMW->view->RefreshItem(ScMW->view->SelItem.at(a));
ScMW->view->RefreshItem(doc->selection->itemAt(a));
}
Width->setReadOnly(NoResize->isOn());
Height->setReadOnly(NoResize->isOn());
emit DocChanged();
if (selectedItemCount > 1)
ScApp->view->undoManager->commit();
ScMW->view->undoManager->commit();
}
}
 
void Mpalette::handlePathLine()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
CurItem->PoShow = showcurveCheckBox->isChecked();
ScApp->view->RefreshItem(CurItem);
ScMW->view->RefreshItem(CurItem);
emit DocChanged();
}
}
3540,14 → 3540,14
 
void Mpalette::handlePathDist()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
CurItem->setTextToFrameDistLeft(Dist->value());
ScApp->view->AdjustItemSize(CurItem);
ScMW->view->AdjustItemSize(CurItem);
CurItem->UpdatePolyClip();
ScApp->view->RefreshItem(CurItem);
ScMW->view->RefreshItem(CurItem);
emit DocChanged();
}
}
3554,14 → 3554,14
 
void Mpalette::handlePathOffs()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if ((HaveDoc) && (HaveItem))
{
CurItem->BaseOffs = -LineW->value();
ScApp->view->AdjustItemSize(CurItem);
ScMW->view->AdjustItemSize(CurItem);
CurItem->UpdatePolyClip();
ScApp->view->RefreshItem(CurItem);
ScMW->view->RefreshItem(CurItem);
emit DocChanged();
}
}
3568,7 → 3568,7
 
void Mpalette::NewName()
{
if (ScApp->ScriptRunning || !HaveDoc || !HaveItem)
if (ScMW->ScriptRunning || !HaveDoc || !HaveItem)
return;
QString NameOld = CurItem->itemName();
QString NameNew = NameEdit->text();
3610,7 → 3610,7
{
QStringList sortList;
QMap<QString,QString>::Iterator it;
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
langCombo->clear();
for (it = langMap.begin(); it != langMap.end(); ++it)
3623,7 → 3623,7
{
if ((HaveDoc) && (HaveItem))
{
CurItem->setLanguage(ScApp->GetLang(langCombo->currentText()));
CurItem->setLanguage(ScMW->GetLang(langCombo->currentText()));
emit DocChanged();
}
}
3646,7 → 3646,7
if (dia->exec())
{
CurItem->TabValues = dia->tmpTab;
ScApp->view->RefreshItem(CurItem);
ScMW->view->RefreshItem(CurItem);
emit DocChanged();
}
delete dia;
3661,7 → 3661,7
CurItem->LeftLine = LeftLine->isChecked();
CurItem->RightLine = RightLine->isChecked();
CurItem->BottomLine = BottomLine->isChecked();
ScApp->view->RefreshItem(CurItem);
ScMW->view->RefreshItem(CurItem);
emit DocChanged();
}
}
3695,14 → 3695,14
{
_userActionOn = false;
 
//for (uint i = 0; i < ScApp->view->SelItem.count(); ++i)
//for (uint i = 0; i < ScMW->view->SelItem.count(); ++i)
for (uint i = 0; i < doc->selection->count(); ++i)
//ScApp->view->SelItem.at(i)->checkChanges(true);
//ScMW->view->SelItem.at(i)->checkChanges(true);
doc->selection->itemAt(i)->checkChanges(true);
if (ScApp->view->groupTransactionStarted())
if (ScMW->view->groupTransactionStarted())
{
UndoManager::instance()->commit();
ScApp->view->setGroupTransactionStarted(false);
ScMW->view->setGroupTransactionStarted(false);
}
}
 
4005,11 → 4005,11
{
if (!HaveDoc)
return;
//if(ScApp->view->SelItem.count()==0)
//if(ScMW->view->SelItem.count()==0)
if(doc->selection->count()==0)
return;
double dur=doc->unitRatio();
//PageItem *currItem=ScApp->view->SelItem.at(0);
//PageItem *currItem=ScMW->view->SelItem.at(0);
PageItem *currItem=doc->selection->itemAt(0);
Cpal->setSpecialGradient(currItem->GrStartX * dur, currItem->GrStartY * dur,
currItem->GrEndX * dur, currItem->GrEndY * dur,
/branches/Version13x/Scribus/scribus/util.cpp
197,7 → 197,7
if (!device.isEmpty())
// user specified device
cmd1 += " -sDEVICE="+device;
else if (ScApp->HavePngAlpha != 0)
else if (ScMW->HavePngAlpha != 0)
cmd1 += " -sDEVICE=png16m";
else
cmd1 += " -sDEVICE=pngalpha";
448,23 → 448,6
return el->attribute(at, def);
}
 
int QStoInt(QString in)
{
/* Dont need this, toInt returns 0 on failure, dont even need this function really.
bool ok = false;
int c = in.toInt(&ok);
return ok ? c : 0;
*/
return in.toInt();
}
 
double QStodouble(QString in)
{
bool ok = false;
double c = in.toDouble(&ok);
return ok ? c : 0.0;
}
 
QPixmap loadIcon(QString nam)
{
QString iconFilePath = QString("%1/%2").arg(ScPaths::instance().iconDir()).arg(nam);
968,13 → 951,13
QString tmp;
int x, y;
double xf, yf, xf2;
OB->PType = static_cast<PageItem::ItemType>(QStoInt(obj->attribute("PTYPE")));
OB->Width=QStodouble(obj->attribute("WIDTH"));
OB->Height=QStodouble(obj->attribute("HEIGHT"));
OB->RadRect = QStodouble(obj->attribute("RADRECT","0"));
OB->ClipEdited = QStoInt(obj->attribute("CLIPEDIT", "0"));
OB->FrameType = QStoInt(obj->attribute("FRTYPE", "0"));
OB->Pwidth=QStodouble(obj->attribute("PWIDTH"));
OB->PType = static_cast<PageItem::ItemType>(obj->attribute("PTYPE").toInt());
OB->Width=obj->attribute("WIDTH").toDouble();
OB->Height=obj->attribute("HEIGHT").toDouble();
OB->RadRect = obj->attribute("RADRECT", "0").toDouble();
OB->ClipEdited = obj->attribute("CLIPEDIT", "0").toInt();
OB->FrameType = obj->attribute("FRTYPE", "0").toInt();
OB->Pwidth=obj->attribute("PWIDTH").toDouble();
OB->Pcolor = obj->attribute("PCOLOR");
if ((!newVersion) && (OB->PType == 4))
{
986,32 → 969,32
OB->Pcolor2 = obj->attribute("PCOLOR2");
OB->TxtFill = obj->attribute("TXTFILL", "Black");
}
OB->Shade = QStoInt(obj->attribute("SHADE"));
OB->Shade2 = QStoInt(obj->attribute("SHADE2"));
OB->Shade = obj->attribute("SHADE").toInt();
OB->Shade2 = obj->attribute("SHADE2").toInt();
OB->TxtStroke=obj->attribute("TXTSTROKE", "None");
OB->ShTxtFill=QStoInt(obj->attribute("TXTFILLSH", "100"));
OB->ShTxtStroke=QStoInt(obj->attribute("TXTSTRSH", "100"));
OB->TxtScale=qRound(QStodouble(obj->attribute("TXTSCALE", "100")) * 10);
OB->TxtScaleV=qRound(QStodouble(obj->attribute("TXTSCALEV", "100")) * 10);
OB->TxTBase=qRound(QStodouble(obj->attribute("TXTBASE", "0")) * 10);
OB->TxTStyle=QStoInt(obj->attribute("TXTSTYLE", "0"));
OB->TxtShadowX=qRound(QStodouble(obj->attribute("TXTSHX", "5")) * 10);
OB->TxtShadowY=qRound(QStodouble(obj->attribute("TXTSHY", "-5")) * 10);
OB->TxtOutline=qRound(QStodouble(obj->attribute("TXTOUT", "1")) * 10);
OB->TxtUnderPos=qRound(QStodouble(obj->attribute("TXTULP", "-0.1")) * 10);
OB->TxtUnderWidth=qRound(QStodouble(obj->attribute("TXTULW", "-0.1")) * 10);
OB->TxtStrikePos=qRound(QStodouble(obj->attribute("TXTSTP", "-0.1")) * 10);
OB->TxtStrikeWidth=qRound(QStodouble(obj->attribute("TXTSTW", "-0.1")) * 10);
OB->Cols = QStoInt(obj->attribute("COLUMNS","1"));
OB->ColGap = QStodouble(obj->attribute("COLGAP","0.0"));
OB->GrType = QStoInt(obj->attribute("GRTYP","0"));
OB->ShTxtFill=obj->attribute("TXTFILLSH", "100").toInt();
OB->ShTxtStroke=obj->attribute("TXTSTRSH", "100").toInt();
OB->TxtScale=qRound(obj->attribute("TXTSCALE", "100").toDouble() * 10);
OB->TxtScaleV=qRound(obj->attribute("TXTSCALEV", "100").toDouble() * 10);
OB->TxTBase=qRound(obj->attribute("TXTBASE", "0").toDouble() * 10);
OB->TxTStyle=obj->attribute("TXTSTYLE", "0").toInt();
OB->TxtShadowX=qRound(obj->attribute("TXTSHX", "5").toDouble() * 10);
OB->TxtShadowY=qRound(obj->attribute("TXTSHY", "-5").toDouble() * 10);
OB->TxtOutline=qRound(obj->attribute("TXTOUT", "1").toDouble() * 10);
OB->TxtUnderPos=qRound(obj->attribute("TXTULP", "-0.1").toDouble() * 10);
OB->TxtUnderWidth=qRound(obj->attribute("TXTULW", "-0.1").toDouble() * 10);
OB->TxtStrikePos=qRound(obj->attribute("TXTSTP", "-0.1").toDouble() * 10);
OB->TxtStrikeWidth=qRound(obj->attribute("TXTSTW", "-0.1").toDouble() * 10);
OB->Cols = obj->attribute("COLUMNS", "1").toInt();
OB->ColGap = obj->attribute("COLGAP", "0.0").toDouble();
OB->GrType = obj->attribute("GRTYP", "0").toInt();
OB->fill_gradient.clearStops();
if (OB->GrType != 0)
{
OB->GrStartX = QStodouble(obj->attribute("GRSTARTX","0.0"));
OB->GrStartY = QStodouble(obj->attribute("GRSTARTY","0.0"));
OB->GrEndX = QStodouble(obj->attribute("GRENDX","0.0"));
OB->GrEndY = QStodouble(obj->attribute("GRENDY","0.0"));
OB->GrStartX = obj->attribute("GRSTARTX", "0.0").toDouble();
OB->GrStartY = obj->attribute("GRSTARTY", "0.0").toDouble();
OB->GrEndX = obj->attribute("GRENDX", "0.0").toDouble();
OB->GrEndY = obj->attribute("GRENDY", "0.0").toDouble();
OB->GrColor = obj->attribute("GRCOLOR","");
if (OB->GrColor.isEmpty())
OB->GrColor = "Black";
1018,29 → 1001,29
OB->GrColor2 = obj->attribute("GRCOLOR2","Black");
if (OB->GrColor2.isEmpty())
OB->GrColor2 = "Black";
OB->GrShade = QStoInt(obj->attribute("GRSHADE","100"));
OB->GrShade2 = QStoInt(obj->attribute("GRSHADE2","100"));
OB->GrShade = obj->attribute("GRSHADE", "100").toInt();
OB->GrShade2 = obj->attribute("GRSHADE2", "100").toInt();
}
OB->Rot=QStodouble(obj->attribute("ROT"));
OB->PLineArt=Qt::PenStyle(QStoInt(obj->attribute("PLINEART")));
OB->PLineEnd=Qt::PenCapStyle(QStoInt(obj->attribute("PLINEEND","0")));
OB->PLineJoin=Qt::PenJoinStyle(QStoInt(obj->attribute("PLINEJOIN","0")));
OB->LineSp=QStodouble(obj->attribute("LINESP"));
OB->LineSpMode = QStoInt(obj->attribute("LINESPMode","0"));
OB->LocalScX=QStodouble(obj->attribute("LOCALSCX"));
OB->LocalScY=QStodouble(obj->attribute("LOCALSCY"));
OB->LocalX=QStodouble(obj->attribute("LOCALX"));
OB->LocalY=QStodouble(obj->attribute("LOCALY"));
OB->PicArt=QStoInt(obj->attribute("PICART"));
OB->flippedH = QStoInt(obj->attribute("FLIPPEDH")) % 2;
OB->flippedV = QStoInt(obj->attribute("FLIPPEDV")) % 2;
OB->BBoxX=QStodouble(obj->attribute("BBOXX"));
OB->BBoxH=QStodouble(obj->attribute("BBOXH"));
OB->ScaleType = QStoInt(obj->attribute("SCALETYPE","1"));
OB->AspectRatio = QStoInt(obj->attribute("RATIO","0"));
OB->isPrintable=QStoInt(obj->attribute("PRINTABLE"));
OB->isAnnotation=QStoInt(obj->attribute("ANNOTATION","0"));
OB->AnType = QStoInt(obj->attribute("ANTYPE","0"));
OB->Rot=obj->attribute("ROT").toDouble();
OB->PLineArt=Qt::PenStyle(obj->attribute("PLINEART").toInt());
OB->PLineEnd=Qt::PenCapStyle(obj->attribute("PLINEEND", "0").toInt());
OB->PLineJoin=Qt::PenJoinStyle(obj->attribute("PLINEJOIN", "0").toInt());
OB->LineSp=obj->attribute("LINESP").toDouble();
OB->LineSpMode = obj->attribute("LINESPMode", "0").toInt();
OB->LocalScX=obj->attribute("LOCALSCX").toDouble();
OB->LocalScY=obj->attribute("LOCALSCY").toDouble();
OB->LocalX=obj->attribute("LOCALX").toDouble();
OB->LocalY=obj->attribute("LOCALY").toDouble();
OB->PicArt=obj->attribute("PICART").toInt();
OB->flippedH = obj->attribute("FLIPPEDH").toInt() % 2;
OB->flippedV = obj->attribute("FLIPPEDV").toInt() % 2;
OB->BBoxX=obj->attribute("BBOXX").toDouble();
OB->BBoxH=obj->attribute("BBOXH").toDouble();
OB->ScaleType = obj->attribute("SCALETYPE", "1").toInt();
OB->AspectRatio = obj->attribute("RATIO", "0").toInt();
OB->isPrintable=obj->attribute("PRINTABLE").toInt();
OB->isAnnotation=obj->attribute("ANNOTATION", "0").toInt();
OB->AnType = obj->attribute("ANTYPE", "0").toInt();
OB->AnAction = obj->attribute("ANACTION","");
OB->An_E_act = obj->attribute("ANEACT","");
OB->An_X_act = obj->attribute("ANXACT","");
1051,7 → 1034,7
OB->An_F_act = obj->attribute("ANFACT","");
OB->An_V_act = obj->attribute("ANVACT","");
OB->An_C_act = obj->attribute("ANCACT","");
OB->AnActType = QStoInt(obj->attribute("ANACTYP","0"));
OB->AnActType = obj->attribute("ANACTYP", "0").toInt();
OB->An_Extern = obj->attribute("ANEXTERN","");
if ((!OB->An_Extern.isEmpty()) && (OB->AnActType != 8))
{
1058,65 → 1041,65
QFileInfo efp(OB->An_Extern);
OB->An_Extern = efp.absFilePath();
}
OB->AnZiel = QStoInt(obj->attribute("ANZIEL","0"));
OB->AnZiel = obj->attribute("ANZIEL", "0").toInt();
OB->AnName = obj->attribute("ANNAME","");
OB->AnToolTip = obj->attribute("ANTOOLTIP","");
OB->AnRollOver = obj->attribute("ANROLL","");
OB->AnDown = obj->attribute("ANDOWN","");
OB->AnBwid = QStoInt(obj->attribute("ANBWID","1"));
OB->AnBsty = QStoInt(obj->attribute("ANBSTY","0"));
OB->AnFeed = QStoInt(obj->attribute("ANFEED","1"));
OB->AnFlag = QStoInt(obj->attribute("ANFLAG","0"));
OB->AnFont = QStoInt(obj->attribute("ANFONT","4"));
OB->AnFormat = QStoInt(obj->attribute("ANFORMAT","0"));
OB->AnVis = QStoInt(obj->attribute("ANVIS","0"));
OB->AnIsChk = static_cast<bool>(QStoInt(obj->attribute("ANCHK","0")));
OB->AnAAact = static_cast<bool>(QStoInt(obj->attribute("ANAA","0")));
OB->AnHTML = static_cast<bool>(QStoInt(obj->attribute("ANHTML","0")));
OB->AnUseIcons = static_cast<bool>(QStoInt(obj->attribute("ANICON","0")));
OB->AnChkStil = QStoInt(obj->attribute("ANCHKS","0"));
OB->AnMaxChar = QStoInt(obj->attribute("ANMC","-1"));
OB->AnBwid = obj->attribute("ANBWID", "1").toInt();
OB->AnBsty = obj->attribute("ANBSTY", "0").toInt();
OB->AnFeed = obj->attribute("ANFEED", "1").toInt();
OB->AnFlag = obj->attribute("ANFLAG", "0").toInt();
OB->AnFont = obj->attribute("ANFONT", "4").toInt();
OB->AnFormat = obj->attribute("ANFORMAT", "0").toInt();
OB->AnVis = obj->attribute("ANVIS", "0").toInt();
OB->AnIsChk = static_cast<bool>(obj->attribute("ANCHK", "0").toInt());
OB->AnAAact = static_cast<bool>(obj->attribute("ANAA", "0").toInt());
OB->AnHTML = static_cast<bool>(obj->attribute("ANHTML", "0").toInt());
OB->AnUseIcons = static_cast<bool>(obj->attribute("ANICON", "0").toInt());
OB->AnChkStil = obj->attribute("ANCHKS", "0").toInt();
OB->AnMaxChar = obj->attribute("ANMC", "-1").toInt();
OB->AnBColor = obj->attribute("ANBCOL","None");
OB->AnIPlace = QStoInt(obj->attribute("ANPLACE","1"));
OB->AnScaleW = QStoInt(obj->attribute("ANSCALE","0"));
if (QStoInt(obj->attribute("TRANSPARENT","0")) == 1)
OB->AnIPlace = obj->attribute("ANPLACE", "1").toInt();
OB->AnScaleW = obj->attribute("ANSCALE", "0").toInt();
if (obj->attribute("TRANSPARENT", "0").toInt() == 1)
OB->Pcolor = "None";
OB->Textflow=QStoInt(obj->attribute("TEXTFLOW"));
OB->Textflow2 =QStoInt(obj->attribute("TEXTFLOW2","0"));
OB->UseContour = QStoInt(obj->attribute("TEXTFLOW3","0"));
OB->Extra=QStodouble(obj->attribute("EXTRA"));
OB->TExtra=QStodouble(obj->attribute("TEXTRA", "1"));
OB->BExtra=QStodouble(obj->attribute("BEXTRA", "1"));
OB->RExtra=QStodouble(obj->attribute("REXTRA", "1"));
OB->PoShow = QStoInt(obj->attribute("PLTSHOW","0"));
OB->BaseOffs = QStodouble(obj->attribute("BASEOF","0"));
OB->ISize = qRound(QStodouble(obj->attribute("ISIZE","12")) * 10);
OB->Textflow=obj->attribute("TEXTFLOW").toInt();
OB->Textflow2 =obj->attribute("TEXTFLOW2", "0").toInt();
OB->UseContour = obj->attribute("TEXTFLOW3", "0").toInt();
OB->Extra=obj->attribute("EXTRA").toDouble();
OB->TExtra=obj->attribute("TEXTRA", "1").toDouble();
OB->BExtra=obj->attribute("BEXTRA", "1").toDouble();
OB->RExtra=obj->attribute("REXTRA", "1").toDouble();
OB->PoShow = obj->attribute("PLTSHOW", "0").toInt();
OB->BaseOffs = obj->attribute("BASEOF", "0").toDouble();
OB->ISize = qRound(obj->attribute("ISIZE", "12").toDouble() * 10);
if (obj->hasAttribute("EXTRAV"))
OB->ExtraV = qRound(QStodouble(obj->attribute("EXTRAV","0")) / QStodouble(obj->attribute("ISIZE","12")) * 1000.0);
OB->ExtraV = qRound(obj->attribute("EXTRAV", "0").toDouble() / obj->attribute("ISIZE", "12").toDouble() * 1000.0);
else
OB->ExtraV = QStoInt(obj->attribute("TXTKERN"));
OB->ExtraV = obj->attribute("TXTKERN").toInt();
OB->Pfile=obj->attribute("PFILE");
OB->Pfile2=obj->attribute("PFILE2","");
OB->Pfile3=obj->attribute("PFILE3","");
OB->IProfile=obj->attribute("PRFILE","");
OB->EmProfile=obj->attribute("EPROF","");
OB->IRender = QStoInt(obj->attribute("IRENDER","1"));
OB->UseEmbedded = QStoInt(obj->attribute("EMBEDDED","1"));
OB->Locked = static_cast<bool>(QStoInt(obj->attribute("LOCK","0")));
OB->LockRes = static_cast<bool>(QStoInt(obj->attribute("LOCKR","0")));
OB->Reverse = static_cast<bool>(QStoInt(obj->attribute("REVERS","0")));
OB->isTableItem = static_cast<bool>(QStoInt(obj->attribute("isTableItem","0")));
OB->TopLine = static_cast<bool>(QStoInt(obj->attribute("TopLine","0")));
OB->LeftLine = static_cast<bool>(QStoInt(obj->attribute("LeftLine","0")));
OB->RightLine = static_cast<bool>(QStoInt(obj->attribute("RightLine","0")));
OB->BottomLine = static_cast<bool>(QStoInt(obj->attribute("BottomLine","0")));
OB->TopLinkID = QStoInt(obj->attribute("TopLINK","-1"));
OB->LeftLinkID = QStoInt(obj->attribute("LeftLINK","-1"));
OB->RightLinkID = QStoInt(obj->attribute("RightLINK","-1"));
OB->BottomLinkID = QStoInt(obj->attribute("BottomLINK","-1"));
OB->Transparency = QStodouble(obj->attribute("TransValue","0.0"));
OB->IRender = obj->attribute("IRENDER", "1").toInt();
OB->UseEmbedded = obj->attribute("EMBEDDED", "1").toInt();
OB->Locked = static_cast<bool>(obj->attribute("LOCK", "0").toInt());
OB->LockRes = static_cast<bool>(obj->attribute("LOCKR", "0").toInt());
OB->Reverse = static_cast<bool>(obj->attribute("REVERS", "0").toInt());
OB->isTableItem = static_cast<bool>(obj->attribute("isTableItem", "0").toInt());
OB->TopLine = static_cast<bool>(obj->attribute("TopLine", "0").toInt());
OB->LeftLine = static_cast<bool>(obj->attribute("LeftLine", "0").toInt());
OB->RightLine = static_cast<bool>(obj->attribute("RightLine", "0").toInt());
OB->BottomLine = static_cast<bool>(obj->attribute("BottomLine", "0").toInt());
OB->TopLinkID = obj->attribute("TopLINK", "-1").toInt();
OB->LeftLinkID = obj->attribute("LeftLINK", "-1").toInt();
OB->RightLinkID = obj->attribute("RightLINK", "-1").toInt();
OB->BottomLinkID = obj->attribute("BottomLINK", "-1").toInt();
OB->Transparency = obj->attribute("TransValue", "0.0").toDouble();
if (obj->hasAttribute("TransValueS"))
OB->TranspStroke = QStodouble(obj->attribute("TransValueS","0.0"));
OB->TranspStroke = obj->attribute("TransValueS", "0.0").toDouble();
else
OB->TranspStroke = OB->Transparency;
tmp = "";
1165,13 → 1148,13
else
OB->ContourLine.resize(0);
tmp = "";
if ((obj->hasAttribute("NUMTAB")) && (QStoInt(obj->attribute("NUMTAB","0")) != 0))
if ((obj->hasAttribute("NUMTAB")) && (obj->attribute("NUMTAB", "0").toInt() != 0))
{
struct PageItem::TabRecord tb;
tmp = obj->attribute("TABS");
QTextStream tgv(&tmp, IO_ReadOnly);
OB->TabValues.clear();
for (int cxv = 0; cxv < QStoInt(obj->attribute("NUMTAB","0")); cxv += 2)
for (int cxv = 0; cxv < obj->attribute("NUMTAB", "0").toInt(); cxv += 2)
{
tgv >> xf;
tgv >> xf2;
1184,12 → 1167,12
}
else
OB->TabValues.clear();
if ((obj->hasAttribute("NUMDASH")) && (QStoInt(obj->attribute("NUMDASH","0")) != 0))
if ((obj->hasAttribute("NUMDASH")) && (obj->attribute("NUMDASH", "0").toInt() != 0))
{
tmp = obj->attribute("DASHS");
QTextStream dgv(&tmp, IO_ReadOnly);
OB->DashValues.clear();
for (int cxv = 0; cxv < QStoInt(obj->attribute("NUMDASH","0")); ++cxv)
for (int cxv = 0; cxv < obj->attribute("NUMDASH", "0").toInt(); ++cxv)
{
dgv >> xf;
OB->DashValues.append(xf);
1198,7 → 1181,7
}
else
OB->DashValues.clear();
OB->DashOffset = QStodouble(obj->attribute("DASHOFF","0.0"));
OB->DashOffset = obj->attribute("DASHOFF", "0.0").toDouble();
}
 
QColor SetColor(ScribusDoc *currentDoc, QString color, int shad)
1396,8 → 1379,8
QString getFileNameByPage(uint pageNo, QString extension)
{
QString number;
number = number.setNum(pageNo + ScApp->doc->FirstPnum);
QString defaultName = ScApp->doc->DocName;
number = number.setNum(pageNo + ScMW->doc->FirstPnum);
QString defaultName = ScMW->doc->DocName;
if (defaultName.isNull())
defaultName = "export";
else
/branches/Version13x/Scribus/scribus/charselect.h
17,7 → 17,7
 
class FontCombo;
class PageItem;
class ScribusApp;
class ScribusMainWindow;
 
class SCRIBUS_API Zoom : public QDialog
{
59,7 → 59,7
QPushButton* deleteButton;
QPushButton* closeButton;
PageItem *ite;
ScribusApp *ap;
ScribusMainWindow *ap;
typedef QValueList<uint> charClassDef;
QValueList<charClassDef> allClasses;
QValueList<uint> characters;
106,7 → 106,7
void insChar();
 
protected:
void run(QWidget* parent, PageItem* item, ScribusApp* pl);
void run(QWidget* parent, PageItem* item, ScribusMainWindow* pl);
bool eventFilter( QObject *obj, QEvent *ev );
void recalcCellSizes();
QVBoxLayout* zAuswahlLayout;
119,7 → 119,7
Q_OBJECT
 
public:
ChTable(CharSelect* parent, ScribusApp *pl);
ChTable(CharSelect* parent, ScribusMainWindow *pl);
~ChTable() {};
void resizeData( int ) {};
QRect cellGeometry ( int row, int col ) const;
129,7 → 129,7
bool mPressed;
bool alternate;
Zoom* dia;
ScribusApp *ap;
ScribusMainWindow *ap;
CharSelect* par;
QTimer* watchTimer;
uint maxCount;
/branches/Version13x/Scribus/scribus/loremipsum.cpp
200,23 → 200,23
// is it really applied?
bool done = false;
 
//for (uint i = 0; i < ScApp->view->SelItem.count(); ++i)
for (uint i = 0; i < ScApp->doc->selection->count(); ++i)
//for (uint i = 0; i < ScMW->view->SelItem.count(); ++i)
for (uint i = 0; i < ScMW->doc->selection->count(); ++i)
{
//if (ScApp->view->SelItem.at(i) == NULL)
PageItem* currItem=ScApp->doc->selection->itemAt(i);
//if (ScMW->view->SelItem.at(i) == NULL)
PageItem* currItem=ScMW->doc->selection->itemAt(i);
if (currItem == NULL)
continue;
//if (! ScApp->view->SelItem.at(i)->asTextFrame())
//if (! ScMW->view->SelItem.at(i)->asTextFrame())
if (!currItem->asTextFrame())
continue;
//if (ScApp->view->SelItem.at(i)->itemText.count() != 0)
//if (ScMW->view->SelItem.at(i)->itemText.count() != 0)
if (currItem->itemText.count() != 0)
{
ScApp->view->ClearItem();
ScMW->view->ClearItem();
/* ClearItem() doesn't return true or false so
the following test has to be done */
//if (ScApp->view->SelItem.at(i)->itemText.count() != 0)
//if (ScMW->view->SelItem.at(i)->itemText.count() != 0)
if (currItem->itemText.count() != 0)
continue;
}
232,24 → 232,24
{
done = true;
ss->Objekt = lp->createLorem(paraCount);
//int st = ScApp->view->SelItem.at(i)->Doc->currentParaStyle;
//int st = ScMW->view->SelItem.at(i)->Doc->currentParaStyle;
int st = currItem->Doc->currentParaStyle;
if (st > 5)
//ss->GetText(ScApp->view->SelItem.at(i), st, ScApp->view->SelItem.at(i)->Doc->docParagraphStyles[st].Font, ScApp->view->SelItem.at(i)->Doc->docParagraphStyles[st].FontSize, true);
//ss->GetText(ScMW->view->SelItem.at(i), st, ScMW->view->SelItem.at(i)->Doc->docParagraphStyles[st].Font, ScMW->view->SelItem.at(i)->Doc->docParagraphStyles[st].FontSize, true);
ss->GetText(currItem, st, currItem->Doc->docParagraphStyles[st].Font, currItem->Doc->docParagraphStyles[st].FontSize, true);
else
//ss->GetText(ScApp->view->SelItem.at(i), st, ScApp->view->SelItem.at(i)->IFont, ScApp->view->SelItem.at(i)->ISize, true);
//ss->GetText(ScMW->view->SelItem.at(i), st, ScMW->view->SelItem.at(i)->IFont, ScMW->view->SelItem.at(i)->ISize, true);
ss->GetText(currItem, st, currItem->IFont, currItem->ISize, true);
delete ss;
}
//if (ScApp->view->SelItem.at(i)->Doc->docHyphenator->AutoCheck)
// ScApp->view->SelItem.at(i)->Doc->docHyphenator->slotHyphenate(ScApp->view->SelItem.at(i));
//if (ScMW->view->SelItem.at(i)->Doc->docHyphenator->AutoCheck)
// ScMW->view->SelItem.at(i)->Doc->docHyphenator->slotHyphenate(ScMW->view->SelItem.at(i));
if (currItem->Doc->docHyphenator->AutoCheck)
currItem->Doc->docHyphenator->slotHyphenate(currItem);
}
if (done)
{
ScApp->view->updateContents();
ScApp->slotDocCh();
ScMW->view->updateContents();
ScMW->slotDocCh();
}
}
/branches/Version13x/Scribus/scribus/pluginmanager.h
14,7 → 14,7
* It contains methods and attributes for plugin running and its settings
* and returning values.
*
* Derived from Franz's ScribusApp stuff (petr vanek)
* Derived from Franz's ScribusMainWindow stuff (petr vanek)
*
*/
 
84,7 → 84,7
 
/*! \brief Return a pointer to this instance.
 
\Note: for now, returns a reference to (*ScApp->pluginManager); should
\Note: for now, returns a reference to (*ScMW->pluginManager); should
probably be turned into a singleton later. */
static PluginManager & instance();
 
/branches/Version13x/Scribus/scribus/checkDocument.cpp
174,13 → 174,13
{
if (itemMap.contains(ite))
{
ScApp->closeActiveWindowMasterPageEditor();
ScMW->closeActiveWindowMasterPageEditor();
emit selectElement(document->DocItems.at(itemMap[ite])->OwnPage, itemMap[ite]);
return;
}
if (pageMap.contains(ite))
{
ScApp->closeActiveWindowMasterPageEditor();
ScMW->closeActiveWindowMasterPageEditor();
emit selectPage(pageMap[ite]);
return;
}
/branches/Version13x/Scribus/scribus/prefs.cpp
64,7 → 64,7
prefsManager=PrefsManager::instance();
ApplicationPrefs* prefsData=&(prefsManager->appPrefs);
int decimals;
ap = (ScribusApp*)parent;
ap = (ScribusMainWindow*)parent;
docUnitIndex = prefsData->docUnitIndex;
unitRatio = unitGetRatioFromIndex(docUnitIndex);
decimals = unitGetPrecisionFromIndex(docUnitIndex);
160,13 → 160,13
ProPfad = new QLineEdit( GroupBox200, "Datei1" );
ProPfad->setMinimumSize( QSize( 268, 22 ) );
ProPfad->setText(prefsData->ProfileDir);
if (ScApp->HaveDoc)
if (ScMW->HaveDoc)
ProPfad->setEnabled(false);
PfadText2 = new QLabel( ProPfad, tr("&ICC Profiles:"), GroupBox200, "Pfadtext1" );
FileC2 = new QToolButton( GroupBox200, "FileC1" );
FileC2->setMinimumSize( QSize( 88, 24 ) );
FileC2->setText( tr( "C&hange..." ) );
if (ScApp->HaveDoc)
if (ScMW->HaveDoc)
FileC2->setEnabled(false);
GroupBox200Layout->addWidget( PfadText2, 1, 0 );
GroupBox200Layout->addWidget( ProPfad, 1, 1 );
1420,10 → 1420,10
prefsManager->appPrefs.typographicSettings.valueStrikeThruPos = qRound(tabTypo->strikethruPos->value() * 10);
prefsManager->appPrefs.typographicSettings.valueStrikeThruWidth = qRound(tabTypo->strikethruWidth->value() * 10);
prefsManager->appPrefs.toolSettings.dTextBackGround = tabTools->colorComboTextBackground->currentText();
if (prefsManager->appPrefs.toolSettings.dTextBackGround == ScApp->noneString)
if (prefsManager->appPrefs.toolSettings.dTextBackGround == ScMW->noneString)
prefsManager->appPrefs.toolSettings.dTextBackGround = "None";
prefsManager->appPrefs.toolSettings.dTextLineColor = tabTools->colorComboTextLine->currentText();
if (prefsManager->appPrefs.toolSettings.dTextLineColor == ScApp->noneString)
if (prefsManager->appPrefs.toolSettings.dTextLineColor == ScMW->noneString)
prefsManager->appPrefs.toolSettings.dTextLineColor = "None";
prefsManager->appPrefs.toolSettings.dTextBackGroundShade = tabTools->shadingTextBack->value();
prefsManager->appPrefs.toolSettings.dTextLineShade = tabTools->shadingTextLine->value();
1430,19 → 1430,19
prefsManager->appPrefs.toolSettings.dTextPenShade = tabTools->shadingText->value();
prefsManager->appPrefs.toolSettings.dTextStrokeShade = tabTools->shadingTextStroke->value();
prefsManager->appPrefs.toolSettings.dPen = tabTools->colorComboLineShape->currentText();
if (prefsManager->appPrefs.toolSettings.dPen == ScApp->noneString)
if (prefsManager->appPrefs.toolSettings.dPen == ScMW->noneString)
prefsManager->appPrefs.toolSettings.dPen = "None";
prefsManager->appPrefs.toolSettings.dPenText = tabTools->colorComboText->currentText();
if (prefsManager->appPrefs.toolSettings.dPenText == ScApp->noneString)
if (prefsManager->appPrefs.toolSettings.dPenText == ScMW->noneString)
prefsManager->appPrefs.toolSettings.dPenText = "None";
prefsManager->appPrefs.toolSettings.dStrokeText = tabTools->colorComboStrokeText->currentText();
if (prefsManager->appPrefs.toolSettings.dStrokeText == ScApp->noneString)
if (prefsManager->appPrefs.toolSettings.dStrokeText == ScMW->noneString)
prefsManager->appPrefs.toolSettings.dStrokeText = "None";
prefsManager->appPrefs.toolSettings.dCols = tabTools->columnsText->value();
prefsManager->appPrefs.toolSettings.dGap = tabTools->gapText->value() / prefsUnitRatio;
prefsManager->appPrefs.toolSettings.dTabWidth = tabTools->gapTab->value() / prefsUnitRatio;
prefsManager->appPrefs.toolSettings.dBrush = tabTools->comboFillShape->currentText();
if (prefsManager->appPrefs.toolSettings.dBrush == ScApp->noneString)
if (prefsManager->appPrefs.toolSettings.dBrush == ScMW->noneString)
prefsManager->appPrefs.toolSettings.dBrush = "None";
prefsManager->appPrefs.toolSettings.dShade = tabTools->shadingFillShape->value();
prefsManager->appPrefs.toolSettings.dShade2 = tabTools->shadingLineShape->value();
1484,7 → 1484,7
}
prefsManager->appPrefs.toolSettings.dWidth = tabTools->lineWidthShape->value();
prefsManager->appPrefs.toolSettings.dPenLine = tabTools->colorComboLine->currentText();
if (prefsManager->appPrefs.toolSettings.dPenLine == ScApp->noneString)
if (prefsManager->appPrefs.toolSettings.dPenLine == ScMW->noneString)
prefsManager->appPrefs.toolSettings.dPenLine = "None";
prefsManager->appPrefs.toolSettings.dShadeLine = tabTools->shadingLine->value();
switch (tabTools->comboStyleLine->currentItem())
1512,7 → 1512,7
prefsManager->appPrefs.toolSettings.magMax = tabTools->maximumZoom->value();
prefsManager->appPrefs.toolSettings.magStep = tabTools->zoomStep->value();
prefsManager->appPrefs.toolSettings.dBrushPict = tabTools->comboFillImage->currentText();
if (prefsManager->appPrefs.toolSettings.dBrushPict == ScApp->noneString)
if (prefsManager->appPrefs.toolSettings.dBrushPict == ScMW->noneString)
prefsManager->appPrefs.toolSettings.dBrushPict = "None";
prefsManager->appPrefs.toolSettings.shadePict = tabTools->shadingFillImage->value();
prefsManager->appPrefs.toolSettings.scaleX = static_cast<double>(tabTools->scalingHorizontal->value()) / 100.0;
1531,7 → 1531,7
prefsManager->appPrefs.AutoSave = GroupAS->isChecked();
prefsManager->appPrefs.AutoSaveTime = ASTime->value() * 60 * 1000;
prefsManager->appPrefs.MinWordLen = tabHyphenator->wordLen->value();
prefsManager->appPrefs.Language = ScApp->GetLang(tabHyphenator->language->currentText());
prefsManager->appPrefs.Language = ScMW->GetLang(tabHyphenator->language->currentText());
prefsManager->appPrefs.Automatic = !tabHyphenator->verbose->isChecked();
prefsManager->appPrefs.AutoCheck = tabHyphenator->input->isChecked();
prefsManager->appPrefs.HyCount = tabHyphenator->maxCount->value();
/branches/Version13x/Scribus/scribus/preview.cpp
40,7 → 40,7
extern bool printDinUse;
 
/*!
\fn PPreview::PPreview( QWidget* parent, ScribusApp *pl)
\fn PPreview::PPreview( QWidget* parent, ScribusMainWindow *pl)
\author Franz Schmid
\date
\brief Create the Print Preview window
/branches/Version13x/Scribus/scribus/aligndistribute.h
6,7 → 6,7
 
/***************************************************************************
* *
* ScApp program is free software; you can redistribute it and/or modify *
* ScMW program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
36,7 → 36,7
class QToolButton;
class MSpinBox;
 
class ScribusApp;
class ScribusMainWindow;
class ScribusDoc;
class UndoManager;
 
140,7 → 140,7
bool startAlign();
void endAlign();
UndoManager *undoManager;
ScribusApp* ScApp;
ScribusMainWindow* ScMW;
AlignTo currAlignTo;
QValueList<AlignObjs> *alignObjects;
uint alignObjectsCount;
/branches/Version13x/Scribus/scribus/menumanager.cpp
274,13 → 274,13
ScrAction *actionFromName=NULL;
//quick hack to make this work for existing plugins for now
if (parent=="File" && afterMenuName=="New")
actionFromName=ScApp->scrActions["fileNew"];
actionFromName=ScMW->scrActions["fileNew"];
if (parent=="File" && afterMenuName=="Print")
actionFromName=ScApp->scrActions["filePrint"];
actionFromName=ScMW->scrActions["filePrint"];
if (parent=="File" && afterMenuName=="SaveAs")
actionFromName=ScApp->scrActions["fileSaveAs"];
actionFromName=ScMW->scrActions["fileSaveAs"];
if (parent=="Help" && afterMenuName=="Manual")
actionFromName=ScApp->scrActions["helpManual"];
actionFromName=ScMW->scrActions["helpManual"];
if (menuList.contains(parent) && menuList[parent]!=NULL)
retVal=menuList[parent]->insertMenuItemAfter(menuAction, actionFromName);
/branches/Version13x/Scribus/scribus/werktoolb.cpp
41,17 → 41,17
0.0, 100.0, 0.0, 100.0, 0.0, 0.0, 0.0, 0.0};
ShapeVals = AutoShapes0;
 
ScApp->scrActions["toolsSelect"]->addTo(this);
ScApp->scrActions["toolsInsertTextFrame"]->addTo(this);
ScApp->scrActions["toolsInsertImageFrame"]->addTo(this);
ScApp->scrActions["toolsInsertTableFrame"]->addTo(this);
ScMW->scrActions["toolsSelect"]->addTo(this);
ScMW->scrActions["toolsInsertTextFrame"]->addTo(this);
ScMW->scrActions["toolsInsertImageFrame"]->addTo(this);
ScMW->scrActions["toolsInsertTableFrame"]->addTo(this);
ScApp->scrActions["toolsInsertShape"]->addTo(this);
ScApp->scrMenuMgr->createMenu("insertShapeButtonMenu", "insertShapeButtonMenu");
insertShapeButtonMenu=ScApp->scrMenuMgr->getLocalPopupMenu("insertShapeButtonMenu");
ScApp->scrMenuMgr->addMenuToWidgetOfAction("insertShapeButtonMenu", ScApp->scrActions["toolsInsertShape"]);
ScMW->scrActions["toolsInsertShape"]->addTo(this);
ScMW->scrMenuMgr->createMenu("insertShapeButtonMenu", "insertShapeButtonMenu");
insertShapeButtonMenu=ScMW->scrMenuMgr->getLocalPopupMenu("insertShapeButtonMenu");
ScMW->scrMenuMgr->addMenuToWidgetOfAction("insertShapeButtonMenu", ScMW->scrActions["toolsInsertShape"]);
QToolButton *insertShapeButton = dynamic_cast<QToolButton*>(ScApp->scrActions["toolsInsertShape"]->getWidgetAddedTo());
QToolButton *insertShapeButton = dynamic_cast<QToolButton*>(ScMW->scrActions["toolsInsertShape"]->getWidgetAddedTo());
if (insertShapeButton)
insertShapeButton->setPopupDelay(0);
Rechteck = new AutoformButtonGroup( NULL );
58,30 → 58,30
insertShapeButtonMenu->insertItem( Rechteck );
QImage newShapeIcon = Rechteck->getIconPixmap(0).convertToImage();
newShapeIcon.smoothScale(16,16);
ScApp->scrActions["toolsInsertShape"]->setIconSet(QIconSet(newShapeIcon,Rechteck->getIconPixmap(0)));
ScMW->scrActions["toolsInsertShape"]->setIconSet(QIconSet(newShapeIcon,Rechteck->getIconPixmap(0)));
 
ScApp->scrActions["toolsInsertPolygon"]->addTo(this);
ScApp->scrMenuMgr->createMenu("insertPolygonButtonMenu", "insertPolygonButtonMenu");
insertPolygonButtonMenu=ScApp->scrMenuMgr->getLocalPopupMenu("insertPolygonButtonMenu");
ScApp->scrMenuMgr->addMenuToWidgetOfAction("insertPolygonButtonMenu", ScApp->scrActions["toolsInsertPolygon"]);
ScMW->scrActions["toolsInsertPolygon"]->addTo(this);
ScMW->scrMenuMgr->createMenu("insertPolygonButtonMenu", "insertPolygonButtonMenu");
insertPolygonButtonMenu=ScMW->scrMenuMgr->getLocalPopupMenu("insertPolygonButtonMenu");
ScMW->scrMenuMgr->addMenuToWidgetOfAction("insertPolygonButtonMenu", ScMW->scrActions["toolsInsertPolygon"]);
idInsertPolygonButtonMenu=insertPolygonButtonMenu->insertItem( "Properties...", this, SLOT(GetPolyProps()));
QToolButton *insertPolygonButton = dynamic_cast<QToolButton*>(ScApp->scrActions["toolsInsertPolygon"]->getWidgetAddedTo());
QToolButton *insertPolygonButton = dynamic_cast<QToolButton*>(ScMW->scrActions["toolsInsertPolygon"]->getWidgetAddedTo());
if (insertPolygonButton)
insertPolygonButton->setPopupDelay(0);
ScApp->scrActions["toolsInsertLine"]->addTo(this);
ScApp->scrActions["toolsInsertBezier"]->addTo(this);
ScApp->scrActions["toolsInsertFreehandLine"]->addTo(this);
ScApp->scrActions["toolsRotate"]->addTo(this);
ScApp->scrActions["toolsZoom"]->addTo(this);
ScApp->scrActions["toolsEditContents"]->addTo(this);
ScApp->scrActions["toolsEditWithStoryEditor"]->addTo(this);
ScApp->scrActions["toolsLinkTextFrame"]->addTo(this);
ScApp->scrActions["toolsUnlinkTextFrame"]->addTo(this);
ScApp->scrActions["toolsMeasurements"]->addTo(this);
ScApp->scrActions["toolsCopyProperties"]->addTo(this);
ScApp->scrActions["toolsEyeDropper"]->addTo(this);
ScMW->scrActions["toolsInsertLine"]->addTo(this);
ScMW->scrActions["toolsInsertBezier"]->addTo(this);
ScMW->scrActions["toolsInsertFreehandLine"]->addTo(this);
ScMW->scrActions["toolsRotate"]->addTo(this);
ScMW->scrActions["toolsZoom"]->addTo(this);
ScMW->scrActions["toolsEditContents"]->addTo(this);
ScMW->scrActions["toolsEditWithStoryEditor"]->addTo(this);
ScMW->scrActions["toolsLinkTextFrame"]->addTo(this);
ScMW->scrActions["toolsUnlinkTextFrame"]->addTo(this);
ScMW->scrActions["toolsMeasurements"]->addTo(this);
ScMW->scrActions["toolsCopyProperties"]->addTo(this);
ScMW->scrActions["toolsEyeDropper"]->addTo(this);
 
setCloseMode(QDockWindow::Undocked);
languageChange();
103,9 → 103,9
 
void WerkToolB::GetPolyProps()
{
PolygonProps* dia = new PolygonProps(this, ScApp->doc->toolSettings.polyC, ScApp->doc->toolSettings.polyFd, ScApp->doc->toolSettings.polyF, ScApp->doc->toolSettings.polyS, ScApp->doc->toolSettings.polyR);
PolygonProps* dia = new PolygonProps(this, ScMW->doc->toolSettings.polyC, ScMW->doc->toolSettings.polyFd, ScMW->doc->toolSettings.polyF, ScMW->doc->toolSettings.polyS, ScMW->doc->toolSettings.polyR);
if (dia->exec())
dia->getValues(&ScApp->doc->toolSettings.polyC, &ScApp->doc->toolSettings.polyFd, &ScApp->doc->toolSettings.polyF, &ScApp->doc->toolSettings.polyS, &ScApp->doc->toolSettings.polyR);
dia->getValues(&ScMW->doc->toolSettings.polyC, &ScMW->doc->toolSettings.polyFd, &ScMW->doc->toolSettings.polyF, &ScMW->doc->toolSettings.polyS, &ScMW->doc->toolSettings.polyR);
delete dia;
}
 
114,12 → 114,12
const QPixmap* newIcon = Rechteck->find(s)->pixmap();
QImage newShapeIcon = Rechteck->find(s)->pixmap()->convertToImage();
newShapeIcon.smoothScale(16,16);
ScApp->scrActions["toolsInsertShape"]->setIconSet(QIconSet(newShapeIcon, *newIcon));
ScMW->scrActions["toolsInsertShape"]->setIconSet(QIconSet(newShapeIcon, *newIcon));
insertShapeButtonMenu->hide();
SubMode = s;
ValCount = c;
ShapeVals = vals;
ScApp->scrActions["toolsInsertShape"]->setOn(true);
ScMW->scrActions["toolsInsertShape"]->setOn(true);
}
 
void WerkToolB::languageChange()
/branches/Version13x/Scribus/scribus/undogui.cpp
75,16 → 75,16
redoButton->setAutoRaise(true);
*/
//Scribus action based toolbar button construction
ScApp->scrActions["editUndoAction"]->addTo(parent);
ScApp->scrActions["editRedoAction"]->addTo(parent);
ScApp->scrMenuMgr->createMenu("undoButtonMenu", "undoButtonMenu");
ScApp->scrMenuMgr->createMenu("redoButtonMenu", "redoButtonMenu");
undoMenu=ScApp->scrMenuMgr->getLocalPopupMenu("undoButtonMenu");
redoMenu=ScApp->scrMenuMgr->getLocalPopupMenu("redoButtonMenu");
ScApp->scrMenuMgr->addMenuToWidgetOfAction("undoButtonMenu", ScApp->scrActions["editUndoAction"]);
ScApp->scrMenuMgr->addMenuToWidgetOfAction("redoButtonMenu", ScApp->scrActions["editRedoAction"]);
QToolButton *undoButton = dynamic_cast<QToolButton*>(ScApp->scrActions["editUndoAction"]->getWidgetAddedTo());
QToolButton *redoButton = dynamic_cast<QToolButton*>(ScApp->scrActions["editRedoAction"]->getWidgetAddedTo());
ScMW->scrActions["editUndoAction"]->addTo(parent);
ScMW->scrActions["editRedoAction"]->addTo(parent);
ScMW->scrMenuMgr->createMenu("undoButtonMenu", "undoButtonMenu");
ScMW->scrMenuMgr->createMenu("redoButtonMenu", "redoButtonMenu");
undoMenu=ScMW->scrMenuMgr->getLocalPopupMenu("undoButtonMenu");
redoMenu=ScMW->scrMenuMgr->getLocalPopupMenu("redoButtonMenu");
ScMW->scrMenuMgr->addMenuToWidgetOfAction("undoButtonMenu", ScMW->scrActions["editUndoAction"]);
ScMW->scrMenuMgr->addMenuToWidgetOfAction("redoButtonMenu", ScMW->scrActions["editRedoAction"]);
QToolButton *undoButton = dynamic_cast<QToolButton*>(ScMW->scrActions["editUndoAction"]->getWidgetAddedTo());
QToolButton *redoButton = dynamic_cast<QToolButton*>(ScMW->scrActions["editRedoAction"]->getWidgetAddedTo());
if (undoButton && redoButton)
{
undoButton->setPopupDelay(0);
91,9 → 91,9
redoButton->setPopupDelay(0);
}
ScApp->scrActions["editCut"]->addTo(parent);
ScApp->scrActions["editCopy"]->addTo(parent);
ScApp->scrActions["editPaste"]->addTo(parent);
ScMW->scrActions["editCut"]->addTo(parent);
ScMW->scrActions["editCopy"]->addTo(parent);
ScMW->scrActions["editPaste"]->addTo(parent);
/* BnF Undo buttons
connect(undoButton, SIGNAL(clicked()), this, SLOT(undoClicked()));
108,13 → 108,13
undoMenu->clear();
undoItems.clear();
//Scribus disable
ScApp->scrActions["editUndoAction"]->setEnabled(false);
ScMW->scrActions["editUndoAction"]->setEnabled(false);
// BnF disable
//undoButton->setEnabled(false);
redoMenu->clear();
redoItems.clear();
//Scribus disable;
ScApp->scrActions["editRedoAction"]->setEnabled(false);
ScMW->scrActions["editRedoAction"]->setEnabled(false);
// BnF disable
//redoButton->setEnabled(false);
}
174,7 → 174,7
//BnF
//undoButton->setEnabled(undoMenu->count() != 0);
//SCribus
ScApp->scrActions["editUndoAction"]->setEnabled(undoMenu->count() != 0);
ScMW->scrActions["editUndoAction"]->setEnabled(undoMenu->count() != 0);
}
 
void UndoWidget::updateRedoMenu()
185,7 → 185,7
//BnF
//redoButton->setEnabled(redoMenu->count() != 0);
//Scribus
ScApp->scrActions["editRedoAction"]->setEnabled(redoMenu->count() != 0);
ScMW->scrActions["editRedoAction"]->setEnabled(redoMenu->count() != 0);
}
 
void UndoWidget::updateUndo(int steps)
254,7 → 254,7
 
updateFromPrefs();
languageChange();
connect(ScApp, SIGNAL(prefsChanged()), this, SLOT(updateFromPrefs()));
connect(ScMW, SIGNAL(prefsChanged()), this, SLOT(updateFromPrefs()));
connect(undoButton, SIGNAL(clicked()), this, SLOT(undoClicked()));
connect(redoButton, SIGNAL(clicked()), this, SLOT(redoClicked()));
connect(undoList, SIGNAL(highlighted(int)), this, SLOT(undoListClicked(int)));
261,10 → 261,10
connect(undoList, SIGNAL(onItem(QListBoxItem*)), this, SLOT(showToolTip(QListBoxItem*)));
connect(undoList, SIGNAL(onViewport()), this, SLOT(removeToolTip()));
connect(objectBox, SIGNAL(toggled(bool)), this, SLOT(objectCheckBoxClicked(bool)));
connect(ScApp->scrActions["editActionMode"], SIGNAL(toggled(bool)),
connect(ScMW->scrActions["editActionMode"], SIGNAL(toggled(bool)),
objectBox, SLOT(setChecked(bool)));
connect(objectBox, SIGNAL(toggled(bool)),
ScApp->scrActions["editActionMode"], SLOT(setOn(bool)));
ScMW->scrActions["editActionMode"], SLOT(setOn(bool)));
}
 
void UndoPalette::clear()
277,8 → 277,8
 
void UndoPalette::updateFromPrefs()
{
undoButton->setAccel(ScApp->scrActions["editUndoAction"]->accel());
redoButton->setAccel(ScApp->scrActions["editRedoAction"]->accel());
undoButton->setAccel(ScMW->scrActions["editUndoAction"]->accel());
redoButton->setAccel(ScMW->scrActions["editRedoAction"]->accel());
}
 
void UndoPalette::languageChange()
/branches/Version13x/Scribus/scribus/hyphenator.h
7,7 → 7,7
#include "scribusapi.h"
#include "hyphen.h"
class ScribusDoc;
class ScribusApp;
class ScribusMainWindow;
class PageItem;
 
/*!
/branches/Version13x/Scribus/scribus/newfile.cpp
293,10 → 293,10
recentDocLayout = new QVBoxLayout(recentDocFrame, 5, 5, "recentDocLayout");
recentDocList = new QListBox(recentDocFrame, "recentDocList");
recentDocLayout->addWidget(recentDocList);
uint max = QMIN(prefsManager->appPrefs.RecentDCount, ScApp->RecentDocs.count());
uint max = QMIN(prefsManager->appPrefs.RecentDCount, ScMW->RecentDocs.count());
for (uint m = 0; m < max; ++m)
{
recentDocList->insertItem(ScApp->RecentDocs[m]);
recentDocList->insertItem(ScMW->RecentDocs[m]);
}
}
 
465,7 → 465,7
 
void NewDoc::recentDocList_doubleClicked(QListBoxItem * /*item*/)
{
/* Yep. There is nothing to solve. ScribusApp handles all
/* Yep. There is nothing to solve. ScribusMainWindow handles all
openings etc. It's Franz's programming style ;) */
ExitOK();
}
/branches/Version13x/Scribus/scribus/search.cpp
338,12 → 338,12
void SearchReplace::slotSearch()
{
if (SMode)
ScApp->view->slotDoCurs(false);
ScMW->view->slotDoCurs(false);
slotDoSearch();
if (SMode)
{
ScApp->view->slotDoCurs(true);
ScApp->view->RefreshItem(Item);
ScMW->view->slotDoCurs(true);
ScMW->view->RefreshItem(Item);
}
}
 
506,7 → 506,7
if ((!found) || (a == Item->itemText.count()))
{
Doc->DoDrawing = true;
ScApp->view->RefreshItem(Item);
ScMW->view->RefreshItem(Item);
DoReplace->setEnabled(false);
AllReplace->setEnabled(false);
QMessageBox::information(this, tr("Search/Replace"), tr("Search finished"), CommonStrings::tr_OK);
516,21 → 516,21
}
else
{
if (ScApp->CurrStED != NULL)
if (ScMW->CurrStED != NULL)
{
int p, i;
ScApp->CurrStED->Editor->getCursorPosition(&p, &i);
ScMW->CurrStED->Editor->getCursorPosition(&p, &i);
uint inde = 0;
int as = i;
uint fpa = p;
int fch = i;
found = false;
if (ScApp->CurrStED->Editor->StyledText.count() != 0)
if (ScMW->CurrStED->Editor->StyledText.count() != 0)
{
for (uint pa = p; pa < ScApp->CurrStED->Editor->StyledText.count(); ++pa)
for (uint pa = p; pa < ScMW->CurrStED->Editor->StyledText.count(); ++pa)
{
SEditor::ChList *chars;
chars = ScApp->CurrStED->Editor->StyledText.at(pa);
chars = ScMW->CurrStED->Editor->StyledText.at(pa);
if (SText->isChecked())
{
if (Word->isChecked())
537,16 → 537,16
{
QRegExp rx( "(\\b"+sText+"\\b)" );
if (CaseIgnore->isChecked())
as = rx.search( ScApp->CurrStED->Editor->text(pa).lower(), i );
as = rx.search( ScMW->CurrStED->Editor->text(pa).lower(), i );
else
as = rx.search( ScApp->CurrStED->Editor->text(pa), i );
as = rx.search( ScMW->CurrStED->Editor->text(pa), i );
}
else
{
if (CaseIgnore->isChecked())
as = ScApp->CurrStED->Editor->text(pa).lower().find(sText, i);
as = ScMW->CurrStED->Editor->text(pa).lower().find(sText, i);
else
as = ScApp->CurrStED->Editor->text(pa).find(sText, i);
as = ScMW->CurrStED->Editor->text(pa).find(sText, i);
}
if (as != -1)
{
625,9 → 625,9
}
if (found)
{
ScApp->CurrStED->Editor->setSelection(fpa, fch, fpa, fch+inde);
ScApp->CurrStED->updateProps(fpa, fch);
ScApp->CurrStED->Editor->setCursorPosition(fpa, fch+inde);
ScMW->CurrStED->Editor->setSelection(fpa, fch, fpa, fch+inde);
ScMW->CurrStED->updateProps(fpa, fch);
ScMW->CurrStED->Editor->setCursorPosition(fpa, fch+inde);
if (rep)
{
DoReplace->setEnabled(true);
638,8 → 638,8
{
QMessageBox::information(this, tr("Search/Replace"), tr("Search finished"), CommonStrings::tr_OK);
NotFound = false;
ScApp->CurrStED->Editor->removeSelection();
ScApp->CurrStED->Editor->setCursorPosition(0, 0);
ScMW->CurrStED->Editor->removeSelection();
ScMW->CurrStED->Editor->setCursorPosition(0, 0);
}
}
}
649,12 → 649,12
void SearchReplace::slotReplace()
{
if (SMode)
ScApp->view->slotDoCurs(false);
ScMW->view->slotDoCurs(false);
slotDoReplace();
if (SMode)
{
ScApp->view->slotDoCurs(true);
ScApp->view->RefreshItem(Item);
ScMW->view->slotDoCurs(true);
ScMW->view->RefreshItem(Item);
}
}
 
747,17 → 747,17
if (RStyle->isChecked())
emit NewAbs(RStyleVal->currentItem());
if (RFill->isChecked())
ScApp->view->ItemTextBrush(RFillVal->currentText());
ScMW->view->ItemTextBrush(RFillVal->currentText());
if (RFillS->isChecked())
ScApp->view->ItemTextBrushS(RFillSVal->getValue());
ScMW->view->ItemTextBrushS(RFillSVal->getValue());
if (RStroke->isChecked())
ScApp->view->ItemTextPen(RStrokeVal->currentText());
ScMW->view->ItemTextPen(RStrokeVal->currentText());
if (RStrokeS->isChecked())
ScApp->view->ItemTextPenS(RStrokeSVal->getValue());
ScMW->view->ItemTextPenS(RStrokeSVal->getValue());
if (RFont->isChecked())
emit NewFont(RFontVal->currentText());
if (RSize->isChecked())
ScApp->view->chFSize(qRound(RSizeVal->value() * 10.0));
ScMW->view->chFSize(qRound(RSizeVal->value() * 10.0));
if (REffect->isChecked())
{
int s = REffVal->getStyle();
779,36 → 779,36
}
else
{
if (ScApp->CurrStED != NULL)
if (ScMW->CurrStED != NULL)
{
if (RStyle->isChecked())
ScApp->CurrStED->newAlign(RStyleVal->currentItem());
ScMW->CurrStED->newAlign(RStyleVal->currentItem());
if (RFill->isChecked())
ScApp->CurrStED->newTxFill(RFillVal->currentItem(), -1);
ScMW->CurrStED->newTxFill(RFillVal->currentItem(), -1);
if (RFillS->isChecked())
ScApp->CurrStED->newTxFill(-1, RFillSVal->getValue());
ScMW->CurrStED->newTxFill(-1, RFillSVal->getValue());
if (RStroke->isChecked())
ScApp->CurrStED->newTxStroke(RStrokeVal->currentItem(), -1);
ScMW->CurrStED->newTxStroke(RStrokeVal->currentItem(), -1);
if (RStrokeS->isChecked())
ScApp->CurrStED->newTxStroke(-1, RStrokeSVal->getValue());
ScMW->CurrStED->newTxStroke(-1, RStrokeSVal->getValue());
if (RFont->isChecked())
ScApp->CurrStED->newTxFont(RFontVal->currentText());
ScMW->CurrStED->newTxFont(RFontVal->currentText());
if (RSize->isChecked())
ScApp->CurrStED->newTxSize(RSizeVal->value());
ScMW->CurrStED->newTxSize(RSizeVal->value());
if (REffect->isChecked())
ScApp->CurrStED->newTxStyle(REffVal->getStyle());
ScMW->CurrStED->newTxStyle(REffVal->getStyle());
if (RText->isChecked())
{
disconnect(ScApp->CurrStED->Editor, SIGNAL(cursorPositionChanged(int, int)), ScApp->CurrStED, SLOT(updateProps(int, int)));
disconnect(ScMW->CurrStED->Editor, SIGNAL(cursorPositionChanged(int, int)), ScMW->CurrStED, SLOT(updateProps(int, int)));
int PStart, PEnd, SelStart, SelEnd;
ScApp->CurrStED->Editor->getSelection(&PStart, &SelStart, &PEnd, &SelEnd);
ScApp->CurrStED->Editor->insChars(RTextVal->text());
ScApp->CurrStED->Editor->setSelection(PStart, SelStart, PEnd, SelEnd);
ScApp->CurrStED->Editor->removeSelectedText();
ScApp->CurrStED->Editor->setStyle(ScApp->CurrStED->Editor->CurrentStyle);
ScApp->CurrStED->Editor->insert(RTextVal->text());
connect(ScApp->CurrStED->Editor, SIGNAL(cursorPositionChanged(int, int)), ScApp->CurrStED, SLOT(updateProps(int, int)));
ScApp->CurrStED->newAlign(ScApp->CurrStED->Editor->currentParaStyle);
ScMW->CurrStED->Editor->getSelection(&PStart, &SelStart, &PEnd, &SelEnd);
ScMW->CurrStED->Editor->insChars(RTextVal->text());
ScMW->CurrStED->Editor->setSelection(PStart, SelStart, PEnd, SelEnd);
ScMW->CurrStED->Editor->removeSelectedText();
ScMW->CurrStED->Editor->setStyle(ScMW->CurrStED->Editor->CurrentStyle);
ScMW->CurrStED->Editor->insert(RTextVal->text());
connect(ScMW->CurrStED->Editor, SIGNAL(cursorPositionChanged(int, int)), ScMW->CurrStED, SLOT(updateProps(int, int)));
ScMW->CurrStED->newAlign(ScMW->CurrStED->Editor->currentParaStyle);
}
}
}
821,7 → 821,7
{
if (SMode)
{
ScApp->view->slotDoCurs(false);
ScMW->view->slotDoCurs(false);
Doc->DoDrawing = false;
}
do
833,8 → 833,8
if (SMode)
{
Doc->DoDrawing = true;
ScApp->view->slotDoCurs(true);
ScApp->view->RefreshItem(Item);
ScMW->view->slotDoCurs(true);
ScMW->view->RefreshItem(Item);
}
}
 
/branches/Version13x/Scribus/scribus/scplugin.h
10,7 → 10,7
#include "scribusapi.h"
 
class QWidget;
class ScribusApp;
class ScribusMainWindow;
class DeferredTask;
class PrefsPanel;
 
/branches/Version13x/Scribus/scribus/tree.h
21,7 → 21,7
class QGridLayout;
class QListView;
class QListViewItem;
class ScribusApp;
class ScribusMainWindow;
class ScribusDoc;
class PageItem;
 
30,7 → 30,7
Q_OBJECT
 
public:
Tree( QWidget* parent, ScribusApp* scApp );
Tree( QWidget* parent, ScribusMainWindow* scApp );
//void keyPressEvent(QKeyEvent *k);
//void closeEvent(QCloseEvent *ce);
void resizeEvent(QResizeEvent *r);
90,7 → 90,7
QMap<QString, QListViewItem*> masterPageMapRev;
QListViewItem* freeObjects;
QListViewItem* rootObject;
ScribusApp* ScApp;
ScribusMainWindow* ScMW;
QPixmap imageIcon;
QPixmap textIcon;
QPixmap lineIcon;
/branches/Version13x/Scribus/scribus/page.cpp
47,7 → 47,7
{
m_pageNr = pageNr;
if (PageNam.isEmpty())
setUName(QString(QObject::tr("Page") + " %1").arg(ScApp->doc->FirstPnum + m_pageNr));
setUName(QString(QObject::tr("Page") + " %1").arg(ScMW->doc->FirstPnum + m_pageNr));
else
setUName(PageNam);
}
278,21 → 278,21
PageItem *ite = state->getItem();
if (isUndo)
{
ScApp->view->Deselect();
ScApp->view->SelectItem(ite, false);
ScApp->view->DeleteItem();
ScApp->view->Deselect();
ScMW->view->Deselect();
ScMW->view->SelectItem(ite, false);
ScMW->view->DeleteItem();
ScMW->view->Deselect();
}
else
{
ScApp->doc->Items->append(ite);
ScMW->doc->Items->append(ite);
/*
if (ScApp->doc->masterPageMode())
ScApp->doc->MasterItems = ScApp->doc->Items;
if (ScMW->doc->masterPageMode())
ScMW->doc->MasterItems = ScMW->doc->Items;
else
ScApp->doc->DocItems = ScApp->doc->Items;
ScMW->doc->DocItems = ScMW->doc->Items;
*/
ite->ItemNr = ScApp->doc->Items->count()-1;
ite->ItemNr = ScMW->doc->Items->count()-1;
}
}
 
303,21 → 303,21
PageItem *ite = state->getItem();
if (isUndo)
{
ScApp->doc->Items->append(ite);
ScMW->doc->Items->append(ite);
/*
if (ScApp->doc->masterPageMode())
ScApp->doc->MasterItems = ScApp->doc->Items;
if (ScMW->doc->masterPageMode())
ScMW->doc->MasterItems = ScMW->doc->Items;
else
ScApp->doc->DocItems = ScApp->doc->Items;
ScMW->doc->DocItems = ScMW->doc->Items;
*/
ite->ItemNr = ScApp->doc->Items->count()-1;
ite->ItemNr = ScMW->doc->Items->count()-1;
}
else
{
ScApp->view->Deselect();
ScApp->view->SelectItem(ite, false);
ScApp->view->DeleteItem();
ScApp->view->Deselect();
ScMW->view->Deselect();
ScMW->view->SelectItem(ite, false);
ScMW->view->DeleteItem();
ScMW->view->Deselect();
}
}
 
330,23 → 330,23
PageItem *newItem=state->getItem().second;
if (isUndo)
{
ScApp->doc->Items->take(newItem->ItemNr);
ScApp->doc->Items->append(oldItem);
oldItem->ItemNr = ScApp->doc->Items->count()-1;
ScMW->doc->Items->take(newItem->ItemNr);
ScMW->doc->Items->append(oldItem);
oldItem->ItemNr = ScMW->doc->Items->count()-1;
oldItem->UpdatePolyClip();
ScApp->view->AdjustItemSize(oldItem);
ScMW->view->AdjustItemSize(oldItem);
}
else
{
ScApp->doc->Items->take(oldItem->ItemNr);
ScApp->doc->Items->append(newItem);
newItem->ItemNr = ScApp->doc->Items->count()-1;
ScMW->doc->Items->take(oldItem->ItemNr);
ScMW->doc->Items->append(newItem);
newItem->ItemNr = ScMW->doc->Items->count()-1;
}
/*
if (ScApp->doc->masterPageMode())
ScApp->doc->MasterItems = ScApp->doc->Items;
if (ScMW->doc->masterPageMode())
ScMW->doc->MasterItems = ScMW->doc->Items;
else
ScApp->doc->DocItems = ScApp->doc->Items;
ScMW->doc->DocItems = ScMW->doc->Items;
*/
}
 
/branches/Version13x/Scribus/scribus/tabpdfoptions.cpp
633,7 → 633,7
#ifdef HAVE_CMS
 
QString tp = Optionen->SolidProf;
if (!ScApp->InputProfiles.contains(tp))
if (!ScMW->InputProfiles.contains(tp))
{
if (vie != 0)
tp = vie->Doc->CMSSettings.DefaultSolidColorProfile;
641,8 → 641,8
tp = PrefsManager::instance()->appPrefs.DCMSset.DefaultSolidColorProfile;
}
ProfilesL::Iterator itp;
ProfilesL::Iterator itpend=ScApp->InputProfiles.end();
for (itp = ScApp->InputProfiles.begin(); itp != itpend; ++itp)
ProfilesL::Iterator itpend=ScMW->InputProfiles.end();
for (itp = ScMW->InputProfiles.begin(); itp != itpend; ++itp)
{
SolidPr->insertItem(itp.key());
if (itp.key() == tp)
654,7 → 654,7
if ((CMSuse) && (CMSavail))
IntendS->setCurrentItem(Optionen->Intent);
QString tp1 = Optionen->ImageProf;
if (!ScApp->InputProfiles.contains(tp1))
if (!ScMW->InputProfiles.contains(tp1))
{
if (vie != 0)
tp1 = vie->Doc->CMSSettings.DefaultSolidColorProfile;
662,8 → 662,8
tp1 = PrefsManager::instance()->appPrefs.DCMSset.DefaultSolidColorProfile;
}
ProfilesL::Iterator itp2;
ProfilesL::Iterator itp2end=ScApp->InputProfiles.end();
for (itp2 = ScApp->InputProfiles.begin(); itp2 != itp2end; ++itp2)
ProfilesL::Iterator itp2end=ScMW->InputProfiles.end();
for (itp2 = ScMW->InputProfiles.begin(); itp2 != itp2end; ++itp2)
{
ImageP->insertItem(itp2.key());
if (itp2.key() == tp1)
1052,7 → 1052,7
{
#ifdef HAVE_CMS
QString tp = Opts->SolidProf;
if (!ScApp->InputProfiles.contains(tp))
if (!ScMW->InputProfiles.contains(tp))
{
if (view != 0)
tp = view->Doc->CMSSettings.DefaultSolidColorProfile;
1061,8 → 1061,8
}
SolidPr->clear();
ProfilesL::Iterator itp;
ProfilesL::Iterator itpend=ScApp->InputProfiles.end();
for (itp = ScApp->InputProfiles.begin(); itp != itpend; ++itp)
ProfilesL::Iterator itpend=ScMW->InputProfiles.end();
for (itp = ScMW->InputProfiles.begin(); itp != itpend; ++itp)
{
SolidPr->insertItem(itp.key());
if (itp.key() == tp)
1074,7 → 1074,7
if (cms)
IntendS->setCurrentItem(Opts->Intent);
QString tp1 = Opts->ImageProf;
if (!ScApp->InputProfiles.contains(tp1))
if (!ScMW->InputProfiles.contains(tp1))
{
if (view != 0)
tp1 = view->Doc->CMSSettings.DefaultSolidColorProfile;
1083,8 → 1083,8
}
ImageP->clear();
ProfilesL::Iterator itp2;
ProfilesL::Iterator itp2end=ScApp->InputProfiles.end();
for (itp2 = ScApp->InputProfiles.begin(); itp2 != itp2end; ++itp2)
ProfilesL::Iterator itp2end=ScMW->InputProfiles.end();
for (itp2 = ScMW->InputProfiles.begin(); itp2 != itp2end; ++itp2)
{
ImageP->insertItem(itp2.key());
if (itp2.key() == tp1)
/branches/Version13x/Scribus/scribus/reformdoc.cpp
61,7 → 61,7
{
einheit = doc->unitIndex();
currDoc = doc;
ScApp = (ScribusApp*)parent;
ScMW = (ScribusMainWindow*)parent;
unitRatio = doc->unitRatio();
QString ein = unitGetSuffixFromIndex(einheit);
decimals = unitGetDecimalsFromIndex(einheit);
366,15 → 366,15
tabTools = new TabTools( prefsWidgets, &doc->toolSettings, einheit, doc);
addItem( tr("Tools"), loadIcon("tools.png"), tabTools);
 
tabHyphenator = new HySettings(prefsWidgets, &ScApp->LangTransl);
tabHyphenator = new HySettings(prefsWidgets, &ScMW->LangTransl);
tabHyphenator->verbose->setChecked(!doc->docHyphenator->Automatic);
tabHyphenator->input->setChecked(doc->docHyphenator->AutoCheck);
tabHyphenator->language->setCurrentText(ScApp->LangTransl[doc->docHyphenator->Language]);
tabHyphenator->language->setCurrentText(ScMW->LangTransl[doc->docHyphenator->Language]);
tabHyphenator->wordLen->setValue(doc->docHyphenator->MinWordLen);
tabHyphenator->maxCount->setValue(doc->docHyphenator->HyCount);
addItem( tr("Hyphenator"), loadIcon("hyphenate.png"), tabHyphenator);
 
tabFonts = new FontPrefs( prefsWidgets, PrefsManager::instance()->appPrefs.AvailFonts, true, ScApp->PrefsPfad, doc);
tabFonts = new FontPrefs( prefsWidgets, PrefsManager::instance()->appPrefs.AvailFonts, true, ScMW->PrefsPfad, doc);
addItem( tr("Fonts"), loadIcon("font.png"), tabFonts);
 
tabDocChecker = new TabCheckDoc( prefsWidgets, doc->checkerProfiles, doc->curCheckProfile);
381,7 → 381,7
addItem( tr("Preflight Verifier"), loadIcon("checkdoc.png"), tabDocChecker);
 
tabPDF = new TabPDFOptions( prefsWidgets, &doc->PDF_Options, PrefsManager::instance()->appPrefs.AvailFonts,
&ScApp->PDFXProfiles, doc->UsedFonts, doc->PDF_Options.PresentVals,
&ScMW->PDFXProfiles, doc->UsedFonts, doc->PDF_Options.PresentVals,
einheit, doc->pageHeight, doc->pageWidth, 0 );
addItem( tr("PDF Export"), loadIcon("acroread.png"), tabPDF);
 
403,7 → 403,7
int cmsTab = 0;
if (CMSavail)
{
tabColorManagement = new CMSPrefs(prefsWidgets, &doc->CMSSettings, &ScApp->InputProfiles, &ScApp->InputProfilesCMYK, &ScApp->PrinterProfiles, &ScApp->MonitorProfiles);
tabColorManagement = new CMSPrefs(prefsWidgets, &doc->CMSSettings, &ScMW->InputProfiles, &ScMW->InputProfilesCMYK, &ScMW->PrinterProfiles, &ScMW->MonitorProfiles);
cmsTab = addItem( tr("Color Management"), loadIcon("blend.png"), tabColorManagement);
}
 
487,7 → 487,7
{
tabHyphenator->verbose->setChecked(!currDoc->docHyphenator->Automatic);
tabHyphenator->input->setChecked(currDoc->docHyphenator->AutoCheck);
tabHyphenator->language->setCurrentText(ScApp->LangTransl[currDoc->docHyphenator->Language]);
tabHyphenator->language->setCurrentText(ScMW->LangTransl[currDoc->docHyphenator->Language]);
tabHyphenator->wordLen->setValue(currDoc->docHyphenator->MinWordLen);
tabHyphenator->maxCount->setValue(currDoc->docHyphenator->HyCount);
}
818,16 → 818,16
break;
}
// TODO fix these tr("None") things
if (currDoc->toolSettings.dStrokeText == ScApp->noneString)
if (currDoc->toolSettings.dStrokeText == ScMW->noneString)
currDoc->toolSettings.dStrokeText = "None";
currDoc->toolSettings.dPenText = tabTools->colorComboText->currentText();
if (currDoc->toolSettings.dPenText == ScApp->noneString)
if (currDoc->toolSettings.dPenText == ScMW->noneString)
currDoc->toolSettings.dPenText = "None";
currDoc->toolSettings.dTextBackGround = tabTools->colorComboTextBackground->currentText();
if (currDoc->toolSettings.dTextBackGround == ScApp->noneString)
if (currDoc->toolSettings.dTextBackGround == ScMW->noneString)
currDoc->toolSettings.dTextBackGround = "None";
currDoc->toolSettings.dTextLineColor = tabTools->colorComboTextLine->currentText();
if (currDoc->toolSettings.dTextLineColor == ScApp->noneString)
if (currDoc->toolSettings.dTextLineColor == ScMW->noneString)
currDoc->toolSettings.dTextLineColor = "None";
currDoc->toolSettings.dTextBackGroundShade = tabTools->shadingTextBack->value();
currDoc->toolSettings.dTextLineShade = tabTools->shadingTextLine->value();
837,10 → 837,10
currDoc->toolSettings.dGap = tabTools->gapText->value() / currDoc->unitRatio();
currDoc->toolSettings.dTabWidth = tabTools->gapTab->value() / currDoc->unitRatio();
currDoc->toolSettings.dPen = tabTools->colorComboLineShape->currentText();
if (currDoc->toolSettings.dPen == ScApp->noneString)
if (currDoc->toolSettings.dPen == ScMW->noneString)
currDoc->toolSettings.dPen = "None";
currDoc->toolSettings.dBrush = tabTools->comboFillShape->currentText();
if (currDoc->toolSettings.dBrush == ScApp->noneString)
if (currDoc->toolSettings.dBrush == ScMW->noneString)
currDoc->toolSettings.dBrush = "None";
currDoc->toolSettings.dShade = tabTools->shadingFillShape->value();
currDoc->toolSettings.dShade2 = tabTools->shadingLineShape->value();
869,7 → 869,7
currDoc->toolSettings.magMax = tabTools->maximumZoom->value();
currDoc->toolSettings.magStep = tabTools->zoomStep->value();
currDoc->toolSettings.dPenLine = tabTools->colorComboLine->currentText();
if (currDoc->toolSettings.dPenLine == ScApp->noneString)
if (currDoc->toolSettings.dPenLine == ScMW->noneString)
currDoc->toolSettings.dPenLine = "None";
currDoc->toolSettings.dShadeLine = tabTools->shadingLine->value();
switch (tabTools->comboStyleLine->currentItem())
892,7 → 892,7
}
currDoc->toolSettings.dWidthLine = tabTools->lineWidthLine->value();
currDoc->toolSettings.dBrushPict = tabTools->comboFillImage->currentText();
if (currDoc->toolSettings.dBrushPict == ScApp->noneString)
if (currDoc->toolSettings.dBrushPict == ScMW->noneString)
currDoc->toolSettings.dBrushPict = "None";
currDoc->toolSettings.shadePict = tabTools->shadingFillImage->value();
currDoc->toolSettings.scaleX = static_cast<double>(tabTools->scalingHorizontal->value()) / 100.0;
926,7 → 926,7
currDoc->autoSaveTimer->stop();
currDoc->autoSaveTimer->start(currDoc->AutoSaveTime);
}
currDoc->docHyphenator->slotNewDict(ScApp->GetLang(tabHyphenator->language->currentText()));
currDoc->docHyphenator->slotNewDict(ScMW->GetLang(tabHyphenator->language->currentText()));
currDoc->docHyphenator->slotNewSettings(tabHyphenator->wordLen->value(),
!tabHyphenator->verbose->isChecked(),
tabHyphenator->input->isChecked(),
937,10 → 937,10
tabColorManagement->setValues();
if (tabColorManagement->changed)
{
ScApp->mainWindowStatusLabel->setText( tr("Adjusting Colors"));
ScApp->mainWindowProgressBar->reset();
ScMW->mainWindowStatusLabel->setText( tr("Adjusting Colors"));
ScMW->mainWindowProgressBar->reset();
int cc = currDoc->PageColors.count() + currDoc->Items->count();
ScApp->mainWindowProgressBar->setTotalSteps(cc);
ScMW->mainWindowProgressBar->setTotalSteps(cc);
#ifdef HAVE_CMS
currDoc->HasCMS = currDoc->CMSSettings.CMSinUse;
currDoc->SoftProofing = currDoc->CMSSettings.SoftProofOn;
958,7 → 958,7
currDoc->CMSSettings.CMSinUse = oldCM;
currDoc->CloseCMSProfiles();
currDoc->CMSSettings.CMSinUse = newCM;
currDoc->OpenCMSProfiles(ScApp->InputProfiles, ScApp->MonitorProfiles, ScApp->PrinterProfiles);
currDoc->OpenCMSProfiles(ScMW->InputProfiles, ScMW->MonitorProfiles, ScMW->PrinterProfiles);
stdProofG = currDoc->stdProof;
stdTransG = currDoc->stdTrans;
stdProofImgG = currDoc->stdProofImg;
987,13 → 987,13
currDoc->PDF_Options.ImageProf = currDoc->CMSSettings.DefaultImageRGBProfile;
currDoc->PDF_Options.PrintProf = currDoc->CMSSettings.DefaultPrinterProfile;
currDoc->PDF_Options.Intent = currDoc->CMSSettings.DefaultIntentMonitor;
ScApp->recalcColors(ScApp->mainWindowProgressBar);
currDoc->RecalcPictures(&ScApp->InputProfiles, &ScApp->InputProfilesCMYK, ScApp->mainWindowProgressBar);
ScMW->recalcColors(ScMW->mainWindowProgressBar);
currDoc->RecalcPictures(&ScMW->InputProfiles, &ScMW->InputProfilesCMYK, ScMW->mainWindowProgressBar);
#endif
ScApp->mainWindowProgressBar->setProgress(cc);
ScMW->mainWindowProgressBar->setProgress(cc);
qApp->setOverrideCursor(QCursor(arrowCursor), true);
ScApp->mainWindowStatusLabel->setText("");
ScApp->mainWindowProgressBar->reset();
ScMW->mainWindowStatusLabel->setText("");
ScMW->mainWindowProgressBar->reset();
}
}
PrefsManager* prefsManager=PrefsManager::instance();
/branches/Version13x/Scribus/scribus/collect4output.cpp
43,7 → 43,7
wdir = dirs->get("collect", prefsDocDir);
else
wdir = dirs->get("collect", ".");
outputDirectory = ScApp->CFileDialog(wdir, tr("Choose a Directory"), "", "", false, false, false, false, true, &compressDoc, &withFonts);
outputDirectory = ScMW->CFileDialog(wdir, tr("Choose a Directory"), "", "", false, false, false, false, true, &compressDoc, &withFonts);
}
if (outputDirectory.isEmpty())
return false;
55,22 → 55,22
{
if (!newDirDialog())
return "";
ScApp->fileWatcher->forceScan();
ScApp->fileWatcher->stop();
ScMW->fileWatcher->forceScan();
ScMW->fileWatcher->stop();
if(outputDirectory.right(1) != "/")
outputDirectory += "/";
dirs->set("collect", outputDirectory.left(outputDirectory.findRev("/",-2)));
ScApp->mainWindowStatusLabel->setText(tr("Collecting..."));
ScMW->mainWindowStatusLabel->setText(tr("Collecting..."));
 
if (!collectDocument())
{
QMessageBox::warning(ScApp, CommonStrings::trWarning, "<qt>" + tr("Cannot collect the file: \n%1").arg(newName) + "</qt>", CommonStrings::tr_OK);
QMessageBox::warning(ScMW, CommonStrings::trWarning, "<qt>" + tr("Cannot collect the file: \n%1").arg(newName) + "</qt>", CommonStrings::tr_OK);
return "";
}
 
if (!collectItems())
{
QMessageBox::warning(ScApp, tr("Warning"), "<qt>" + tr("Cannot collect all files for output for file:\n%1").arg(newName) + "</qt>", CommonStrings::tr_OK);
QMessageBox::warning(ScMW, tr("Warning"), "<qt>" + tr("Cannot collect all files for output for file:\n%1").arg(newName) + "</qt>", CommonStrings::tr_OK);
return "";
}
 
79,14 → 79,14
 
PrefsManager::instance()->setDocumentDir(outputDirectory);
QDir::setCurrent(outputDirectory);
ScApp->updateActiveWindowCaption(newName);
ScMW->updateActiveWindowCaption(newName);
UndoManager::instance()->renameStack(newName);
ScApp->scrActions["fileSave"]->setEnabled(false);
ScApp->scrActions["fileRevert"]->setEnabled(false);
ScApp->updateRecent(newName);
ScApp->mainWindowStatusLabel->setText("");
ScApp->mainWindowProgressBar->reset();
ScApp->fileWatcher->start();
ScMW->scrActions["fileSave"]->setEnabled(false);
ScMW->scrActions["fileRevert"]->setEnabled(false);
ScMW->updateRecent(newName);
ScMW->mainWindowStatusLabel->setText("");
ScMW->mainWindowProgressBar->reset();
ScMW->fileWatcher->start();
collectedFiles.clear();
return newName;
}
100,15 → 100,15
if (!fi.isDir() || !fi.isWritable())
return false;
 
if (ScApp->doc->hasName)
if (ScMW->doc->hasName)
{
QFileInfo fis(ScApp->doc->DocName);
QFileInfo fis(ScMW->doc->DocName);
newName += fis.fileName();
}
else
newName += ScApp->doc->DocName+".sla";
newName += ScMW->doc->DocName+".sla";
 
ScApp->doc->hasName = true;
ScMW->doc->hasName = true;
if (compressDoc)
{
if (!newName.endsWith(".gz"))
120,9 → 120,9
}
}
 
if (!overwrite(ScApp, newName))
if (!overwrite(ScMW, newName))
return false;
if (!ScApp->DoFileSave(newName))
if (!ScMW->DoFileSave(newName))
return false;
return true;
}
136,13 → 136,13
switch (lc)
{
case 0:
counter = ScApp->doc->MasterItems.count();
counter = ScMW->doc->MasterItems.count();
break;
case 1:
counter = ScApp->doc->DocItems.count();
counter = ScMW->doc->DocItems.count();
break;
case 2:
counter = ScApp->doc->FrameItems.count();
counter = ScMW->doc->FrameItems.count();
break;
}
for (uint b = 0; b < counter; ++b)
150,13 → 150,13
switch (lc)
{
case 0:
ite = ScApp->doc->MasterItems.at(b);
ite = ScMW->doc->MasterItems.at(b);
break;
case 1:
ite = ScApp->doc->DocItems.at(b);
ite = ScMW->doc->DocItems.at(b);
break;
case 2:
ite = ScApp->doc->FrameItems.at(b);
ite = ScMW->doc->FrameItems.at(b);
break;
}
if (ite->asImageFrame())
174,10 → 174,10
{
QString oldFile = ofName;
ite->Pfile = collectFile(oldFile, itf.fileName());
if (ScApp->fileWatcherActive())
if (ScMW->fileWatcherActive())
{
ScApp->fileWatcher->removeFile(oldFile);
ScApp->fileWatcher->addFile(ite->Pfile);
ScMW->fileWatcher->removeFile(oldFile);
ScMW->fileWatcher->addFile(ite->Pfile);
}
}
}
193,10 → 193,10
{
QString oldFile = ite->Pfile;
ite->Pfile = collectFile(oldFile, itf.fileName());
if (ScApp->fileWatcherActive())
if (ScMW->fileWatcherActive())
{
ScApp->fileWatcher->removeFile(oldFile);
ScApp->fileWatcher->addFile(ite->Pfile);
ScMW->fileWatcher->removeFile(oldFile);
ScMW->fileWatcher->addFile(ite->Pfile);
}
}
}
223,8 → 223,8
{
PrefsManager *prefsManager = PrefsManager::instance();
QMap<QString,int>::Iterator it3;
QMap<QString,int>::Iterator it3end = ScApp->doc->UsedFonts.end();
for (it3 = ScApp->doc->UsedFonts.begin(); it3 != it3end; ++it3)
QMap<QString,int>::Iterator it3end = ScMW->doc->UsedFonts.end();
for (it3 = ScMW->doc->UsedFonts.begin(); it3 != it3end; ++it3)
{
QFileInfo itf = QFileInfo(prefsManager->appPrefs.AvailFonts[it3.key()]->fontFilePath());
copyFile(prefsManager->appPrefs.AvailFonts[it3.key()]->fontFilePath(), outputDirectory + itf.fileName());
/branches/Version13x/Scribus/scribus/pdflib.cpp
119,7 → 119,7
QPixmap pm;
bool ret = false;
int progresscount=0;
if (PDF_Begin_Doc(fn, &doc->PDF_Options, PrefsManager::instance()->appPrefs.AvailFonts, doc->UsedFonts, ScApp->bookmarkPalette->BView))
if (PDF_Begin_Doc(fn, &doc->PDF_Options, PrefsManager::instance()->appPrefs.AvailFonts, doc->UsedFonts, ScMW->bookmarkPalette->BView))
{
QMap<int, int> pageNsMpa;
for (uint a = 0; a < pageNs.size(); ++a)
152,7 → 152,7
dia2->setProgress(progresscount);
}
if (doc->PDF_Options.Version == PDFOptions::PDFVersion_X3)
PDF_End_Doc(ScApp->PrinterProfiles[doc->PDF_Options.PrintProf], nam, Components);
PDF_End_Doc(ScMW->PrinterProfiles[doc->PDF_Options.PrintProf], nam, Components);
else
PDF_End_Doc();
ret = true;
947,7 → 947,7
ObjCounter++;
QString dataP;
struct ICCD dataD;
loadText(ScApp->InputProfiles[Options->SolidProf], &dataP);
loadText(ScMW->InputProfiles[Options->SolidProf], &dataP);
PutDoc("<<\n");
if ((Options->Compress) && (CompAvail))
{
4400,12 → 4400,12
{
if (img.imgInfo.colorspace == 1)
{
loadText((Embedded ? ScApp->InputProfilesCMYK[Options->ImageProf] : ScApp->InputProfilesCMYK[Profil]), &dataP);
loadText((Embedded ? ScMW->InputProfilesCMYK[Options->ImageProf] : ScMW->InputProfilesCMYK[Profil]), &dataP);
components = 4;
}
else
{
loadText((Embedded ? ScApp->InputProfiles[Options->ImageProf] : ScApp->InputProfiles[Profil]), &dataP);
loadText((Embedded ? ScMW->InputProfiles[Options->ImageProf] : ScMW->InputProfiles[Profil]), &dataP);
components = 3;
}
}
4414,12 → 4414,12
{
if (img.imgInfo.colorspace == 1)
{
loadText((Embedded ? ScApp->InputProfilesCMYK[Options->ImageProf] : ScApp->InputProfilesCMYK[Profil]), &dataP);
loadText((Embedded ? ScMW->InputProfilesCMYK[Options->ImageProf] : ScMW->InputProfilesCMYK[Profil]), &dataP);
components = 4;
}
else
{
loadText((Embedded ? ScApp->InputProfiles[Options->ImageProf] : ScApp->InputProfiles[Profil]), &dataP);
loadText((Embedded ? ScMW->InputProfiles[Options->ImageProf] : ScMW->InputProfiles[Profil]), &dataP);
components = 3;
}
}
/branches/Version13x/Scribus/scribus/scribusdoc.cpp
164,7 → 164,7
docToCSetups(prefsData.defaultToCSetups),
// sections
symReturn(), symNewLine(), symTab(), symNonBreak(), symNewCol(), symNewFrame(),
docHyphenator(new Hyphenator(ScApp, this)), // MUST be constructed late
docHyphenator(new Hyphenator(ScMW, this)), // MUST be constructed late
_itemCreationTransactionStarted(false)
{
Q_CHECK_PTR(selection);
329,7 → 329,7
if ((CMSavail) && (CMSSettings.CMSinUse))
{
#ifdef HAVE_CMS
OpenCMSProfiles(ScApp->InputProfiles, ScApp->MonitorProfiles, ScApp->PrinterProfiles);
OpenCMSProfiles(ScMW->InputProfiles, ScMW->MonitorProfiles, ScMW->PrinterProfiles);
stdProofG = stdProof;
stdTransG = stdTrans;
stdProofImgG = stdProofImg;
657,8 → 657,8
{
if (ScQApp->usingGUI())
{
ScApp->changeLayer(ss->getInt("ACTIVE"));
ScApp->layerPalette->rebuildList();
ScMW->changeLayer(ss->getInt("ACTIVE"));
ScMW->layerPalette->rebuildList();
}
}
}
1053,7 → 1053,7
undoManager->beginTransaction("Layer", Um::IDocument, Um::DeleteLayer, "", Um::IDelete);
 
if (ScQApp->usingGUI())
ScApp->LayerRemove(layerNumber, deleteItems);
ScMW->LayerRemove(layerNumber, deleteItems);
/*
//Layer found, do we want to delete its items too?
if (masterPageMode)
1906,7 → 1906,7
QProgressBar* mainWindowProgressBar=NULL;
if (ScQApp->usingGUI())
{
mainWindowProgressBar=ScApp->mainWindowProgressBar;
mainWindowProgressBar=ScMW->mainWindowProgressBar;
mainWindowProgressBar->reset();
}
ScriXmlDoc *ss = new ScriXmlDoc();
2112,7 → 2112,7
BufferT.Groups.push((*nx));
}
}
ScApp->view->PasteItem(&BufferT, true, true);
ScMW->view->PasteItem(&BufferT, true, true);
PageItem* Neu = Items->at(Items->count()-1);
Neu->OnMasterPage = masterPageName;
Neu->OwnPage=MasterNames[masterPageName];
2281,7 → 2281,7
newItem->SetRectFrame();
//TODO one day hopefully, if(ScQApp->usingGUI())
newItem->setRedrawBounding();
//ScApp->view->setRedrawBounding(newItem);
//ScMW->view->setRedrawBounding(newItem);
newItem->ContourLine = newItem->PoLine.copy();
}
2290,7 → 2290,7
newItem->SetOvalFrame();
//TODO one day hopefully, if(ScQApp->usingGUI())
newItem->setRedrawBounding();
//ScApp->view->setRedrawBounding(newItem);
//ScMW->view->setRedrawBounding(newItem);
newItem->ContourLine = newItem->PoLine.copy();
}
2360,23 → 2360,23
{
if (!reload)
{
if ((ScApp->fileWatcher->files().contains(pageItem->Pfile) != 0) && (pageItem->PicAvail))
ScApp->fileWatcher->removeFile(pageItem->Pfile);
if ((ScMW->fileWatcher->files().contains(pageItem->Pfile) != 0) && (pageItem->PicAvail))
ScMW->fileWatcher->removeFile(pageItem->Pfile);
}
if(!pageItem->loadImage(fn, reload))
return false;
if (!reload)
ScApp->fileWatcher->addFile(pageItem->Pfile);
ScMW->fileWatcher->addFile(pageItem->Pfile);
if (!isLoading())
{
//TODO: Make this a signal again one day
//emit RasterPic(pageItem->isRaster);
ScApp->HaveRaster(pageItem->isRaster);
ScMW->HaveRaster(pageItem->isRaster);
//TODO: Previously commented out.. unsure why, remove later
//emit UpdtObj(PageNr, ItNr);
//TODO: Make this a signal again one day
//emit DocChanged();
ScApp->slotDocCh();
ScMW->slotDocCh();
}
return true;
}
2752,7 → 2752,7
polyLineItem->FrameType = 3;
polyLineItem->setRotation(currItem->rotation());
polyLineItem->SetPolyClip(qRound(QMAX(polyLineItem->Pwidth / 2, 1)));
ScApp->view->AdjustItemSize(polyLineItem);
ScMW->view->AdjustItemSize(polyLineItem);
newItem->setLineColor("None");
newItem->SetRectFrame();
2782,7 → 2782,7
newItem->convertTo(PageItem::PolyLine);
newItem->ClipEdited = true;
newItem->SetPolyClip(qRound(QMAX(newItem->Pwidth / 2, 1)));
ScApp->view->AdjustItemSize(newItem);
ScMW->view->AdjustItemSize(newItem);
break;
case PageItem::PathText:
{
2798,11 → 2798,11
/* if (!Doc->loading)
emit UpdtObj(Doc->currentPage->pageNr(), b->ItemNr); */
//FIXME: Stop using the view here
ScApp->view->AdjustItemSize(newItem);
ScMW->view->AdjustItemSize(newItem);
newItem->UpdatePolyClip();
double dx = secondaryItem->xPos() - newItem->xPos();
double dy = secondaryItem->yPos() - newItem->yPos();
ScApp->view->MoveItem(dx, dy, newItem);
ScMW->view->MoveItem(dx, dy, newItem);
newItem->setRotation(secondaryItem->rotation());
newItem->FrameType = 3;
}
2818,10 → 2818,10
if (newType==PageItem::PathText)
{
//FIXME: Stop using the view here
ScApp->view->SelectItem(secondaryItem);
ScApp->view->DeleteItem();
ScApp->view->updateContents();
ScApp->view->Deselect(true);
ScMW->view->SelectItem(secondaryItem);
ScMW->view->DeleteItem();
ScMW->view->updateContents();
ScMW->view->Deselect(true);
}
//Create the undo action for the new item
if (UndoManager::undoEnabled())
3083,7 → 3083,7
--destLocation;
else if (whereToInsert==2)
destLocation=DocPages.count();
//ScApp->slotNewPage(destLocation);
//ScMW->slotNewPage(destLocation);
currentPage=addPage(destLocation, from->MPageNam);
Page* destination = currentPage; //slotNewPage sets currentPage
destination->setInitialHeight(from->height());
3094,7 → 3094,7
destination->initialMargins.Bottom = from->Margins.Bottom;
destination->initialMargins.Left = from->Margins.Left;
destination->initialMargins.Right = from->Margins.Right;
ScApp->view->reformPages();
ScMW->view->reformPages();
QMap<int,int> TableID;
QPtrList<PageItem> TableItems;
TableID.clear();
3124,11 → 3124,11
Buffer.Groups.push((*nx));
}
}
ScApp->view->PasteItem(&Buffer, true, true);
ScMW->view->PasteItem(&Buffer, true, true);
PageItem* Neu = Items->at(Items->count()-1);
Neu->OnMasterPage = "";
if (itemToCopy->isBookmark)
ScApp->AddBookMark(Neu);
ScMW->AddBookMark(Neu);
if (Neu->isTableItem)
{
TableItems.append(Neu);
3159,7 → 3159,7
ta->BottomLink = 0;
}
}
//ScApp->Apply_MasterPage(from->MPageNam, destination->pageNr(), false);
//ScMW->Apply_MasterPage(from->MPageNam, destination->pageNr(), false);
if (from->YGuides.count() != 0)
{
for (uint y = 0; y < from->YGuides.count(); ++y)
/branches/Version13x/Scribus/scribus/main_win32.cpp
44,7 → 44,7
static QString exceptionDescription(DWORD exceptionCode);
static void defaultCrashHandler(DWORD exceptionCode);
 
ScribusApp SCRIBUS_API *ScApp;
ScribusMainWindow SCRIBUS_API *ScMW;
ScribusQApp SCRIBUS_API *ScQApp;
bool emergencyActivated;
 
195,10 → 195,10
std::cout << (const char*) expMsg << std::endl;
if (ScribusQApp::useGUI)
{
ScApp->closeSplash();
QMessageBox::critical(ScApp, expHdr, expMsg, QObject::tr("&OK"));
ScApp->emergencySave();
ScApp->close();
ScMW->closeSplash();
QMessageBox::critical(ScMW, expHdr, expMsg, QObject::tr("&OK"));
ScMW->emergencySave();
ScMW->close();
}
}
ExitProcess(255);
/branches/Version13x/Scribus/scribus/prefsmanager.cpp
521,7 → 521,7
}
 
/*!
\fn bool ScribusApp::copy12Preferences(const QString prefsLocation)
\fn bool ScribusMainWindow::copy12Preferences(const QString prefsLocation)
\author Craig Bradney
\date Sun 09 Jan 2005
\brief Copy 1.2 prefs XML before loading, and copy rc files we don't yet convert
561,8 → 561,8
retVal=true; // converting from 1.2 prefs
if (ScQApp->usingGUI())
{
ScApp->showSplash(false);
if ( (ScMessageBox::question( ScApp, tr("Migrate Old Scribus Settings?"),
ScMW->showSplash(false);
if ( (ScMessageBox::question( ScMW, tr("Migrate Old Scribus Settings?"),
tr("Scribus has detected existing Scribus 1.2 preferences files.\n"
"Do you want to migrate them to the new Scribus version?"),
QMessageBox::Yes | QMessageBox::Default, QMessageBox::No, QMessageBox::NoButton))==QMessageBox::Yes )
573,7 → 573,7
copyFile(oldPR[i], newPR[i]);
}
}
ScApp->showSplash(true);
ScMW->showSplash(true);
}
}
return retVal;
620,7 → 620,7
}
}
 
ScApp->setDefaultPrinter(appPrefs.PrinterName, appPrefs.PrinterFile, appPrefs.PrinterCommand);
ScMW->setDefaultPrinter(appPrefs.PrinterName, appPrefs.PrinterFile, appPrefs.PrinterCommand);
 
uint max = QMIN(appPrefs.RecentDCount, appPrefs.RecentDocs.count());
for (uint m = 0; m < max; ++m)
628,13 → 628,13
QFileInfo fd(appPrefs.RecentDocs[m]);
if (fd.exists())
{
ScApp->RecentDocs.append(appPrefs.RecentDocs[m]);
ScApp->fileWatcher->addFile(appPrefs.RecentDocs[m]);
ScMW->RecentDocs.append(appPrefs.RecentDocs[m]);
ScMW->fileWatcher->addFile(appPrefs.RecentDocs[m]);
}
}
ScApp->rebuildRecentFileMenu();
ScApp->move(appPrefs.mainWinSettings.xPosition, appPrefs.mainWinSettings.yPosition);
ScApp->resize(appPrefs.mainWinSettings.width, appPrefs.mainWinSettings.height);
ScMW->rebuildRecentFileMenu();
ScMW->move(appPrefs.mainWinSettings.xPosition, appPrefs.mainWinSettings.yPosition);
ScMW->resize(appPrefs.mainWinSettings.width, appPrefs.mainWinSettings.height);
ReadPrefsXML();
if (appPrefs.checkerProfiles.count() == 0)
{
664,20 → 664,20
// The caller is responsible for ensuring we aren't called under those
// conditions.
Q_ASSERT(!emergencyActivated);
appPrefs.mainWinSettings.xPosition = abs(ScApp->pos().x());
appPrefs.mainWinSettings.yPosition = abs(ScApp->pos().y());
appPrefs.mainWinSettings.width = ScApp->size().width();
appPrefs.mainWinSettings.height = ScApp->size().height();
appPrefs.mainToolBarSettings.visible = ScApp->mainToolBarVisible();
appPrefs.pdfToolBarSettings.visible = ScApp->pdfToolBarVisible();
appPrefs.mainWinSettings.xPosition = abs(ScMW->pos().x());
appPrefs.mainWinSettings.yPosition = abs(ScMW->pos().y());
appPrefs.mainWinSettings.width = ScMW->size().width();
appPrefs.mainWinSettings.height = ScMW->size().height();
appPrefs.mainToolBarSettings.visible = ScMW->mainToolBarVisible();
appPrefs.pdfToolBarSettings.visible = ScMW->pdfToolBarVisible();
 
appPrefs.RecentDocs.clear();
uint max = QMIN(appPrefs.RecentDCount, ScApp->RecentDocs.count());
uint max = QMIN(appPrefs.RecentDCount, ScMW->RecentDocs.count());
for (uint m = 0; m < max; ++m)
{
appPrefs.RecentDocs.append(ScApp->RecentDocs[m]);
appPrefs.RecentDocs.append(ScMW->RecentDocs[m]);
}
ScApp->getDefaultPrinter(&appPrefs.PrinterName, &appPrefs.PrinterFile, &appPrefs.PrinterCommand);
ScMW->getDefaultPrinter(&appPrefs.PrinterName, &appPrefs.PrinterFile, &appPrefs.PrinterCommand);
 
SavePrefsXML();
QString realFile;
783,7 → 783,7
Keys ke;
if (!actName.isEmpty())
{
if (ScApp->scrActions[actName])
if (ScMW->scrActions[actName])
{
ke.actionName=actName;
ke.keySequence = keyseq;
1263,30 → 1263,30
if (dc.tagName()=="GUI")
{
appPrefs.GUI = dc.attribute("STILT","Default");
appPrefs.Wheelval = QStoInt(dc.attribute("RAD"));
appPrefs.guidesSettings.grabRad = QStoInt(dc.attribute("GRAB","4"));
appPrefs.docUnitIndex = QStoInt(dc.attribute("UNIT","0"));
appPrefs.AppFontSize = QStoInt(dc.attribute("APF","12"));
appPrefs.PaletteFontSize = QStoInt(dc.attribute("PFS", "10"));
appPrefs.Wheelval = dc.attribute("RAD").toInt();
appPrefs.guidesSettings.grabRad = dc.attribute("GRAB", "4").toInt();
appPrefs.docUnitIndex = dc.attribute("UNIT", "0").toInt();
appPrefs.AppFontSize = dc.attribute("APF", "12").toInt();
appPrefs.PaletteFontSize = dc.attribute("PFS", "10").toInt();
appPrefs.RecentDCount = dc.attribute("RCD","5").toUInt();
appPrefs.DocDir = dc.attribute("DOC","");
appPrefs.ProfileDir = dc.attribute("PROFILES","");
appPrefs.ScriptDir = dc.attribute("SCRIPTS","");
appPrefs.documentTemplatesDir = dc.attribute("TEMPLATES","");
appPrefs.guidesSettings.guidesShown = static_cast<bool>(QStoInt(dc.attribute("SHOWGUIDES","1")));
appPrefs.guidesSettings.framesShown = static_cast<bool>(QStoInt(dc.attribute("FRV","1")));
appPrefs.guidesSettings.marginsShown = static_cast<bool>(QStoInt(dc.attribute("SHOWMARGIN","1")));
appPrefs.guidesSettings.baseShown = static_cast<bool>(QStoInt(dc.attribute("SHOWBASE","1")));
appPrefs.guidesSettings.linkShown = static_cast<bool>(QStoInt(dc.attribute("SHOWLINK","0")));
appPrefs.guidesSettings.showPic = static_cast<bool>(QStoInt(dc.attribute("SHOWPICT","1")));
appPrefs.guidesSettings.showControls = static_cast<bool>(QStoInt(dc.attribute("SHOWControl","0")));
appPrefs.guidesSettings.rulerMode = static_cast<bool>(QStoInt(dc.attribute("rulerMode","1")));
appPrefs.haveStylePreview = static_cast<bool>(QStoInt(dc.attribute("STYLEPREVIEW","1")));
appPrefs.showStartupDialog = static_cast<bool>(QStoInt(dc.attribute("StartUp","1")));
appPrefs.ScratchBottom = QStodouble(dc.attribute("ScratchBottom", "20"));
appPrefs.ScratchLeft = QStodouble(dc.attribute("ScratchLeft", "100"));
appPrefs.ScratchRight = QStodouble(dc.attribute("ScratchRight", "100"));
appPrefs.ScratchTop = QStodouble(dc.attribute("ScratchTop", "20"));
appPrefs.guidesSettings.guidesShown = static_cast<bool>(dc.attribute("SHOWGUIDES", "1").toInt());
appPrefs.guidesSettings.framesShown = static_cast<bool>(dc.attribute("FRV", "1").toInt());
appPrefs.guidesSettings.marginsShown = static_cast<bool>(dc.attribute("SHOWMARGIN", "1").toInt());
appPrefs.guidesSettings.baseShown = static_cast<bool>(dc.attribute("SHOWBASE", "1").toInt());
appPrefs.guidesSettings.linkShown = static_cast<bool>(dc.attribute("SHOWLINK", "0").toInt());
appPrefs.guidesSettings.showPic = static_cast<bool>(dc.attribute("SHOWPICT", "1").toInt());
appPrefs.guidesSettings.showControls = static_cast<bool>(dc.attribute("SHOWControl", "0").toInt());
appPrefs.guidesSettings.rulerMode = static_cast<bool>(dc.attribute("rulerMode", "1").toInt());
appPrefs.haveStylePreview = static_cast<bool>(dc.attribute("STYLEPREVIEW", "1").toInt());
appPrefs.showStartupDialog = static_cast<bool>(dc.attribute("StartUp", "1").toInt());
appPrefs.ScratchBottom = dc.attribute("ScratchBottom", "20").toDouble();
appPrefs.ScratchLeft = dc.attribute("ScratchLeft", "100").toDouble();
appPrefs.ScratchRight = dc.attribute("ScratchRight", "100").toDouble();
appPrefs.ScratchTop = dc.attribute("ScratchTop", "20").toDouble();
if (dc.hasAttribute("STECOLOR"))
appPrefs.STEcolor = QColor(dc.attribute("STECOLOR"));
if (dc.hasAttribute("STEFONT"))
1294,16 → 1294,16
}
if (dc.tagName()=="GRID")
{
appPrefs.guidesSettings.minorGrid = QStodouble(dc.attribute("MINOR"));
appPrefs.guidesSettings.majorGrid = QStodouble(dc.attribute("MAJOR"));
appPrefs.guidesSettings.minorGrid = dc.attribute("MINOR").toDouble();
appPrefs.guidesSettings.majorGrid = dc.attribute("MAJOR").toDouble();
appPrefs.guidesSettings.minorColor = QColor(dc.attribute("MINORC"));
appPrefs.guidesSettings.majorColor = QColor(dc.attribute("MAJORC"));
appPrefs.guidesSettings.before = static_cast<bool>(QStoInt(dc.attribute("BACKG","1")));
appPrefs.guidesSettings.gridShown = static_cast<bool>(QStoInt(dc.attribute("SHOW","0")));
appPrefs.guidesSettings.before = static_cast<bool>(dc.attribute("BACKG", "1").toInt());
appPrefs.guidesSettings.gridShown = static_cast<bool>(dc.attribute("SHOW", "0").toInt());
if (dc.hasAttribute("GuideC"))
appPrefs.guidesSettings.guideColor = QColor(dc.attribute("GuideC"));
if (dc.hasAttribute("GuideZ"))
appPrefs.guidesSettings.guideRad = QStodouble(dc.attribute("GuideZ"));
appPrefs.guidesSettings.guideRad = dc.attribute("GuideZ").toDouble();
if (dc.hasAttribute("BaseC"))
appPrefs.guidesSettings.baseColor = QColor(dc.attribute("BaseC"));
}
1311,35 → 1311,35
{
appPrefs.DpapColor = QColor(dc.attribute("PAGEC"));
appPrefs.guidesSettings.margColor = QColor(dc.attribute("MARGC","#0000ff"));
appPrefs.marginColored = static_cast<bool>(QStoInt(dc.attribute("RANDF","0")));
appPrefs.DisScale = QStodouble(dc.attribute("DScale","1"));
appPrefs.marginColored = static_cast<bool>(dc.attribute("RANDF", "0").toInt());
appPrefs.DisScale = dc.attribute("DScale", "1").toDouble();
}
if (dc.tagName()=="TYPO")
{
appPrefs.typographicSettings.valueSuperScript = QStoInt(dc.attribute("HOCH"));
appPrefs.typographicSettings.scalingSuperScript = QStoInt(dc.attribute("HOCHSC"));
appPrefs.typographicSettings.valueSubScript = QStoInt(dc.attribute("TIEF"));
appPrefs.typographicSettings.scalingSubScript = QStoInt(dc.attribute("TIEFSC"));
appPrefs.typographicSettings.valueSmallCaps = QStoInt(dc.attribute("SMCAPS"));
appPrefs.typographicSettings.valueBaseGrid = QStodouble(dc.attribute("BASE", "12"));
appPrefs.typographicSettings.offsetBaseGrid = QStodouble(dc.attribute("BASEO", "0"));
appPrefs.typographicSettings.autoLineSpacing = QStoInt(dc.attribute("AUTOL","20"));
double ulp = QStodouble(dc.attribute("UnderlinePos","-1"));
appPrefs.typographicSettings.valueSuperScript = dc.attribute("HOCH").toInt();
appPrefs.typographicSettings.scalingSuperScript = dc.attribute("HOCHSC").toInt();
appPrefs.typographicSettings.valueSubScript = dc.attribute("TIEF").toInt();
appPrefs.typographicSettings.scalingSubScript = dc.attribute("TIEFSC").toInt();
appPrefs.typographicSettings.valueSmallCaps = dc.attribute("SMCAPS").toInt();
appPrefs.typographicSettings.valueBaseGrid = dc.attribute("BASE", "12").toDouble();
appPrefs.typographicSettings.offsetBaseGrid = dc.attribute("BASEO", "0").toDouble();
appPrefs.typographicSettings.autoLineSpacing = dc.attribute("AUTOL", "20").toInt();
double ulp = dc.attribute("UnderlinePos", "-1").toDouble();
if (ulp != -1)
appPrefs.typographicSettings.valueUnderlinePos = qRound(ulp * 10);
else
appPrefs.typographicSettings.valueUnderlinePos = -1;
double ulw = QStodouble(dc.attribute("UnderlineWidth","-1"));
double ulw = dc.attribute("UnderlineWidth", "-1").toDouble();
if (ulw != -1)
appPrefs.typographicSettings.valueUnderlineWidth = qRound(ulw * 10);
else
appPrefs.typographicSettings.valueUnderlineWidth = -1;
double stp = QStodouble(dc.attribute("StrikeThruPos","-1"));
double stp = dc.attribute("StrikeThruPos", "-1").toDouble();
if (stp != -1)
appPrefs.typographicSettings.valueStrikeThruPos = qRound(ulp * 10);
else
appPrefs.typographicSettings.valueStrikeThruPos = -1;
double stw = QStodouble(dc.attribute("StrikeThruWidth","-1"));
double stw = dc.attribute("StrikeThruWidth", "-1").toDouble();
if (stw != -1)
appPrefs.typographicSettings.valueStrikeThruWidth = qRound(stw * 10);
else
1354,46 → 1354,46
appPrefs.toolSettings.dStrokeText = dc.attribute("StrokeText", appPrefs.toolSettings.dPenText);
appPrefs.toolSettings.dTextBackGround = dc.attribute("TextBackGround", "None");
appPrefs.toolSettings.dTextLineColor = dc.attribute("TextLineColor", "None");
appPrefs.toolSettings.dTextBackGroundShade = QStoInt(dc.attribute("TextBackGroundShade", "100"));
appPrefs.toolSettings.dTextLineShade = QStoInt(dc.attribute("TextLineShade", "100"));
appPrefs.toolSettings.dTextPenShade = QStoInt(dc.attribute("TextPenShade", "100"));
appPrefs.toolSettings.dTextStrokeShade = QStoInt(dc.attribute("TextStrokeShade", "100"));
appPrefs.toolSettings.dCols = QStoInt(dc.attribute("TEXTCOL", "1"));
appPrefs.toolSettings.dGap = QStodouble(dc.attribute("TEXTGAP", "0.0"));
appPrefs.toolSettings.dTextBackGroundShade = dc.attribute("TextBackGroundShade", "100").toInt();
appPrefs.toolSettings.dTextLineShade = dc.attribute("TextLineShade", "100").toInt();
appPrefs.toolSettings.dTextPenShade = dc.attribute("TextPenShade", "100").toInt();
appPrefs.toolSettings.dTextStrokeShade = dc.attribute("TextStrokeShade", "100").toInt();
appPrefs.toolSettings.dCols = dc.attribute("TEXTCOL", "1").toInt();
appPrefs.toolSettings.dGap = dc.attribute("TEXTGAP", "0.0").toDouble();
appPrefs.toolSettings.tabFillChar = dc.attribute("TabFill", "");
appPrefs.toolSettings.dTabWidth = QStodouble(dc.attribute("TabWidth", "36.0"));
appPrefs.toolSettings.dLineArt = QStoInt(dc.attribute("STIL"));
appPrefs.toolSettings.dLstyleLine = QStoInt(dc.attribute("STILLINE"));
appPrefs.toolSettings.dWidth = QStodouble(dc.attribute("WIDTH"));
appPrefs.toolSettings.dWidthLine = QStodouble(dc.attribute("WIDTHLINE"));
appPrefs.toolSettings.dShade2 = QStoInt(dc.attribute("PENSHADE"));
appPrefs.toolSettings.dShadeLine = QStoInt(dc.attribute("LINESHADE"));
appPrefs.toolSettings.dShade = QStoInt(dc.attribute("BRUSHSHADE"));
appPrefs.toolSettings.magMin = QStoInt(dc.attribute("MAGMIN","10"));
appPrefs.toolSettings.magMax = QStoInt(dc.attribute("MAGMAX","3200"));
appPrefs.toolSettings.magStep = QStoInt(dc.attribute("MAGSTEP","25"));
appPrefs.toolSettings.dTabWidth = dc.attribute("TabWidth", "36.0").toDouble();
appPrefs.toolSettings.dLineArt = dc.attribute("STIL").toInt();
appPrefs.toolSettings.dLstyleLine = dc.attribute("STILLINE").toInt();
appPrefs.toolSettings.dWidth = dc.attribute("WIDTH").toDouble();
appPrefs.toolSettings.dWidthLine = dc.attribute("WIDTHLINE").toDouble();
appPrefs.toolSettings.dShade2 = dc.attribute("PENSHADE").toInt();
appPrefs.toolSettings.dShadeLine = dc.attribute("LINESHADE").toInt();
appPrefs.toolSettings.dShade = dc.attribute("BRUSHSHADE").toInt();
appPrefs.toolSettings.magMin = dc.attribute("MAGMIN", "10").toInt();
appPrefs.toolSettings.magMax = dc.attribute("MAGMAX", "3200").toInt();
appPrefs.toolSettings.magStep = dc.attribute("MAGSTEP", "25").toInt();
appPrefs.toolSettings.dBrushPict = dc.attribute("CPICT");
appPrefs.toolSettings.shadePict = QStoInt(dc.attribute("PICTSHADE","100"));
appPrefs.toolSettings.scaleX = QStodouble(dc.attribute("PICTSCX","1"));
appPrefs.toolSettings.scaleY = QStodouble(dc.attribute("PICTSCY","1"));
appPrefs.toolSettings.scaleType = static_cast<bool>(QStoInt(dc.attribute("PSCALE", "1")));
appPrefs.toolSettings.aspectRatio = static_cast<bool>(QStoInt(dc.attribute("PASPECT", "0")));
appPrefs.toolSettings.useEmbeddedPath = static_cast<bool>(QStoInt(dc.attribute("EmbeddedPath", "0")));
appPrefs.toolSettings.lowResType = QStoInt(dc.attribute("HalfRes", "1"));
appPrefs.toolSettings.polyC = QStoInt(dc.attribute("POLYC", "4"));
appPrefs.toolSettings.polyF = QStodouble(dc.attribute("POLYF", "0.5"));
appPrefs.toolSettings.polyR = QStodouble(dc.attribute("POLYR", "0"));
appPrefs.toolSettings.polyFd = QStoInt(dc.attribute("POLYFD", "0"));
appPrefs.toolSettings.polyS = static_cast<bool>(QStoInt(dc.attribute("POLYS", "0")));
appPrefs.toolSettings.dStartArrow = QStoInt(dc.attribute("StartArrow", "0"));
appPrefs.toolSettings.dEndArrow = QStoInt(dc.attribute("EndArrow", "0"));
appPrefs.toolSettings.shadePict = dc.attribute("PICTSHADE", "100").toInt();
appPrefs.toolSettings.scaleX = dc.attribute("PICTSCX", "1").toDouble();
appPrefs.toolSettings.scaleY = dc.attribute("PICTSCY", "1").toDouble();
appPrefs.toolSettings.scaleType = static_cast<bool>(dc.attribute("PSCALE", "1").toInt());
appPrefs.toolSettings.aspectRatio = static_cast<bool>(dc.attribute("PASPECT", "0").toInt());
appPrefs.toolSettings.useEmbeddedPath = static_cast<bool>(dc.attribute("EmbeddedPath", "0").toInt());
appPrefs.toolSettings.lowResType = dc.attribute("HalfRes", "1").toInt();
appPrefs.toolSettings.polyC = dc.attribute("POLYC", "4").toInt();
appPrefs.toolSettings.polyF = dc.attribute("POLYF", "0.5").toDouble();
appPrefs.toolSettings.polyR = dc.attribute("POLYR", "0").toDouble();
appPrefs.toolSettings.polyFd = dc.attribute("POLYFD", "0").toInt();
appPrefs.toolSettings.polyS = static_cast<bool>(dc.attribute("POLYS", "0").toInt());
appPrefs.toolSettings.dStartArrow = dc.attribute("StartArrow", "0").toInt();
appPrefs.toolSettings.dEndArrow = dc.attribute("EndArrow", "0").toInt();
}
if (dc.tagName()=="MAINWINDOW")
{
appPrefs.mainWinSettings.xPosition = QStoInt(dc.attribute("XPOS", "0"));
appPrefs.mainWinSettings.yPosition = QStoInt(dc.attribute("YPOS", "0"));
appPrefs.mainWinSettings.width = QStoInt(dc.attribute("WIDTH", "640"));
appPrefs.mainWinSettings.height = QStoInt(dc.attribute("HEIGHT", "480"));
appPrefs.mainWinSettings.xPosition = dc.attribute("XPOS", "0").toInt();
appPrefs.mainWinSettings.yPosition = dc.attribute("YPOS", "0").toInt();
appPrefs.mainWinSettings.width = dc.attribute("WIDTH", "640").toInt();
appPrefs.mainWinSettings.height = dc.attribute("HEIGHT", "480").toInt();
QDesktopWidget *d = QApplication::desktop();
QSize gStrut = QApplication::globalStrut();
int minX = 0;
1428,27 → 1428,27
}
if (dc.tagName()=="PAGEPALETTE")
{
appPrefs.SepalT = static_cast<bool>(QStoInt(dc.attribute("THUMBS")));
appPrefs.SepalN = static_cast<bool>(QStoInt(dc.attribute("NAMES")));
appPrefs.SepalT = static_cast<bool>(dc.attribute("THUMBS").toInt());
appPrefs.SepalN = static_cast<bool>(dc.attribute("NAMES").toInt());
}
if (dc.tagName()=="SCRAPBOOK")
{
appPrefs.PSize = QStoInt(dc.attribute("PREVIEW"));
appPrefs.SaveAtQ = static_cast<bool>(QStoInt(dc.attribute("SAVE")));
appPrefs.PSize = dc.attribute("PREVIEW").toInt();
appPrefs.SaveAtQ = static_cast<bool>(dc.attribute("SAVE").toInt());
}
if (dc.tagName() == "DOKUMENT")
{
appPrefs.pageSize = dc.attribute("PAGESIZE","A4");
appPrefs.pageOrientation = QStoInt(dc.attribute("AUSRICHTUNG","0"));
appPrefs.PageWidth = QStodouble(dc.attribute("BREITE","595"));
appPrefs.PageHeight = QStodouble(dc.attribute("HOEHE","842"));
appPrefs.RandOben = QStodouble(dc.attribute("RANDO","9"));
appPrefs.RandUnten = QStodouble(dc.attribute("RANDU","40"));
appPrefs.RandLinks = QStodouble(dc.attribute("RANDL","9"));
appPrefs.RandRechts = QStodouble(dc.attribute("RANDR","9"));
appPrefs.FacingPages = QStoInt(dc.attribute("DOPPEL","0"));
appPrefs.AutoSave = static_cast<bool>(QStoInt(dc.attribute("AutoSave","0")));
appPrefs.AutoSaveTime = QStoInt(dc.attribute("AutoSaveTime","600000"));
appPrefs.pageOrientation = dc.attribute("AUSRICHTUNG", "0").toInt();
appPrefs.PageWidth = dc.attribute("BREITE", "595").toDouble();
appPrefs.PageHeight = dc.attribute("HOEHE", "842").toDouble();
appPrefs.RandOben = dc.attribute("RANDO", "9").toDouble();
appPrefs.RandUnten = dc.attribute("RANDU", "40").toDouble();
appPrefs.RandLinks = dc.attribute("RANDL", "9").toDouble();
appPrefs.RandRechts = dc.attribute("RANDR", "9").toDouble();
appPrefs.FacingPages = dc.attribute("DOPPEL", "0").toInt();
appPrefs.AutoSave = static_cast<bool>(dc.attribute("AutoSave", "0").toInt());
appPrefs.AutoSaveTime = dc.attribute("AutoSaveTime", "600000").toInt();
}
if (dc.tagName()=="PageSets")
{
1463,12 → 1463,12
{
struct PageSet pageS;
pageS.Name = PgsAttr.attribute("Name");
pageS.FirstPage = QStoInt(PgsAttr.attribute("FirstPage","0"));
pageS.Rows = QStoInt(PgsAttr.attribute("Rows","1"));
pageS.Columns = QStoInt(PgsAttr.attribute("Columns","1"));
pageS.GapHorizontal = QStodouble(PgsAttr.attribute("GapHorizontal","0"));
pageS.GapVertical = QStodouble(PgsAttr.attribute("GapVertical","0"));
pageS.GapBelow = QStodouble(PgsAttr.attribute("GapBelow","0"));
pageS.FirstPage = PgsAttr.attribute("FirstPage", "0").toInt();
pageS.Rows = PgsAttr.attribute("Rows", "1").toInt();
pageS.Columns = PgsAttr.attribute("Columns", "1").toInt();
pageS.GapHorizontal = PgsAttr.attribute("GapHorizontal", "0").toDouble();
pageS.GapVertical = PgsAttr.attribute("GapVertical", "0").toDouble();
pageS.GapBelow = PgsAttr.attribute("GapBelow", "0").toDouble();
pageS.pageNames.clear();
QDomNode PGSN = PGS.firstChild();
while(!PGSN.isNull())
1486,18 → 1486,18
}
if (dc.tagName()=="CMS")
{
appPrefs.DCMSset.SoftProofOn = static_cast<bool>(QStoInt(dc.attribute("DPSo","0")));
appPrefs.DCMSset.CMSinUse = static_cast<bool>(QStoInt(dc.attribute("DPuse","0")));
appPrefs.DCMSset.GamutCheck = static_cast<bool>(QStoInt(dc.attribute("DPgam","0")));
appPrefs.DCMSset.BlackPoint = static_cast<bool>(QStoInt(dc.attribute("DPbla","1")));
appPrefs.DCMSset.SoftProofOn = static_cast<bool>(dc.attribute("DPSo", "0").toInt());
appPrefs.DCMSset.CMSinUse = static_cast<bool>(dc.attribute("DPuse", "0").toInt());
appPrefs.DCMSset.GamutCheck = static_cast<bool>(dc.attribute("DPgam", "0").toInt());
appPrefs.DCMSset.BlackPoint = static_cast<bool>(dc.attribute("DPbla", "1").toInt());
appPrefs.DCMSset.DefaultMonitorProfile = dc.attribute("DPMo","");
appPrefs.DCMSset.DefaultPrinterProfile = dc.attribute("DPPr","");
appPrefs.DCMSset.DefaultImageRGBProfile = dc.attribute("DPIn","");
appPrefs.DCMSset.DefaultImageCMYKProfile = dc.attribute("DPInCMYK","");
appPrefs.DCMSset.DefaultSolidColorProfile = dc.attribute("DPIn2","");
appPrefs.DCMSset.DefaultIntentPrinter = QStoInt(dc.attribute("DIPr","0"));
appPrefs.DCMSset.DefaultIntentMonitor = QStoInt(dc.attribute("DIMo","3"));
appPrefs.DCMSset.DefaultIntentImages = QStoInt(dc.attribute("DIMo2","3"));
appPrefs.DCMSset.DefaultIntentPrinter = dc.attribute("DIPr", "0").toInt();
appPrefs.DCMSset.DefaultIntentMonitor = dc.attribute("DIMo", "3").toInt();
appPrefs.DCMSset.DefaultIntentImages = dc.attribute("DIMo2", "3").toInt();
}
if (!importingFrom12 && dc.tagName()=="SHORTCUT")
{
1523,17 → 1523,17
{
QString name=dc.attribute("Name");
struct checkerPrefs checkerSettings;
checkerSettings.ignoreErrors = static_cast<bool>(QStoInt(dc.attribute("ignoreErrors", "0")));
checkerSettings.autoCheck = static_cast<bool>(QStoInt(dc.attribute("autoCheck", "1")));
checkerSettings.checkGlyphs = static_cast<bool>(QStoInt(dc.attribute("checkGlyphs", "1")));
checkerSettings.checkOrphans = static_cast<bool>(QStoInt(dc.attribute("checkOrphans", "1")));
checkerSettings.checkOverflow = static_cast<bool>(QStoInt(dc.attribute("checkOverflow", "1")));
checkerSettings.checkPictures = static_cast<bool>(QStoInt(dc.attribute("checkPictures", "1")));
checkerSettings.checkResolution = static_cast<bool>(QStoInt(dc.attribute("checkResolution", "1")));
checkerSettings.checkTransparency = static_cast<bool>(QStoInt(dc.attribute("checkTransparency", "1")));
checkerSettings.minResolution = QStodouble(dc.attribute("minResolution","72"));
checkerSettings.checkAnnotations = static_cast<bool>(QStoInt(dc.attribute("checkAnnotations", "0")));
checkerSettings.checkRasterPDF = static_cast<bool>(QStoInt(dc.attribute("checkRasterPDF", "1")));
checkerSettings.ignoreErrors = static_cast<bool>(dc.attribute("ignoreErrors", "0").toInt());
checkerSettings.autoCheck = static_cast<bool>(dc.attribute("autoCheck", "1").toInt());
checkerSettings.checkGlyphs = static_cast<bool>(dc.attribute("checkGlyphs", "1").toInt());
checkerSettings.checkOrphans = static_cast<bool>(dc.attribute("checkOrphans", "1").toInt());
checkerSettings.checkOverflow = static_cast<bool>(dc.attribute("checkOverflow", "1").toInt());
checkerSettings.checkPictures = static_cast<bool>(dc.attribute("checkPictures", "1").toInt());
checkerSettings.checkResolution = static_cast<bool>(dc.attribute("checkResolution", "1").toInt());
checkerSettings.checkTransparency = static_cast<bool>(dc.attribute("checkTransparency", "1").toInt());
checkerSettings.minResolution = dc.attribute("minResolution", "72").toDouble();
checkerSettings.checkAnnotations = static_cast<bool>(dc.attribute("checkAnnotations", "0").toInt());
checkerSettings.checkRasterPDF = static_cast<bool>(dc.attribute("checkRasterPDF", "1").toInt());
appPrefs.checkerProfiles[name] = checkerSettings;
}
if (dc.tagName()=="PRINTER")
1541,27 → 1541,27
appPrefs.PrinterName = dc.attribute("NAME");
appPrefs.PrinterFile = dc.attribute("FILE");
appPrefs.PrinterCommand = dc.attribute("COMMAND");
appPrefs.ClipMargin = static_cast<bool>(QStoInt(dc.attribute("CLIPMARGIN", "1")));
appPrefs.GCRMode = static_cast<bool>(QStoInt(dc.attribute("GMODE", "1")));
appPrefs.ClipMargin = static_cast<bool>(dc.attribute("CLIPMARGIN", "1").toInt());
appPrefs.GCRMode = static_cast<bool>(dc.attribute("GMODE", "1").toInt());
}
if (dc.tagName()=="PRINTPREVIEW")
{
appPrefs.PrPr_Mode = static_cast<bool>(QStoInt(dc.attribute("Mode", "0")));
appPrefs.Gcr_Mode = static_cast<bool>(QStoInt(dc.attribute("GcrMode", "1")));
appPrefs.PrPr_AlphaText = static_cast<bool>(QStoInt(dc.attribute("AlphaText", "0")));
appPrefs.PrPr_AlphaGraphics = static_cast<bool>(QStoInt(dc.attribute("AlphaGraphics", "0")));
appPrefs.PrPr_Transparency = static_cast<bool>(QStoInt(dc.attribute("Transparency", "0")));
appPrefs.PrPr_C = static_cast<bool>(QStoInt(dc.attribute("Cyan", "1")));
appPrefs.PrPr_M = static_cast<bool>(QStoInt(dc.attribute("Magenta", "1")));
appPrefs.PrPr_Y = static_cast<bool>(QStoInt(dc.attribute("Yellow", "1")));
appPrefs.PrPr_K = static_cast<bool>(QStoInt(dc.attribute("Black", "1")));
appPrefs.PrPr_Mode = static_cast<bool>(dc.attribute("Mode", "0").toInt());
appPrefs.Gcr_Mode = static_cast<bool>(dc.attribute("GcrMode", "1").toInt());
appPrefs.PrPr_AlphaText = static_cast<bool>(dc.attribute("AlphaText", "0").toInt());
appPrefs.PrPr_AlphaGraphics = static_cast<bool>(dc.attribute("AlphaGraphics", "0").toInt());
appPrefs.PrPr_Transparency = static_cast<bool>(dc.attribute("Transparency", "0").toInt());
appPrefs.PrPr_C = static_cast<bool>(dc.attribute("Cyan", "1").toInt());
appPrefs.PrPr_M = static_cast<bool>(dc.attribute("Magenta", "1").toInt());
appPrefs.PrPr_Y = static_cast<bool>(dc.attribute("Yellow", "1").toInt());
appPrefs.PrPr_K = static_cast<bool>(dc.attribute("Black", "1").toInt());
}
if (dc.tagName()=="EXTERNAL")
{
setGhostscriptExecutable(dc.attribute("GS", "gs"));
appPrefs.gs_AntiAliasText = static_cast<bool>(QStoInt(dc.attribute("AlphaText", "0")));
appPrefs.gs_AntiAliasGraphics = static_cast<bool>(QStoInt(dc.attribute("AlphaGraphics", "0")));
appPrefs.gs_Resolution = QStoInt(dc.attribute("Resolution", "72"));
appPrefs.gs_AntiAliasText = static_cast<bool>(dc.attribute("AlphaText", "0").toInt());
appPrefs.gs_AntiAliasGraphics = static_cast<bool>(dc.attribute("AlphaGraphics", "0").toInt());
appPrefs.gs_Resolution = dc.attribute("Resolution", "72").toInt();
setImageEditorExecutable(dc.attribute("GIMP", "gimp"));
}
if (dc.tagName()=="HYPHEN")
1568,10 → 1568,10
{
if (!dc.attribute("LANG", "").isEmpty())
appPrefs.Language = dc.attribute("LANG");
appPrefs.MinWordLen = QStoInt(dc.attribute("WORDLEN", "3"));
appPrefs.HyCount = QStoInt(dc.attribute("HYCOUNT", "2"));
appPrefs.Automatic = static_cast<bool>(QStoInt(dc.attribute("MODE", "1")));
appPrefs.AutoCheck = static_cast<bool>(QStoInt(dc.attribute("INMODE", "1")));
appPrefs.MinWordLen = dc.attribute("WORDLEN", "3").toInt();
appPrefs.HyCount = dc.attribute("HYCOUNT", "2").toInt();
appPrefs.Automatic = static_cast<bool>(dc.attribute("MODE", "1").toInt());
appPrefs.AutoCheck = static_cast<bool>(dc.attribute("INMODE", "1").toInt());
}
if (dc.tagName()=="FONTS")
{
1579,7 → 1579,7
QString newFont = "";
if (!appPrefs.AvailFonts.find(tmpf))
{
ScApp->showSplash(false);
ScMW->showSplash(false);
MissingFont *dia = new MissingFont(0, tmpf, 0);
dia->exec();
newFont = dia->getReplacementFont();
1589,16 → 1589,16
newFont = dc.attribute("FACE");
if (!newFont.isEmpty())
appPrefs.toolSettings.defFont = newFont;
appPrefs.toolSettings.defSize = qRound(QStodouble(dc.attribute("SIZE")) * 10.0);
appPrefs.askBeforeSubstituite = static_cast<bool>(QStoInt(dc.attribute("AutomaticSubst", "1")));
appPrefs.toolSettings.defSize = qRound(dc.attribute("SIZE").toDouble() * 10.0);
appPrefs.askBeforeSubstituite = static_cast<bool>(dc.attribute("AutomaticSubst", "1").toInt());
}
if (dc.tagName()=="FONT")
{
if (appPrefs.AvailFonts.find(dc.attribute("NAME")))
{
appPrefs.AvailFonts[dc.attribute("NAME")]->EmbedPS = static_cast<bool>(QStoInt(dc.attribute("EMBED")));
appPrefs.AvailFonts[dc.attribute("NAME")]->UseFont &= static_cast<bool>(QStoInt(dc.attribute("USE","1")));
appPrefs.AvailFonts[dc.attribute("NAME")]->Subset = static_cast<bool>(QStoInt(dc.attribute("SUBSET","0")));
appPrefs.AvailFonts[dc.attribute("NAME")]->EmbedPS = static_cast<bool>(dc.attribute("EMBED").toInt());
appPrefs.AvailFonts[dc.attribute("NAME")]->UseFont &= static_cast<bool>(dc.attribute("USE", "1").toInt());
appPrefs.AvailFonts[dc.attribute("NAME")]->Subset = static_cast<bool>(dc.attribute("SUBSET", "0").toInt());
}
}
if (dc.tagName()=="COLOR")
1608,11 → 1608,11
else
lf.fromQColor(QColor(dc.attribute("RGB")));
if (dc.hasAttribute("Spot"))
lf.setSpotColor(static_cast<bool>(QStoInt(dc.attribute("Spot"))));
lf.setSpotColor(static_cast<bool>(dc.attribute("Spot").toInt()));
else
lf.setSpotColor(false);
if (dc.hasAttribute("Register"))
lf.setRegistrationColor(static_cast<bool>(QStoInt(dc.attribute("Register"))));
lf.setRegistrationColor(static_cast<bool>(dc.attribute("Register").toInt()));
else
lf.setRegistrationColor(false);
appPrefs.DColors[dc.attribute("NAME")] = lf;
1625,45 → 1625,45
appPrefs.DColorSet = dc.attribute("NAME");
if(dc.tagName()=="PDF")
{
appPrefs.PDF_Options.Articles = static_cast<bool>(QStoInt(dc.attribute("Articles")));
appPrefs.PDF_Options.Thumbnails = static_cast<bool>(QStoInt(dc.attribute("Thumbnails")));
appPrefs.PDF_Options.Compress = static_cast<bool>(QStoInt(dc.attribute("Compress")));
appPrefs.PDF_Options.CompressMethod = QStoInt(dc.attribute("CMethod","0"));
appPrefs.PDF_Options.Quality = QStoInt(dc.attribute("Quality","0"));
appPrefs.PDF_Options.RecalcPic = static_cast<bool>(QStoInt(dc.attribute("RecalcPic")));
appPrefs.PDF_Options.Bookmarks = static_cast<bool>(QStoInt(dc.attribute("Bookmarks")));
appPrefs.PDF_Options.MirrorH = static_cast<bool>(QStoInt(dc.attribute("MirrorH")));
appPrefs.PDF_Options.MirrorV = static_cast<bool>(QStoInt(dc.attribute("MirrorV")));
appPrefs.PDF_Options.RotateDeg = QStoInt(dc.attribute("RotateDeg","0"));
appPrefs.PDF_Options.PresentMode = static_cast<bool>(QStoInt(dc.attribute("PresentMode")));
appPrefs.PDF_Options.PicRes = QStoInt(dc.attribute("PicRes"));
appPrefs.PDF_Options.Version = (PDFOptions::PDFVersion)QStoInt(dc.attribute("Version"));
appPrefs.PDF_Options.Resolution = QStoInt(dc.attribute("Resolution"));
appPrefs.PDF_Options.Binding = QStoInt(dc.attribute("Binding"));
appPrefs.PDF_Options.Articles = static_cast<bool>(dc.attribute("Articles").toInt());
appPrefs.PDF_Options.Thumbnails = static_cast<bool>(dc.attribute("Thumbnails").toInt());
appPrefs.PDF_Options.Compress = static_cast<bool>(dc.attribute("Compress").toInt());
appPrefs.PDF_Options.CompressMethod = dc.attribute("CMethod", "0").toInt();
appPrefs.PDF_Options.Quality = dc.attribute("Quality", "0").toInt();
appPrefs.PDF_Options.RecalcPic = static_cast<bool>(dc.attribute("RecalcPic").toInt());
appPrefs.PDF_Options.Bookmarks = static_cast<bool>(dc.attribute("Bookmarks").toInt());
appPrefs.PDF_Options.MirrorH = static_cast<bool>(dc.attribute("MirrorH").toInt());
appPrefs.PDF_Options.MirrorV = static_cast<bool>(dc.attribute("MirrorV").toInt());
appPrefs.PDF_Options.RotateDeg = dc.attribute("RotateDeg", "0").toInt();
appPrefs.PDF_Options.PresentMode = static_cast<bool>(dc.attribute("PresentMode").toInt());
appPrefs.PDF_Options.PicRes = dc.attribute("PicRes").toInt();
appPrefs.PDF_Options.Version = (PDFOptions::PDFVersion)dc.attribute("Version").toInt();
appPrefs.PDF_Options.Resolution = dc.attribute("Resolution").toInt();
appPrefs.PDF_Options.Binding = dc.attribute("Binding").toInt();
appPrefs.PDF_Options.Datei = "";
appPrefs.PDF_Options.isGrayscale = static_cast<bool>(QStoInt(dc.attribute("Grayscale","0")));
appPrefs.PDF_Options.UseRGB = static_cast<bool>(QStoInt(dc.attribute("RGBMode","0")));
appPrefs.PDF_Options.UseProfiles = static_cast<bool>(QStoInt(dc.attribute("UseProfiles","0")));
appPrefs.PDF_Options.UseProfiles2 = static_cast<bool>(QStoInt(dc.attribute("UseProfiles2","0")));
appPrefs.PDF_Options.Intent = QStoInt(dc.attribute("Intent","1"));
appPrefs.PDF_Options.Intent2 = QStoInt(dc.attribute("Intent2","1"));
appPrefs.PDF_Options.isGrayscale = static_cast<bool>(dc.attribute("Grayscale", "0").toInt());
appPrefs.PDF_Options.UseRGB = static_cast<bool>(dc.attribute("RGBMode", "0").toInt());
appPrefs.PDF_Options.UseProfiles = static_cast<bool>(dc.attribute("UseProfiles", "0").toInt());
appPrefs.PDF_Options.UseProfiles2 = static_cast<bool>(dc.attribute("UseProfiles2", "0").toInt());
appPrefs.PDF_Options.Intent = dc.attribute("Intent", "1").toInt();
appPrefs.PDF_Options.Intent2 = dc.attribute("Intent2", "1").toInt();
appPrefs.PDF_Options.SolidProf = dc.attribute("SolidP", "");
appPrefs.PDF_Options.ImageProf = dc.attribute("ImageP", "");
appPrefs.PDF_Options.PrintProf = dc.attribute("PrintP", "");
appPrefs.PDF_Options.Info = dc.attribute("InfoString", "");
appPrefs.PDF_Options.BleedTop = QStodouble(dc.attribute("BTop","0"));
appPrefs.PDF_Options.BleedLeft = QStodouble(dc.attribute("BLeft","0"));
appPrefs.PDF_Options.BleedRight = QStodouble(dc.attribute("BRight","0"));
appPrefs.PDF_Options.BleedBottom = QStodouble(dc.attribute("BBottom","0"));
appPrefs.PDF_Options.EmbeddedI = static_cast<bool>(QStoInt(dc.attribute("ImagePr","0")));
appPrefs.PDF_Options.BleedTop = dc.attribute("BTop", "0").toDouble();
appPrefs.PDF_Options.BleedLeft = dc.attribute("BLeft", "0").toDouble();
appPrefs.PDF_Options.BleedRight = dc.attribute("BRight", "0").toDouble();
appPrefs.PDF_Options.BleedBottom = dc.attribute("BBottom", "0").toDouble();
appPrefs.PDF_Options.EmbeddedI = static_cast<bool>(dc.attribute("ImagePr", "0").toInt());
appPrefs.PDF_Options.PassOwner = dc.attribute("PassOwner", "");
appPrefs.PDF_Options.PassUser = dc.attribute("PassUser", "");
appPrefs.PDF_Options.Permissions = QStoInt(dc.attribute("Permissions","-4"));
appPrefs.PDF_Options.Encrypt = static_cast<bool>(QStoInt(dc.attribute("Encrypt","0")));
appPrefs.PDF_Options.useLayers = static_cast<bool>(QStoInt(dc.attribute("UseLayers","0")));
appPrefs.PDF_Options.UseLPI = static_cast<bool>(QStoInt(dc.attribute("UseLpi","0")));
appPrefs.PDF_Options.UseSpotColors = static_cast<bool>(QStoInt(dc.attribute("UseSpotColors","1")));
appPrefs.PDF_Options.doMultiFile = static_cast<bool>(QStoInt(dc.attribute("doMultiFile","0")));
appPrefs.PDF_Options.Permissions = dc.attribute("Permissions", "-4").toInt();
appPrefs.PDF_Options.Encrypt = static_cast<bool>(dc.attribute("Encrypt", "0").toInt());
appPrefs.PDF_Options.useLayers = static_cast<bool>(dc.attribute("UseLayers", "0").toInt());
appPrefs.PDF_Options.UseLPI = static_cast<bool>(dc.attribute("UseLpi", "0").toInt());
appPrefs.PDF_Options.UseSpotColors = static_cast<bool>(dc.attribute("UseSpotColors", "1").toInt());
appPrefs.PDF_Options.doMultiFile = static_cast<bool>(dc.attribute("doMultiFile", "0").toInt());
QDomNode PFO = DOC.firstChild();
while(!PFO.isNull())
{
1671,9 → 1671,9
if(pdfF.tagName() == "LPI")
{
struct LPIData lpo;
lpo.Angle = QStoInt(pdfF.attribute("Angle"));
lpo.Frequency = QStoInt(pdfF.attribute("Frequency"));
lpo.SpotFunc = QStoInt(pdfF.attribute("SpotFunction"));
lpo.Angle = pdfF.attribute("Angle").toInt();
lpo.Frequency = pdfF.attribute("Frequency").toInt();
lpo.SpotFunc = pdfF.attribute("SpotFunction").toInt();
appPrefs.PDF_Options.LPISettings[pdfF.attribute("Color")] = lpo;
}
PFO = PFO.nextSibling();
1731,8 → 1731,8
// lorem ispum
if (dc.tagName() == "LoremIpsum")
{
appPrefs.useStandardLI = static_cast<bool>(QStoInt(dc.attribute("useStandardLI", "0")));
appPrefs.paragraphsLI = QStoInt(dc.attribute("paragraphsLI", "10"));
appPrefs.useStandardLI = static_cast<bool>(dc.attribute("useStandardLI", "0").toInt());
appPrefs.paragraphsLI = dc.attribute("paragraphsLI", "10").toInt();
}
DOC=DOC.nextSibling();
}
1778,10 → 1778,10
}
 
// It's hard to say whether this should be here and called from SavePrefs, or
// triggered by a signal sent from here and displayed by ScribusApp.
// triggered by a signal sent from here and displayed by ScribusMainWindow.
void PrefsManager::alertSavePrefsFailed() const
{
QMessageBox::critical(ScApp, tr("Error Writing Preferences"),
QMessageBox::critical(ScMW, tr("Error Writing Preferences"),
"<qt>" +
tr("Scribus was not able to save its preferences:<br>"
"%1<br>"
1794,13 → 1794,13
}
 
// It's hard to say whether this should be here and called from ReadPrefs, or
// triggered by a signal sent from here and displayed by ScribusApp.
// triggered by a signal sent from here and displayed by ScribusMainWindow.
void PrefsManager::alertLoadPrefsFailed() const
{
bool splashShowing = ScApp->splashShowing();
bool splashShowing = ScMW->splashShowing();
if (splashShowing)
ScApp->showSplash(false);
QMessageBox::critical(ScApp, tr("Error Loading Preferences"),
ScMW->showSplash(false);
QMessageBox::critical(ScMW, tr("Error Loading Preferences"),
"<qt>" +
tr("Scribus was not able to load its preferences:<br>"
"%1<br>"
1809,7 → 1809,7
+ "</qt>",
QMessageBox::Ok|QMessageBox::Default|QMessageBox::Escape,
QMessageBox::NoButton);
ScApp->showSplash(splashShowing);
ScMW->showSplash(splashShowing);
}
 
const int PrefsManager::gsResolution()
/branches/Version13x/Scribus/scribus/charselect.cpp
60,7 → 60,7
p.end();
}
 
ChTable::ChTable(CharSelect* parent, ScribusApp *pl) : QTable(parent)
ChTable::ChTable(CharSelect* parent, ScribusMainWindow *pl) : QTable(parent)
{
watchTimer = new QTimer(this);
// connect(watchTimer, SIGNAL(timeout()), this, SLOT(showAlternate()));
231,10 → 231,10
 
CharSelect::CharSelect( QWidget* parent, PageItem *item) : QDialog( parent, "CharSelect", true, 0 )
{
fontInUse = ScApp->doc->CurrFont;
fontInUse = ScMW->doc->CurrFont;
needReturn = false;
installEventFilter(this);
run(parent, item, ScApp);
run(parent, item, ScMW);
}
 
CharSelect::CharSelect( QWidget* parent, PageItem *item, QString font) : QDialog( parent, "CharSelect", true, 0 )
242,7 → 242,7
fontInUse = font;
needReturn = true;
installEventFilter(this);
run(parent, item, ScApp);
run(parent, item, ScMW);
}
 
 
252,7 → 252,7
}
 
 
void CharSelect::run( QWidget* /*parent*/, PageItem *item, ScribusApp *pl)
void CharSelect::run( QWidget* /*parent*/, PageItem *item, ScribusMainWindow *pl)
{
setCaption( tr( "Select Character:" )+" "+fontInUse );
ite = item;
711,11 → 711,11
delEdit();
setCaption( tr( "Select Character:" )+" "+fontInUse );
ap->SetNewFont(fontInUse);
if (ScApp->doc->CurrFont != fontInUse)
if (ScMW->doc->CurrFont != fontInUse)
{
disconnect(fontSelector, SIGNAL(activated(int)), this, SLOT(newFont(int)));
fontSelector->RebuildList(ScApp->doc);
fontInUse = ScApp->doc->CurrFont;
fontSelector->RebuildList(ScMW->doc);
fontInUse = ScMW->doc->CurrFont;
setCaption( tr( "Select Character:" )+" "+fontInUse );
fontSelector->setCurrentText(fontInUse);
connect(fontSelector, SIGNAL(activated(int)), this, SLOT(newFont(int)));
/branches/Version13x/Scribus/scribus/tocindexprefs.h
6,7 → 6,7
 
/***************************************************************************
* *
* ScApp program is free software; you can redistribute it and/or modify *
* ScMW program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
/branches/Version13x/Scribus/scribus/scribuswin.cpp
87,16 → 87,16
{
if (doc->isModified() && (doc->viewCount == 1))
{
int exit=ScMessageBox::information(ScApp, CommonStrings::trWarning,
int exit=ScMessageBox::information(ScMW, CommonStrings::trWarning,
tr("Document:")+" "+doc->DocName+"\n"+ tr("has been changed since the last save."),
CommonStrings::tr_Save, tr("&Discard"), CommonStrings::tr_Cancel, 2, 2);
switch (exit)
{
case 0:
if (ScApp->DoSaveClose())
if (ScMW->DoSaveClose())
{
if (doc==ScApp->storyEditor->currentDocument())
ScApp->storyEditor->close();
if (doc==ScMW->storyEditor->currentDocument())
ScMW->storyEditor->close();
ce->accept();
}
else
103,7 → 103,7
return;
break;
case 1:
ScApp->DoFileClose();
ScMW->DoFileClose();
//emit Schliessen();
ce->accept();
break;
114,7 → 114,7
}
else
{
ScApp->DoFileClose();
ScMW->DoFileClose();
//emit Schliessen();
ce->accept();
}
/branches/Version13x/Scribus/scribus/layers.cpp
111,7 → 111,7
void LayerPalette::updateName(int r)
{
changeName(r, 0);
ScApp->changeLayer(ScApp->doc->activeLayer());
ScMW->changeLayer(ScMW->doc->activeLayer());
}
 
void LayerPalette::ClearInhalt()
148,22 → 148,22
flagsVisible.clear();
QString tmp;
QValueList<Layer>::iterator it;
int layerCount=ScApp->doc->layerCount();
int layerCount=ScMW->doc->layerCount();
Table->setNumRows(layerCount);
for (it = layers->begin(); it != layers->end(); ++it)
{
int layerNumber=(*it).LNr;
//TODO once "layers" is not set anymore, need to get layer number differently
int layerLevel=ScApp->doc->layerLevelFromNumber(layerNumber);
int layerLevel=ScMW->doc->layerLevelFromNumber(layerNumber);
int row=layerCount-layerLevel-1;
Table->setText(row, 2, ScApp->doc->layerName(layerNumber));
Table->setText(row, 2, ScMW->doc->layerName(layerNumber));
QCheckBox *cp = new QCheckBox(this, tmp.setNum(layerLevel));
cp->setChecked(ScApp->doc->layerPrintable(layerNumber));
cp->setChecked(ScMW->doc->layerPrintable(layerNumber));
Table->setCellWidget(row, 1, cp);
flagsPrintable.append(cp);
connect(cp, SIGNAL(clicked()), this, SLOT(printLayer()));
QCheckBox *cp2 = new QCheckBox(this, tmp.setNum(layerLevel));
cp2->setChecked(ScApp->doc->layerVisible(layerNumber));
cp2->setChecked(ScMW->doc->layerVisible(layerNumber));
flagsVisible.append(cp2);
connect(cp2, SIGNAL(clicked()), this, SLOT(visibleLayer()));
Table->setCellWidget(row, 0, cp2);
176,22 → 176,22
 
void LayerPalette::addLayer()
{
ScApp->doc->addLayer(QString::null, true);
ScMW->doc->addLayer(QString::null, true);
rebuildList();
markActiveLayer();
ScApp->changeLayer(ScApp->doc->activeLayer());
ScApp->slotDocCh();
ScMW->changeLayer(ScMW->doc->activeLayer());
ScMW->slotDocCh();
}
 
void LayerPalette::removeLayer()
{
int layerCount=ScApp->doc->layerCount();
int layerCount=ScMW->doc->layerCount();
if (layerCount < 2)
return;
int level = layerCount-1-Table->currentRow();
int layerNumber=ScApp->doc->layerNumberFromLevel(level);
int layerNumber=ScMW->doc->layerNumberFromLevel(level);
bool delToo = false;
if (ScApp->doc->layerContainsItems(layerNumber))
if (ScMW->doc->layerContainsItems(layerNumber))
{
int scmReturn=ScMessageBox::warning(this, tr("Delete Layer"),
tr("Do you want to delete all objects on this layer too?"),
204,41 → 204,41
delToo = true;
}
 
if (!ScApp->doc->deleteLayer(layerNumber, delToo))
if (!ScMW->doc->deleteLayer(layerNumber, delToo))
return;
rebuildList();
markActiveLayer();
ScApp->changeLayer(ScApp->doc->activeLayer());
ScApp->slotDocCh();
ScMW->changeLayer(ScMW->doc->activeLayer());
ScMW->slotDocCh();
}
 
void LayerPalette::upLayer()
{
int layerCount=ScApp->doc->layerCount();
int layerCount=ScMW->doc->layerCount();
if ((layerCount < 2) || (Table->currentRow() == 0))
return;
int layerLevel = layerCount-1-Table->currentRow();
ScApp->doc->raiseLayerByLevel(layerLevel);
ScMW->doc->raiseLayerByLevel(layerLevel);
rebuildList();
markActiveLayer();
ScApp->changeLayer(ScApp->doc->activeLayer());
ScMW->changeLayer(ScMW->doc->activeLayer());
emit LayerChanged();
ScApp->slotDocCh();
ScMW->slotDocCh();
}
 
void LayerPalette::downLayer()
{
int layerCount=ScApp->doc->layerCount();
int layerCount=ScMW->doc->layerCount();
if ((layerCount < 2) || (Table->currentRow() == static_cast<int>(layerCount) - 1))
return;
int layerLevel = layerCount-1-Table->currentRow();
ScApp->doc->lowerLayerByLevel(layerLevel);
ScMW->doc->lowerLayerByLevel(layerLevel);
rebuildList();
ScApp->changeLayer(ScApp->doc->activeLayer());
ScMW->changeLayer(ScMW->doc->activeLayer());
emit LayerChanged();
markActiveLayer();
ScApp->slotDocCh();
ScMW->slotDocCh();
}
 
void LayerPalette::changeName(int row, int col)
245,12 → 245,12
{
if (col == 2)
{
int layerLevel = ScApp->doc->layerCount()-1-row;
int layerNumber=ScApp->doc->layerNumberFromLevel(layerLevel);
int layerLevel = ScMW->doc->layerCount()-1-row;
int layerNumber=ScMW->doc->layerNumberFromLevel(layerLevel);
if (layerNumber!=-1)
{
if (ScApp->doc->changeLayerName(layerNumber, Table->text(row, col)))
ScApp->slotDocCh();
if (ScMW->doc->changeLayerName(layerNumber, Table->text(row, col)))
ScMW->slotDocCh();
}
}
}
258,15 → 258,15
void LayerPalette::visibleLayer()
{
int level = QString(sender()->name()).toInt();
int layerNumber=ScApp->doc->layerNumberFromLevel(level);
int layerNumber=ScMW->doc->layerNumberFromLevel(level);
if (layerNumber==-1)
return;
const QObject* senderBox=sender();
if (senderBox->isA("QCheckBox"))
{
ScApp->doc->setLayerVisible(layerNumber,((QCheckBox*)(senderBox))->isChecked());
ScMW->doc->setLayerVisible(layerNumber,((QCheckBox*)(senderBox))->isChecked());
emit LayerChanged();
ScApp->slotDocCh();
ScMW->slotDocCh();
}
}
 
273,14 → 273,14
void LayerPalette::printLayer()
{
int level = QString(sender()->name()).toInt();
int layerNumber=ScApp->doc->layerNumberFromLevel(level);
int layerNumber=ScMW->doc->layerNumberFromLevel(level);
if (layerNumber==-1)
return;
const QObject* senderBox=sender();
if (senderBox->isA("QCheckBox"))
{
ScApp->doc->setLayerPrintable(layerNumber,((QCheckBox*)(senderBox))->isChecked());
ScApp->slotDocCh();
ScMW->doc->setLayerPrintable(layerNumber,((QCheckBox*)(senderBox))->isChecked());
ScMW->slotDocCh();
}
}
 
289,17 → 289,17
disconnect(Table, SIGNAL(currentChanged(int, int)), this, SLOT(setActiveLayer(int)));
int layerToMark=layerNumber;
if (layerNumber==-1)
layerToMark=ScApp->doc->activeLayer();
Table->setCurrentCell(ScApp->doc->layerCount()-1-ScApp->doc->layerLevelFromNumber(layerToMark), 2);
layerToMark=ScMW->doc->activeLayer();
Table->setCurrentCell(ScMW->doc->layerCount()-1-ScMW->doc->layerLevelFromNumber(layerToMark), 2);
connect(Table, SIGNAL(currentChanged(int, int)), this, SLOT(setActiveLayer(int)));
}
 
void LayerPalette::setActiveLayer(int row)
{
int layerNumber=ScApp->doc->layerNumberFromLevel(ScApp->doc->layerCount()-1-row);
bool found=ScApp->doc->setActiveLayer(layerNumber);
int layerNumber=ScMW->doc->layerNumberFromLevel(ScMW->doc->layerCount()-1-row);
bool found=ScMW->doc->setActiveLayer(layerNumber);
if (found)
ScApp->changeLayer(ScApp->doc->activeLayer());
ScMW->changeLayer(ScMW->doc->activeLayer());
}
 
void LayerPalette::languageChange()
/branches/Version13x/Scribus/scribus/collect4output.h
5,7 → 5,7
#include <qmap.h>
 
class QString;
class ScribusApp;
class ScribusMainWindow;
class PrefsContext;
 
 
/branches/Version13x/Scribus/scribus/hruler.h
26,7 → 26,7
 
class ScribusView;
class ScribusDoc;
class ScribusApp;
class ScribusMainWindow;
class PrefsManager;
/**Waagrechtes Lineal
*@author Franz Schmid
/branches/Version13x/Scribus/scribus/keymanager.cpp
58,7 → 58,7
//Generate our list of entries in the key manager from the menu system
QStringList menuKeys;
ScApp->scrMenuMgr->generateKeyManList(&menuKeys);
ScMW->scrMenuMgr->generateKeyManList(&menuKeys);
uint currentRow=0;
for ( QStringList::Iterator it = menuKeys.begin(); it != menuKeys.end(); ++it )
{
82,7 → 82,7
//Add in non menu item ScrActions, make a list, sort and add
QStringList menuKeys2;
for( QMap<QString, QGuardedPtr<ScrAction> >::Iterator it = ScApp->scrActions.begin(); it!=ScApp->scrActions.end(); ++it )
for( QMap<QString, QGuardedPtr<ScrAction> >::Iterator it = ScMW->scrActions.begin(); it!=ScMW->scrActions.end(); ++it )
{
if (*it)
if (!menuKeys.contains(QString(it.key())))
/branches/Version13x/Scribus/scribus/scribusXml.cpp
108,28 → 108,28
doc->AddFont(tmpf);
}
}
int size = qRound(QStodouble(it->attribute("CSIZE")) * 10);
int size = qRound(it->attribute("CSIZE").toDouble() * 10);
QString fcolor = it->attribute("CCOLOR");
int extra;
if (it->hasAttribute("CEXTRA"))
extra = qRound(QStodouble(it->attribute("CEXTRA")) / QStodouble(it->attribute("CSIZE")) * 1000.0);
extra = qRound(it->attribute("CEXTRA").toDouble() / it->attribute("CSIZE").toDouble() * 1000.0);
else
extra = QStoInt(it->attribute("CKERN"));
int shade = QStoInt(it->attribute("CSHADE"));
int style = QStoInt(it->attribute("CSTYLE")) & 255;
int ab = QStoInt(it->attribute("CAB","0"));
extra = it->attribute("CKERN").toInt();
int shade = it->attribute("CSHADE").toInt();
int style = it->attribute("CSTYLE").toInt() & 255;
int ab = it->attribute("CAB", "0").toInt();
QString stroke = it->attribute("CSTROKE","None");
int shade2 = QStoInt(it->attribute("CSHADE2","100"));
int scale = qRound(QStodouble(it->attribute("CSCALE","100")) * 10);
int scalev = qRound(QStodouble(it->attribute("CSCALEV","100")) * 10);
int base = qRound(QStodouble(it->attribute("CBASE","0")) * 10);
int shX = qRound(QStodouble(it->attribute("CSHX","5")) * 10);
int shY = qRound(QStodouble(it->attribute("CSHY","-5")) * 10);
int outL = qRound(QStodouble(it->attribute("COUT","1")) * 10);
int ulp = qRound(QStodouble(it->attribute("CULP","-0.1")) * 10);
int ulw = qRound(QStodouble(it->attribute("CULW","-0.1")) * 10);
int stp = qRound(QStodouble(it->attribute("CSTP","-0.1")) * 10);
int stw = qRound(QStodouble(it->attribute("CSTW","-0.1")) * 10);
int shade2 = it->attribute("CSHADE2", "100").toInt();
int scale = qRound(it->attribute("CSCALE", "100").toDouble() * 10);
int scalev = qRound(it->attribute("CSCALEV", "100").toDouble() * 10);
int base = qRound(it->attribute("CBASE", "0").toDouble() * 10);
int shX = qRound(it->attribute("CSHX", "5").toDouble() * 10);
int shY = qRound(it->attribute("CSHY", "-5").toDouble() * 10);
int outL = qRound(it->attribute("COUT", "1").toDouble() * 10);
int ulp = qRound(it->attribute("CULP", "-0.1").toDouble() * 10);
int ulw = qRound(it->attribute("CULW", "-0.1").toDouble() * 10);
int stp = qRound(it->attribute("CSTP", "-0.1").toDouble() * 10);
int stw = qRound(it->attribute("CSTW", "-0.1").toDouble() * 10);
for (uint cxx=0; cxx<tmp2.length(); ++cxx)
{
hg = new ScText;
435,11 → 435,11
QDomElement MuL = MuLn.toElement();
struct SingleLine sl;
sl.Color = MuL.attribute("Color");
sl.Dash = QStoInt(MuL.attribute("Dash"));
sl.LineEnd = QStoInt(MuL.attribute("LineEnd"));
sl.LineJoin = QStoInt(MuL.attribute("LineJoin"));
sl.Shade = QStoInt(MuL.attribute("Shade"));
sl.Width = QStodouble(MuL.attribute("Width"));
sl.Dash = MuL.attribute("Dash").toInt();
sl.LineEnd = MuL.attribute("LineEnd").toInt();
sl.LineJoin = MuL.attribute("LineJoin").toInt();
sl.Shade = MuL.attribute("Shade").toInt();
sl.Width = MuL.attribute("Width").toDouble();
ml.push_back(sl);
MuLn = MuLn.nextSibling();
}
468,13 → 468,13
fou = false;
bool tabEQ = false;
vg->Vname = pg->attribute("NAME");
vg->LineSpaMode = QStoInt(pg->attribute("LINESPMode","0"));
vg->LineSpa = QStodouble(pg->attribute("LINESP"));
vg->Indent = QStodouble(pg->attribute("INDENT","0"));
vg->First = QStodouble(pg->attribute("FIRST","0"));
vg->textAlignment = QStoInt(pg->attribute("ALIGN"));
vg->gapBefore = QStodouble(pg->attribute("VOR","0"));
vg->gapAfter = QStodouble(pg->attribute("NACH","0"));
vg->LineSpaMode = pg->attribute("LINESPMode", "0").toInt();
vg->LineSpa = pg->attribute("LINESP").toDouble();
vg->Indent = pg->attribute("INDENT", "0").toDouble();
vg->First = pg->attribute("FIRST", "0").toDouble();
vg->textAlignment = pg->attribute("ALIGN").toInt();
vg->gapBefore = pg->attribute("VOR", "0").toDouble();
vg->gapAfter = pg->attribute("NACH", "0").toDouble();
tmpf = pg->attribute("FONT", doc->toolSettings.defFont);
if (tmpf.isEmpty())
tmpf = doc->toolSettings.defFont;
484,35 → 484,35
else
tmpf = DoFonts[tmf];
vg->Font = tmpf;
vg->FontSize = qRound(QStodouble(pg->attribute("FONTSIZE","12")) * 10.0);
vg->Drop = static_cast<bool>(QStoInt(pg->attribute("DROP","0")));
vg->DropLin = QStoInt(pg->attribute("DROPLIN","2"));
vg->DropDist = QStodouble(pg->attribute("DROPDIST","0"));
vg->FontEffect = QStoInt(pg->attribute("EFFECT","0"));
vg->FontSize = qRound(pg->attribute("FONTSIZE", "12").toDouble() * 10.0);
vg->Drop = static_cast<bool>(pg->attribute("DROP", "0").toInt());
vg->DropLin = pg->attribute("DROPLIN", "2").toInt();
vg->DropDist = pg->attribute("DROPDIST", "0").toDouble();
vg->FontEffect = pg->attribute("EFFECT", "0").toInt();
vg->FColor = pg->attribute("FCOLOR", doc->toolSettings.dBrush);
vg->FShade = QStoInt(pg->attribute("FSHADE", "100"));
vg->FShade = pg->attribute("FSHADE", "100").toInt();
vg->SColor = pg->attribute("SCOLOR", doc->toolSettings.dPen);
vg->SShade = QStoInt(pg->attribute("SSHADE", "100"));
vg->BaseAdj = static_cast<bool>(QStoInt(pg->attribute("BASE","0")));
vg->txtShadowX = qRound(QStodouble(pg->attribute("TXTSHX", "5")) * 10);
vg->txtShadowY = qRound(QStodouble(pg->attribute("TXTSHY", "-5")) * 10);
vg->txtOutline = qRound(QStodouble(pg->attribute("TXTOUT", "1")) * 10);
vg->txtUnderPos = qRound(QStodouble(pg->attribute("TXTULP", "-0.1")) * 10);
vg->txtUnderWidth = qRound(QStodouble(pg->attribute("TXTULW", "-0.1")) * 10);
vg->txtStrikePos = qRound(QStodouble(pg->attribute("TXTSTP", "-0.1")) * 10);
vg->txtStrikeWidth = qRound(QStodouble(pg->attribute("TXTSTW", "-0.1")) * 10);
vg->scaleH = qRound(QStodouble(pg->attribute("SCALEH", "100")) * 10);
vg->scaleV = qRound(QStodouble(pg->attribute("SCALEV", "100")) * 10);
vg->baseOff = qRound(QStodouble(pg->attribute("BASEO", "0")) * 10);
vg->kernVal = qRound(QStodouble(pg->attribute("KERN", "0")) * 10);
vg->SShade = pg->attribute("SSHADE", "100").toInt();
vg->BaseAdj = static_cast<bool>(pg->attribute("BASE", "0").toInt());
vg->txtShadowX = qRound(pg->attribute("TXTSHX", "5").toDouble() * 10);
vg->txtShadowY = qRound(pg->attribute("TXTSHY", "-5").toDouble() * 10);
vg->txtOutline = qRound(pg->attribute("TXTOUT", "1").toDouble() * 10);
vg->txtUnderPos = qRound(pg->attribute("TXTULP", "-0.1").toDouble() * 10);
vg->txtUnderWidth = qRound(pg->attribute("TXTULW", "-0.1").toDouble() * 10);
vg->txtStrikePos = qRound(pg->attribute("TXTSTP", "-0.1").toDouble() * 10);
vg->txtStrikeWidth = qRound(pg->attribute("TXTSTW", "-0.1").toDouble() * 10);
vg->scaleH = qRound(pg->attribute("SCALEH", "100").toDouble() * 10);
vg->scaleV = qRound(pg->attribute("SCALEV", "100").toDouble() * 10);
vg->baseOff = qRound(pg->attribute("BASEO", "0").toDouble() * 10);
vg->kernVal = qRound(pg->attribute("KERN", "0").toDouble() * 10);
vg->TabValues.clear();
if ((pg->hasAttribute("NUMTAB")) && (QStoInt(pg->attribute("NUMTAB","0")) != 0))
if ((pg->hasAttribute("NUMTAB")) && (pg->attribute("NUMTAB", "0").toInt() != 0))
{
struct PageItem::TabRecord tb;
QString tmp = pg->attribute("TABS");
QTextStream tgv(&tmp, IO_ReadOnly);
vg->TabValues.clear();
for (int cxv = 0; cxv < QStoInt(pg->attribute("NUMTAB","0")); cxv += 2)
for (int cxv = 0; cxv < pg->attribute("NUMTAB", "0").toInt(); cxv += 2)
{
tgv >> xf;
tgv >> xf2;
532,8 → 532,8
if (it.tagName()=="Tabs")
{
struct PageItem::TabRecord tb;
tb.tabPosition = QStodouble(it.attribute("Pos"));
tb.tabType = QStoInt(it.attribute("Type"));
tb.tabPosition = it.attribute("Pos").toDouble();
tb.tabType = it.attribute("Type").toInt();
QString tbCh = "";
tbCh = it.attribute("Fill","");
if (tbCh.isEmpty())
759,11 → 759,11
else
lf.fromQColor(QColor(pg.attribute("RGB")));
if (pg.hasAttribute("Spot"))
lf.setSpotColor(static_cast<bool>(QStoInt(pg.attribute("Spot"))));
lf.setSpotColor(static_cast<bool>(pg.attribute("Spot").toInt()));
else
lf.setSpotColor(false);
if (pg.hasAttribute("Register"))
lf.setRegistrationColor(static_cast<bool>(QStoInt(pg.attribute("Register"))));
lf.setRegistrationColor(static_cast<bool>(pg.attribute("Register").toInt()));
else
lf.setRegistrationColor(false);
Farben[pg.attribute("NAME")] = lf;
907,11 → 907,11
doc->JavaScripts[pg.attribute("NAME")] = pg.attribute("SCRIPT");
if(pg.tagName()=="LAYERS")
{
la.LNr = QStoInt(pg.attribute("NUMMER"));
la.Level = QStoInt(pg.attribute("LEVEL"));
la.LNr = pg.attribute("NUMMER").toInt();
la.Level = pg.attribute("LEVEL").toInt();
la.Name = pg.attribute("NAME");
la.isViewable = QStoInt(pg.attribute("SICHTBAR"));
la.isPrintable = QStoInt(pg.attribute("DRUCKEN"));
la.isViewable = pg.attribute("SICHTBAR").toInt();
la.isPrintable = pg.attribute("DRUCKEN").toInt();
bool laex = false;
uint layerCount=doc->layerCount();
for (uint la2 = 0; la2 < layerCount; ++la2)
937,14 → 937,14
bok.Title = pg.attribute("Title");
bok.Text = pg.attribute("Text");
bok.Aktion = pg.attribute("Aktion");
bok.ItemNr = QStoInt(pg.attribute("ItemNr"));
bok.Seite = QStoInt(pg.attribute("Seite"));
bok.Element = QStoInt(pg.attribute("Element"));
bok.First = QStoInt(pg.attribute("First"));
bok.Last = QStoInt(pg.attribute("Last"));
bok.Prev = QStoInt(pg.attribute("Prev"));
bok.Next = QStoInt(pg.attribute("Next"));
bok.Parent = QStoInt(pg.attribute("Parent"));
bok.ItemNr = pg.attribute("ItemNr").toInt();
bok.Seite = pg.attribute("Seite").toInt();
bok.Element = pg.attribute("Element").toInt();
bok.First = pg.attribute("First").toInt();
bok.Last = pg.attribute("Last").toInt();
bok.Prev = pg.attribute("Prev").toInt();
bok.Next = pg.attribute("Next").toInt();
bok.Parent = pg.attribute("Parent").toInt();
doc->BookMarks.append(bok);
}
if(pg.tagName()=="MultiLine")
956,11 → 956,11
QDomElement MuL = MuLn.toElement();
struct SingleLine sl;
sl.Color = MuL.attribute("Color");
sl.Dash = QStoInt(MuL.attribute("Dash"));
sl.LineEnd = QStoInt(MuL.attribute("LineEnd"));
sl.LineJoin = QStoInt(MuL.attribute("LineJoin"));
sl.Shade = QStoInt(MuL.attribute("Shade"));
sl.Width = QStodouble(MuL.attribute("Width"));
sl.Dash = MuL.attribute("Dash").toInt();
sl.LineEnd = MuL.attribute("LineEnd").toInt();
sl.LineJoin = MuL.attribute("LineJoin").toInt();
sl.Shade = MuL.attribute("Shade").toInt();
sl.Width = MuL.attribute("Width").toDouble();
ml.push_back(sl);
MuLn = MuLn.nextSibling();
}
974,7 → 974,7
}
doc->MLineStyles.insert(Nam2, ml);
}
if ((pg.tagName()=="PAGE") && (QStoInt(pg.attribute("NUM")) == PageToLoad))
if ((pg.tagName()=="PAGE") && (pg.attribute("NUM").toInt() == PageToLoad))
{
a = doc->currentPage->pageNr();
if ((pg.attribute("NAM", "").isEmpty()) && (Mpage))
984,7 → 984,7
}
if (Mpage)
{
doc->Pages->at(a)->LeftPg=QStoInt(pg.attribute("LEFT","0"));
doc->Pages->at(a)->LeftPg=pg.attribute("LEFT", "0").toInt();
doc->Pages->at(a)->setPageName(pg.attribute("NAM",""));
}
TableItems.clear();
992,12 → 992,12
/*
* Attribute von PAGE auslesen
*/
if ((pg.hasAttribute("NumVGuides")) && (QStoInt(pg.attribute("NumVGuides","0")) != 0))
if ((pg.hasAttribute("NumVGuides")) && (pg.attribute("NumVGuides", "0").toInt() != 0))
{
tmp = pg.attribute("VerticalGuides");
QTextStream fgv(&tmp, IO_ReadOnly);
doc->Pages->at(a)->YGuides.clear();
for (int cxv = 0; cxv < QStoInt(pg.attribute("NumVGuides","0")); ++cxv)
for (int cxv = 0; cxv < pg.attribute("NumVGuides", "0").toInt(); ++cxv)
{
fgv >> xf;
doc->Pages->at(a)->YGuides.append(xf);
1007,12 → 1007,12
}
else
doc->Pages->at(a)->YGuides.clear();
if ((pg.hasAttribute("NumHGuides")) && (QStoInt(pg.attribute("NumHGuides","0")) != 0))
if ((pg.hasAttribute("NumHGuides")) && (pg.attribute("NumHGuides", "0").toInt() != 0))
{
tmp = pg.attribute("HorizontalGuides");
QTextStream fgh(&tmp, IO_ReadOnly);
doc->Pages->at(a)->XGuides.clear();
for (int cxh = 0; cxh < QStoInt(pg.attribute("NumHGuides","0")); ++cxh)
for (int cxh = 0; cxh < pg.attribute("NumHGuides", "0").toInt(); ++cxh)
{
fgh >> xf;
doc->Pages->at(a)->XGuides.append(xf);
1031,9 → 1031,9
/*
* Attribute von OBJECT auslesen
*/
if ((QStoInt(obj.attribute("NEXTITEM")) != -1) && (QStoInt(obj.attribute("NEXTPAGE")) == PageToLoad))
if ((obj.attribute("NEXTITEM").toInt() != -1) && (obj.attribute("NEXTPAGE").toInt() == PageToLoad))
{
if (QStoInt(obj.attribute("BACKITEM")) == -1)
if (obj.attribute("BACKITEM").toInt() == -1)
{
Link.Start = counter;
Link.StPag = a;
1041,16 → 1041,16
}
}
GetItemProps(newVersion, &obj, &OB);
OB.Xpos = QStodouble(obj.attribute("XPOS"))+doc->Pages->at(a)->xOffset();
OB.Ypos=QStodouble(obj.attribute("YPOS"))+doc->Pages->at(a)->yOffset();
OB.Xpos = obj.attribute("XPOS").toDouble()+doc->Pages->at(a)->xOffset();
OB.Ypos=obj.attribute("YPOS").toDouble()+doc->Pages->at(a)->yOffset();
OB.NamedLStyle = obj.attribute("NAMEDLST", "");
if (!doc->MLineStyles.contains(OB.NamedLStyle))
OB.NamedLStyle = "";
OB.isBookmark=QStoInt(obj.attribute("BOOKMARK"));
OB.isBookmark=obj.attribute("BOOKMARK").toInt();
if ((OB.isBookmark) && (doc->BookMarks.count() == 0))
doc->OldBM = true;
OB.BMnr = QStoInt(obj.attribute("BookNr","0"));
OB.textAlignment = DoVorl[QStoInt(obj.attribute("ALIGN","0"))].toUInt();
OB.BMnr = obj.attribute("BookNr", "0").toInt();
OB.textAlignment = DoVorl[obj.attribute("ALIGN", "0").toInt()].toUInt();
tmpf = obj.attribute("IFONT", doc->toolSettings.defFont);
if (tmpf.isEmpty())
tmpf = doc->toolSettings.defFont;
1060,15 → 1060,15
else
tmpf = DoFonts[tmf];
OB.IFont = tmpf;
OB.LayerNr = layerTrans[QStoInt(obj.attribute("LAYER","0"))];
OB.LayerNr = layerTrans[obj.attribute("LAYER", "0").toInt()];
OB.Language = obj.attribute("LANGUAGE", doc->Language);
tmp = "";
if ((obj.hasAttribute("GROUPS")) && (QStoInt(obj.attribute("NUMGROUP","0")) != 0))
if ((obj.hasAttribute("GROUPS")) && (obj.attribute("NUMGROUP", "0").toInt() != 0))
{
tmp = obj.attribute("GROUPS");
QTextStream fg(&tmp, IO_ReadOnly);
OB.Groups.clear();
for (int cx = 0; cx < QStoInt(obj.attribute("NUMGROUP","0")); ++cx)
for (int cx = 0; cx < obj.attribute("NUMGROUP", "0").toInt(); ++cx)
{
fg >> x;
OB.Groups.push(x);
1084,9 → 1084,9
if (it.tagName()=="CSTOP")
{
QString name = it.attribute("NAME");
double ramp = QStodouble(it.attribute("RAMP","0.0"));
int shade = QStoInt(it.attribute("SHADE","100"));
double opa = QStodouble(it.attribute("TRANS","1"));
double ramp = it.attribute("RAMP", "0.0").toDouble();
int shade = it.attribute("SHADE", "100").toInt();
double opa = it.attribute("TRANS", "1").toDouble();
OB.fill_gradient.addStop(SetColor(doc, name, shade), ramp, 0.5, opa, name, shade);
OB.GrColor = "";
OB.GrColor2 = "";
1104,10 → 1104,10
GetItemText(&it, doc, VorLFound, true, Neu);
IT=IT.nextSibling();
}
if (QStoInt(obj.attribute("NEXTPAGE")) == PageToLoad)
if (obj.attribute("NEXTPAGE").toInt() == PageToLoad)
{
Neu->NextIt = baseobj + QStoInt(obj.attribute("NEXTITEM"));
Neu->NextPg = a; // QStoInt(obj.attribute("NEXTPAGE"));
Neu->NextIt = baseobj + obj.attribute("NEXTITEM").toInt();
Neu->NextPg = a; // obj.attribute("NEXTPAGE").toInt();
}
else
Neu->NextIt = -1;
1114,7 → 1114,7
if (Neu->isTableItem)
{
TableItems.append(Neu);
TableID.insert(QStoInt(obj.attribute("OwnLINK","0")), Neu->ItemNr);
TableID.insert(obj.attribute("OwnLINK", "0").toInt(), Neu->ItemNr);
}
counter++;
OBJ=OBJ.nextSibling();
1224,20 → 1224,20
* Attribute von DOCUMENT auslesen
*/
if (dc.hasAttribute("PAGEWIDTH"))
doc->pageWidth=QStodouble(dc.attribute("PAGEWIDTH"));
doc->pageWidth=dc.attribute("PAGEWIDTH").toDouble();
else
doc->pageWidth=QStodouble(dc.attribute("PAGEWITH"));
doc->pageHeight=QStodouble(dc.attribute("PAGEHEIGHT"));
doc->pageMargins.Left=QStodouble(dc.attribute("BORDERLEFT"));
doc->pageMargins.Right=QStodouble(dc.attribute("BORDERRIGHT"));
doc->pageMargins.Top=QStodouble(dc.attribute("BORDERTOP"));
doc->pageMargins.Bottom=QStodouble(dc.attribute("BORDERBOTTOM"));
doc->PageOri = QStoInt(dc.attribute("ORIENTATION","0"));
doc->pageWidth=dc.attribute("PAGEWITH").toDouble();
doc->pageHeight=dc.attribute("PAGEHEIGHT").toDouble();
doc->pageMargins.Left=dc.attribute("BORDERLEFT").toDouble();
doc->pageMargins.Right=dc.attribute("BORDERRIGHT").toDouble();
doc->pageMargins.Top=dc.attribute("BORDERTOP").toDouble();
doc->pageMargins.Bottom=dc.attribute("BORDERBOTTOM").toDouble();
doc->PageOri = dc.attribute("ORIENTATION", "0").toInt();
doc->PageSize = dc.attribute("PAGESIZE");
doc->FirstPnum = QStoInt(dc.attribute("FIRSTNUM","1"));
doc->currentPageLayout=QStoInt(dc.attribute("BOOK", "0"));
doc->FirstPnum = dc.attribute("FIRSTNUM", "1").toInt();
doc->currentPageLayout=dc.attribute("BOOK", "0").toInt();
int fp;
if (QStoInt(dc.attribute("FIRSTLEFT","0")) == 1)
if (dc.attribute("FIRSTLEFT", "0").toInt() == 1)
fp = 0;
else
fp = 1;
1244,10 → 1244,10
if (doc->currentPageLayout == 0)
fp = 0;
doc->pageSets[doc->currentPageLayout].FirstPage = fp;
doc->setUsesAutomaticTextFrames(QStoInt(dc.attribute("AUTOTEXT")));
doc->PageSp=QStoInt(dc.attribute("AUTOSPALTEN"));
doc->PageSpa=QStodouble(dc.attribute("ABSTSPALTEN"));
doc->setUnitIndex(QStoInt(dc.attribute("UNITS","0")));
doc->setUsesAutomaticTextFrames(dc.attribute("AUTOTEXT").toInt());
doc->PageSp=dc.attribute("AUTOSPALTEN").toInt();
doc->PageSpa=dc.attribute("ABSTSPALTEN").toDouble();
doc->setUnitIndex(dc.attribute("UNITS", "0").toInt());
doc->guidesSettings.gridShown = view->Prefs->guidesSettings.gridShown;
doc->guidesSettings.guidesShown = view->Prefs->guidesSettings.guidesShown;
doc->guidesSettings.framesShown = view->Prefs->guidesSettings.framesShown;
1257,7 → 1257,7
doc->guidesSettings.showPic = true;
doc->guidesSettings.showControls = false;
DoFonts.clear();
doc->toolSettings.defSize=qRound(QStodouble(dc.attribute("DSIZE")) * 10);
doc->toolSettings.defSize=qRound(dc.attribute("DSIZE").toDouble() * 10);
Defont=dc.attribute("DFONT");
if ((!avail.find(Defont)) || (!avail[Defont]->UseFont))
{
1274,8 → 1274,8
}
}
doc->toolSettings.defFont = Defont;
doc->toolSettings.dCols=QStoInt(dc.attribute("DCOL", "1"));
doc->toolSettings.dGap=QStodouble(dc.attribute("DGAP", "0.0"));
doc->toolSettings.dCols=dc.attribute("DCOL", "1").toInt();
doc->toolSettings.dGap=dc.attribute("DGAP", "0.0").toDouble();
doc->documentInfo.setAuthor(dc.attribute("AUTHOR"));
doc->documentInfo.setComments(dc.attribute("COMMENTS"));
doc->documentInfo.setKeywords(dc.attribute("KEYWORDS",""));
1291,38 → 1291,38
doc->documentInfo.setCover(dc.attribute("DOCCOVER", ""));
doc->documentInfo.setRights(dc.attribute("DOCRIGHTS", ""));
doc->documentInfo.setContrib(dc.attribute("DOCCONTRIB", ""));
doc->typographicSettings.valueSuperScript = QStoInt(dc.attribute("VHOCH"));
doc->typographicSettings.scalingSuperScript = QStoInt(dc.attribute("VHOCHSC"));
doc->typographicSettings.valueSubScript = QStoInt(dc.attribute("VTIEF"));
doc->typographicSettings.scalingSubScript = QStoInt(dc.attribute("VTIEFSC"));
doc->typographicSettings.valueSmallCaps = QStoInt(dc.attribute("VKAPIT"));
doc->typographicSettings.valueBaseGrid = QStodouble(dc.attribute("BASEGRID", "12"));
doc->typographicSettings.offsetBaseGrid = QStodouble(dc.attribute("BASEO", "0"));
doc->typographicSettings.autoLineSpacing = QStoInt(dc.attribute("AUTOL","20"));
doc->GroupCounter=QStoInt(dc.attribute("GROUPC","1"));
doc->HasCMS = static_cast<bool>(QStoInt(dc.attribute("HCMS","0")));
doc->CMSSettings.SoftProofOn = static_cast<bool>(QStoInt(dc.attribute("DPSo","0")));
doc->CMSSettings.CMSinUse = static_cast<bool>(QStoInt(dc.attribute("DPuse","0")));
doc->CMSSettings.GamutCheck = static_cast<bool>(QStoInt(dc.attribute("DPgam","0")));
doc->CMSSettings.BlackPoint = static_cast<bool>(QStoInt(dc.attribute("DPbla","1")));
doc->typographicSettings.valueSuperScript = dc.attribute("VHOCH").toInt();
doc->typographicSettings.scalingSuperScript = dc.attribute("VHOCHSC").toInt();
doc->typographicSettings.valueSubScript = dc.attribute("VTIEF").toInt();
doc->typographicSettings.scalingSubScript = dc.attribute("VTIEFSC").toInt();
doc->typographicSettings.valueSmallCaps = dc.attribute("VKAPIT").toInt();
doc->typographicSettings.valueBaseGrid = dc.attribute("BASEGRID", "12").toDouble();
doc->typographicSettings.offsetBaseGrid = dc.attribute("BASEO", "0").toDouble();
doc->typographicSettings.autoLineSpacing = dc.attribute("AUTOL", "20").toInt();
doc->GroupCounter=dc.attribute("GROUPC", "1").toInt();
doc->HasCMS = static_cast<bool>(dc.attribute("HCMS", "0").toInt());
doc->CMSSettings.SoftProofOn = static_cast<bool>(dc.attribute("DPSo", "0").toInt());
doc->CMSSettings.CMSinUse = static_cast<bool>(dc.attribute("DPuse", "0").toInt());
doc->CMSSettings.GamutCheck = static_cast<bool>(dc.attribute("DPgam", "0").toInt());
doc->CMSSettings.BlackPoint = static_cast<bool>(dc.attribute("DPbla", "1").toInt());
doc->CMSSettings.DefaultMonitorProfile = dc.attribute("DPMo","");
doc->CMSSettings.DefaultPrinterProfile = dc.attribute("DPPr","");
doc->CMSSettings.DefaultImageRGBProfile = dc.attribute("DPIn","");
doc->CMSSettings.DefaultSolidColorProfile = dc.attribute("DPIn2","");
doc->CMSSettings.DefaultIntentPrinter = QStoInt(dc.attribute("DIPr","0"));
doc->CMSSettings.DefaultIntentMonitor = QStoInt(dc.attribute("DIMo","1"));
doc->CMSSettings.DefaultIntentImages = QStoInt(dc.attribute("DIMo2","1"));
activeLayer = QStoInt(dc.attribute("ALAYER","0"));
doc->CMSSettings.DefaultIntentPrinter = dc.attribute("DIPr", "0").toInt();
doc->CMSSettings.DefaultIntentMonitor = dc.attribute("DIMo", "1").toInt();
doc->CMSSettings.DefaultIntentImages = dc.attribute("DIMo2", "1").toInt();
activeLayer = dc.attribute("ALAYER", "0").toInt();
doc->Language = dc.attribute("LANGUAGE", "");
doc->MinWordLen = QStoInt(dc.attribute("MINWORDLEN", "3"));
doc->HyCount = QStoInt(dc.attribute("HYCOUNT", "2"));
doc->Automatic = static_cast<bool>(QStoInt(dc.attribute("AUTOMATIC", "1")));
doc->AutoCheck = static_cast<bool>(QStoInt(dc.attribute("AUTOCHECK", "0")));
doc->GuideLock = static_cast<bool>(QStoInt(dc.attribute("GUIDELOCK", "0")));
doc->SnapGuides = static_cast<bool>(QStoInt(dc.attribute("SnapToGuides","0")));
doc->useRaster = static_cast<bool>(QStoInt(dc.attribute("SnapToGrid","0")));
doc->guidesSettings.minorGrid = QStodouble(dc.attribute("MINGRID", tmp.setNum(view->Prefs->guidesSettings.minorGrid)));
doc->guidesSettings.majorGrid = QStodouble(dc.attribute("MAJGRID", tmp.setNum(view->Prefs->guidesSettings.majorGrid)));
doc->MinWordLen = dc.attribute("MINWORDLEN", "3").toInt();
doc->HyCount = dc.attribute("HYCOUNT", "2").toInt();
doc->Automatic = static_cast<bool>(dc.attribute("AUTOMATIC", "1").toInt());
doc->AutoCheck = static_cast<bool>(dc.attribute("AUTOCHECK", "0").toInt());
doc->GuideLock = static_cast<bool>(dc.attribute("GUIDELOCK", "0").toInt());
doc->SnapGuides = static_cast<bool>(dc.attribute("SnapToGuides", "0").toInt());
doc->useRaster = static_cast<bool>(dc.attribute("SnapToGrid", "0").toInt());
doc->guidesSettings.minorGrid = dc.attribute("MINGRID", tmp.setNum(view->Prefs->guidesSettings.minorGrid)).toDouble();
doc->guidesSettings.majorGrid = dc.attribute("MAJGRID", tmp.setNum(view->Prefs->guidesSettings.majorGrid)).toDouble();
doc->toolSettings.dStartArrow = 0;
doc->toolSettings.dEndArrow = 0;
doc->LastAuto = 0;
1345,13 → 1345,13
if(pg.tagName()=="STYLE")
{
vg.Vname = pg.attribute("NAME");
vg.LineSpaMode = QStoInt(pg.attribute("LINESPMode","0"));
vg.LineSpa = QStodouble(pg.attribute("LINESP"));
vg.Indent = QStodouble(pg.attribute("INDENT","0"));
vg.First = QStodouble(pg.attribute("FIRST","0"));
vg.textAlignment = QStoInt(pg.attribute("ALIGN"));
vg.gapBefore = QStodouble(pg.attribute("VOR","0"));
vg.gapAfter = QStodouble(pg.attribute("NACH","0"));
vg.LineSpaMode = pg.attribute("LINESPMode", "0").toInt();
vg.LineSpa = pg.attribute("LINESP").toDouble();
vg.Indent = pg.attribute("INDENT", "0").toDouble();
vg.First = pg.attribute("FIRST", "0").toDouble();
vg.textAlignment = pg.attribute("ALIGN").toInt();
vg.gapBefore = pg.attribute("VOR", "0").toDouble();
vg.gapAfter = pg.attribute("NACH", "0").toDouble();
tmpf = pg.attribute("FONT", doc->toolSettings.defFont);
if ((!avail.find(tmpf)) || (!avail[tmpf]->UseFont))
{
1373,16 → 1373,16
}
}
vg.Font = tmpf;
vg.FontSize = qRound(QStodouble(pg.attribute("FONTSIZE","12")) * 10.0);
vg.Drop = static_cast<bool>(QStoInt(pg.attribute("DROP","0")));
vg.DropLin = QStoInt(pg.attribute("DROPLIN","2"));
vg.DropDist = QStodouble(pg.attribute("DROPDIST","0"));
vg.FontEffect = QStoInt(pg.attribute("EFFECT","0"));
vg.FontSize = qRound(pg.attribute("FONTSIZE", "12").toDouble() * 10.0);
vg.Drop = static_cast<bool>(pg.attribute("DROP", "0").toInt());
vg.DropLin = pg.attribute("DROPLIN", "2").toInt();
vg.DropDist = pg.attribute("DROPDIST", "0").toDouble();
vg.FontEffect = pg.attribute("EFFECT", "0").toInt();
vg.FColor = pg.attribute("FCOLOR", doc->toolSettings.dBrush);
vg.FShade = QStoInt(pg.attribute("FSHADE","100"));
vg.FShade = pg.attribute("FSHADE", "100").toInt();
vg.SColor = pg.attribute("SCOLOR", doc->toolSettings.dPen);
vg.SShade = QStoInt(pg.attribute("SSHADE","100"));
vg.BaseAdj = static_cast<bool>(QStoInt(pg.attribute("BASE","0")));
vg.SShade = pg.attribute("SSHADE", "100").toInt();
vg.BaseAdj = static_cast<bool>(pg.attribute("BASE", "0").toInt());
vg.txtShadowX = 50;
vg.txtShadowY = -50;
vg.txtOutline = 10;
1394,13 → 1394,13
vg.scaleV = 1000;
vg.baseOff = 0;
vg.kernVal = 0;
if ((pg.hasAttribute("NUMTAB")) && (QStoInt(pg.attribute("NUMTAB","0")) != 0))
if ((pg.hasAttribute("NUMTAB")) && (pg.attribute("NUMTAB", "0").toInt() != 0))
{
tmp = pg.attribute("TABS");
QTextStream tgv(&tmp, IO_ReadOnly);
vg.TabValues.clear();
struct PageItem::TabRecord tb;
for (int cxv = 0; cxv < QStoInt(pg.attribute("NUMTAB","0")); cxv += 2)
for (int cxv = 0; cxv < pg.attribute("NUMTAB", "0").toInt(); cxv += 2)
{
tgv >> xf;
tgv >> xf2;
1419,11 → 1419,11
doc->JavaScripts[pg.attribute("NAME")] = pg.attribute("SCRIPT");
if(pg.tagName()=="LAYERS")
{
la.LNr = QStoInt(pg.attribute("NUMMER"));
la.Level = QStoInt(pg.attribute("LEVEL"));
la.LNr = pg.attribute("NUMMER").toInt();
la.Level = pg.attribute("LEVEL").toInt();
la.Name = pg.attribute("NAME");
la.isViewable = QStoInt(pg.attribute("SICHTBAR"));
la.isPrintable = QStoInt(pg.attribute("DRUCKEN"));
la.isViewable = pg.attribute("SICHTBAR").toInt();
la.isPrintable = pg.attribute("DRUCKEN").toInt();
doc->Layers.append(la);
}
if(pg.tagName()=="Bookmark")
1431,14 → 1431,14
bok.Title = pg.attribute("Title");
bok.Text = pg.attribute("Text");
bok.Aktion = pg.attribute("Aktion");
bok.ItemNr = QStoInt(pg.attribute("ItemNr"));
bok.Seite = QStoInt(pg.attribute("Seite"));
bok.Element = QStoInt(pg.attribute("Element"));
bok.First = QStoInt(pg.attribute("First"));
bok.Last = QStoInt(pg.attribute("Last"));
bok.Prev = QStoInt(pg.attribute("Prev"));
bok.Next = QStoInt(pg.attribute("Next"));
bok.Parent = QStoInt(pg.attribute("Parent"));
bok.ItemNr = pg.attribute("ItemNr").toInt();
bok.Seite = pg.attribute("Seite").toInt();
bok.Element = pg.attribute("Element").toInt();
bok.First = pg.attribute("First").toInt();
bok.Last = pg.attribute("Last").toInt();
bok.Prev = pg.attribute("Prev").toInt();
bok.Next = pg.attribute("Next").toInt();
bok.Parent = pg.attribute("Parent").toInt();
doc->BookMarks.append(bok);
}
if(pg.tagName()=="MultiLine")
1450,11 → 1450,11
QDomElement MuL = MuLn.toElement();
struct SingleLine sl;
sl.Color = MuL.attribute("Color");
sl.Dash = QStoInt(MuL.attribute("Dash"));
sl.LineEnd = QStoInt(MuL.attribute("LineEnd"));
sl.LineJoin = QStoInt(MuL.attribute("LineJoin"));
sl.Shade = QStoInt(MuL.attribute("Shade"));
sl.Width = QStodouble(MuL.attribute("Width"));
sl.Dash = MuL.attribute("Dash").toInt();
sl.LineEnd = MuL.attribute("LineEnd").toInt();
sl.LineJoin = MuL.attribute("LineJoin").toInt();
sl.Shade = MuL.attribute("Shade").toInt();
sl.Width = MuL.attribute("Width").toDouble();
ml.push_back(sl);
MuLn = MuLn.nextSibling();
}
1467,7 → 1467,7
/*
* Attribute von PAGE auslesen
*/
a = QStoInt(pg.attribute("NUM"));
a = pg.attribute("NUM").toInt();
PgNam = "";
PgNam = pg.attribute("NAM", "");
QString Mus = "";
1492,14 → 1492,14
//1.2.x docs!
view->addPage(a);
//emit NewPage(a);
doc->Pages->at(a)->LeftPg=QStoInt(pg.attribute("LEFT","0"));
doc->Pages->at(a)->LeftPg=pg.attribute("LEFT", "0").toInt();
 
if ((pg.hasAttribute("NumVGuides")) && (QStoInt(pg.attribute("NumVGuides","0")) != 0))
if ((pg.hasAttribute("NumVGuides")) && (pg.attribute("NumVGuides", "0").toInt() != 0))
{
tmp = pg.attribute("VerticalGuides");
QTextStream fgv(&tmp, IO_ReadOnly);
doc->Pages->at(a)->YGuides.clear();
for (int cxv = 0; cxv < QStoInt(pg.attribute("NumVGuides","0")); ++cxv)
for (int cxv = 0; cxv < pg.attribute("NumVGuides", "0").toInt(); ++cxv)
{
fgv >> xf;
doc->Pages->at(a)->YGuides.append(xf);
1509,12 → 1509,12
}
else
doc->Pages->at(a)->YGuides.clear();
if ((pg.hasAttribute("NumHGuides")) && (QStoInt(pg.attribute("NumHGuides","0")) != 0))
if ((pg.hasAttribute("NumHGuides")) && (pg.attribute("NumHGuides", "0").toInt() != 0))
{
tmp = pg.attribute("HorizontalGuides");
QTextStream fgh(&tmp, IO_ReadOnly);
doc->Pages->at(a)->XGuides.clear();
for (int cxh = 0; cxh < QStoInt(pg.attribute("NumHGuides","0")); ++cxh)
for (int cxh = 0; cxh < pg.attribute("NumHGuides", "0").toInt(); ++cxh)
{
fgh >> xf;
doc->Pages->at(a)->XGuides.append(xf);
1531,9 → 1531,9
/*
* Attribute von OBJECT auslesen
*/
if ((QStoInt(obj.attribute("NEXTITEM")) != -1) || (static_cast<bool>(QStoInt(obj.attribute("AUTOTEXT")))))
if ((obj.attribute("NEXTITEM").toInt() != -1) || (static_cast<bool>(obj.attribute("AUTOTEXT").toInt())))
{
if (QStoInt(obj.attribute("BACKITEM")) == -1)
if (obj.attribute("BACKITEM").toInt() == -1)
{
Link.Start = counter;
Link.StPag = a;
1541,14 → 1541,14
}
}
GetItemProps(newVersion, &obj, &OB);
OB.Xpos = QStodouble(obj.attribute("XPOS"))+doc->Pages->at(a)->xOffset();
OB.Ypos=QStodouble(obj.attribute("YPOS"))+doc->Pages->at(a)->yOffset();
OB.Xpos = obj.attribute("XPOS").toDouble()+doc->Pages->at(a)->xOffset();
OB.Ypos=obj.attribute("YPOS").toDouble()+doc->Pages->at(a)->yOffset();
OB.NamedLStyle = obj.attribute("NAMEDLST", "");
OB.isBookmark=QStoInt(obj.attribute("BOOKMARK"));
OB.isBookmark=obj.attribute("BOOKMARK").toInt();
if ((OB.isBookmark) && (doc->BookMarks.count() == 0))
doc->OldBM = true;
OB.BMnr = QStoInt(obj.attribute("BookNr","0"));
OB.textAlignment = QStoInt(obj.attribute("ALIGN","0"));
OB.BMnr = obj.attribute("BookNr", "0").toInt();
OB.textAlignment = obj.attribute("ALIGN", "0").toInt();
OB.startArrowIndex = 0;
OB.endArrowIndex = 0;
tmpf = obj.attribute("IFONT", doc->toolSettings.defFont);
1572,15 → 1572,15
}
}
OB.IFont = tmpf;
OB.LayerNr = QStoInt(obj.attribute("LAYER","0"));
OB.LayerNr = obj.attribute("LAYER", "0").toInt();
OB.Language = obj.attribute("LANGUAGE", doc->Language);
tmp = "";
if ((obj.hasAttribute("GROUPS")) && (QStoInt(obj.attribute("NUMGROUP","0")) != 0))
if ((obj.hasAttribute("GROUPS")) && (obj.attribute("NUMGROUP", "0").toInt() != 0))
{
tmp = obj.attribute("GROUPS");
QTextStream fg(&tmp, IO_ReadOnly);
OB.Groups.clear();
for (int cx = 0; cx < QStoInt(obj.attribute("NUMGROUP","0")); ++cx)
for (int cx = 0; cx < obj.attribute("NUMGROUP", "0").toInt(); ++cx)
{
fg >> x;
OB.Groups.push(x);
1596,9 → 1596,9
if (it.tagName()=="CSTOP")
{
QString name = it.attribute("NAME");
double ramp = QStodouble(it.attribute("RAMP","0.0"));
int shade = QStoInt(it.attribute("SHADE","100"));
double opa = QStodouble(it.attribute("TRANS","1"));
double ramp = it.attribute("RAMP", "0.0").toDouble();
int shade = it.attribute("SHADE", "100").toInt();
double opa = it.attribute("TRANS", "1").toDouble();
OB.fill_gradient.addStop(SetColor(doc, name, shade), ramp, 0.5, opa, name, shade);
OB.GrColor = "";
OB.GrColor2 = "";
1624,15 → 1624,15
GetItemText(&it, doc, false, false, Neu);
IT=IT.nextSibling();
}
Neu->isAutoText=static_cast<bool>(QStoInt(obj.attribute("AUTOTEXT")));
Neu->isAutoText=static_cast<bool>(obj.attribute("AUTOTEXT").toInt());
if (Neu->isAutoText)
doc->LastAuto = Neu;
Neu->NextIt = QStoInt(obj.attribute("NEXTITEM"));
Neu->NextPg = QStoInt(obj.attribute("NEXTPAGE"));
Neu->NextIt = obj.attribute("NEXTITEM").toInt();
Neu->NextPg = obj.attribute("NEXTPAGE").toInt();
if (Neu->isTableItem)
{
TableItems.append(Neu);
TableID.insert(QStoInt(obj.attribute("OwnLINK","0")), Neu->ItemNr);
TableID.insert(obj.attribute("OwnLINK", "0").toInt(), Neu->ItemNr);
}
counter++;
OBJ=OBJ.nextSibling();
1669,52 → 1669,52
QDomElement pg=PAGE.toElement();
if(pg.tagName()=="PDF")
{
doc->PDF_Options.Articles = static_cast<bool>(QStoInt(pg.attribute("Articles")));
doc->PDF_Options.Thumbnails = static_cast<bool>(QStoInt(pg.attribute("Thumbnails")));
doc->PDF_Options.Compress = static_cast<bool>(QStoInt(pg.attribute("Compress")));
doc->PDF_Options.CompressMethod = QStoInt(pg.attribute("CMethod","0"));
doc->PDF_Options.Quality = QStoInt(pg.attribute("Quality","0"));
doc->PDF_Options.RecalcPic = static_cast<bool>(QStoInt(pg.attribute("RecalcPic")));
doc->PDF_Options.Bookmarks = static_cast<bool>(QStoInt(pg.attribute("Bookmarks")));
doc->PDF_Options.Articles = static_cast<bool>(pg.attribute("Articles").toInt());
doc->PDF_Options.Thumbnails = static_cast<bool>(pg.attribute("Thumbnails").toInt());
doc->PDF_Options.Compress = static_cast<bool>(pg.attribute("Compress").toInt());
doc->PDF_Options.CompressMethod = pg.attribute("CMethod", "0").toInt();
doc->PDF_Options.Quality = pg.attribute("Quality", "0").toInt();
doc->PDF_Options.RecalcPic = static_cast<bool>(pg.attribute("RecalcPic").toInt());
doc->PDF_Options.Bookmarks = static_cast<bool>(pg.attribute("Bookmarks").toInt());
if (pg.hasAttribute("MirrorH"))
doc->PDF_Options.MirrorH = static_cast<bool>(QStoInt(pg.attribute("MirrorH")));
doc->PDF_Options.MirrorH = static_cast<bool>(pg.attribute("MirrorH").toInt());
else
doc->PDF_Options.MirrorH = false;
if (pg.hasAttribute("MirrorV"))
doc->PDF_Options.MirrorV = static_cast<bool>(QStoInt(pg.attribute("MirrorV")));
doc->PDF_Options.MirrorV = static_cast<bool>(pg.attribute("MirrorV").toInt());
else
doc->PDF_Options.MirrorV = false;
if (pg.hasAttribute("RotateDeg"))
doc->PDF_Options.RotateDeg = QStoInt(pg.attribute("RotateDeg","0"));
doc->PDF_Options.RotateDeg = pg.attribute("RotateDeg", "0").toInt();
else
doc->PDF_Options.RotateDeg = 0;
doc->PDF_Options.PresentMode = static_cast<bool>(QStoInt(pg.attribute("PresentMode")));
doc->PDF_Options.PicRes = QStoInt(pg.attribute("PicRes"));
doc->PDF_Options.Version = (PDFOptions::PDFVersion)QStoInt(pg.attribute("Version"));
doc->PDF_Options.Resolution = QStoInt(pg.attribute("Resolution"));
doc->PDF_Options.Binding = QStoInt(pg.attribute("Binding"));
doc->PDF_Options.PresentMode = static_cast<bool>(pg.attribute("PresentMode").toInt());
doc->PDF_Options.PicRes = pg.attribute("PicRes").toInt();
doc->PDF_Options.Version = (PDFOptions::PDFVersion)pg.attribute("Version").toInt();
doc->PDF_Options.Resolution = pg.attribute("Resolution").toInt();
doc->PDF_Options.Binding = pg.attribute("Binding").toInt();
doc->PDF_Options.Datei = "";
doc->PDF_Options.isGrayscale = false;
doc->PDF_Options.UseRGB = static_cast<bool>(QStoInt(pg.attribute("RGBMode","0")));
doc->PDF_Options.UseProfiles = static_cast<bool>(QStoInt(pg.attribute("UseProfiles","0")));
doc->PDF_Options.UseProfiles2 = static_cast<bool>(QStoInt(pg.attribute("UseProfiles2","0")));
doc->PDF_Options.Intent = QStoInt(pg.attribute("Intent","1"));
doc->PDF_Options.Intent2 = QStoInt(pg.attribute("Intent2","1"));
doc->PDF_Options.UseRGB = static_cast<bool>(pg.attribute("RGBMode", "0").toInt());
doc->PDF_Options.UseProfiles = static_cast<bool>(pg.attribute("UseProfiles", "0").toInt());
doc->PDF_Options.UseProfiles2 = static_cast<bool>(pg.attribute("UseProfiles2", "0").toInt());
doc->PDF_Options.Intent = pg.attribute("Intent", "1").toInt();
doc->PDF_Options.Intent2 = pg.attribute("Intent2", "1").toInt();
doc->PDF_Options.SolidProf = pg.attribute("SolidP", "");
doc->PDF_Options.ImageProf = pg.attribute("ImageP", "");
doc->PDF_Options.PrintProf = pg.attribute("PrintP", "");
doc->PDF_Options.Info = pg.attribute("InfoString", "");
doc->PDF_Options.BleedTop = QStodouble(pg.attribute("BTop","0"));
doc->PDF_Options.BleedLeft = QStodouble(pg.attribute("BLeft","0"));
doc->PDF_Options.BleedRight = QStodouble(pg.attribute("BRight","0"));
doc->PDF_Options.BleedBottom = QStodouble(pg.attribute("BBottom","0"));
doc->PDF_Options.EmbeddedI = static_cast<bool>(QStoInt(pg.attribute("ImagePr","0")));
doc->PDF_Options.BleedTop = pg.attribute("BTop", "0").toDouble();
doc->PDF_Options.BleedLeft = pg.attribute("BLeft", "0").toDouble();
doc->PDF_Options.BleedRight = pg.attribute("BRight", "0").toDouble();
doc->PDF_Options.BleedBottom = pg.attribute("BBottom", "0").toDouble();
doc->PDF_Options.EmbeddedI = static_cast<bool>(pg.attribute("ImagePr", "0").toInt());
doc->PDF_Options.PassOwner = pg.attribute("PassOwner", "");
doc->PDF_Options.PassUser = pg.attribute("PassUser", "");
doc->PDF_Options.Permissions = QStoInt(pg.attribute("Permissions","-4"));
doc->PDF_Options.Encrypt = static_cast<bool>(QStoInt(pg.attribute("Encrypt","0")));
doc->PDF_Options.useLayers = static_cast<bool>(QStoInt(pg.attribute("UseLayers","0")));
doc->PDF_Options.UseLPI = static_cast<bool>(QStoInt(pg.attribute("UseLpi","0")));
doc->PDF_Options.Permissions = pg.attribute("Permissions", "-4").toInt();
doc->PDF_Options.Encrypt = static_cast<bool>(pg.attribute("Encrypt", "0").toInt());
doc->PDF_Options.useLayers = static_cast<bool>(pg.attribute("UseLayers", "0").toInt());
doc->PDF_Options.UseLPI = static_cast<bool>(pg.attribute("UseLpi", "0").toInt());
doc->PDF_Options.UseSpotColors = true;
doc->PDF_Options.doMultiFile = false;
QDomNode PFO = PAGE.firstChild();
1724,9 → 1724,9
if(pdfF.tagName() == "LPI")
{
struct LPIData lpo;
lpo.Angle = QStoInt(pdfF.attribute("Angle"));
lpo.Frequency = QStoInt(pdfF.attribute("Frequency"));
lpo.SpotFunc = QStoInt(pdfF.attribute("SpotFunction"));
lpo.Angle = pdfF.attribute("Angle").toInt();
lpo.Frequency = pdfF.attribute("Frequency").toInt();
lpo.SpotFunc = pdfF.attribute("SpotFunction").toInt();
doc->PDF_Options.LPISettings[pdfF.attribute("Color")] = lpo;
}
if(pdfF.tagName() == "Fonts")
1742,12 → 1742,12
if(pdfF.tagName() == "Effekte")
{
struct PDFPresentationData ef;
ef.pageEffectDuration = QStoInt(pdfF.attribute("pageEffectDuration"));
ef.pageViewDuration = QStoInt(pdfF.attribute("pageViewDuration"));
ef.effectType = QStoInt(pdfF.attribute("effectType"));
ef.Dm = QStoInt(pdfF.attribute("Dm"));
ef.M = QStoInt(pdfF.attribute("M"));
ef.Di = QStoInt(pdfF.attribute("Di"));
ef.pageEffectDuration = pdfF.attribute("pageEffectDuration").toInt();
ef.pageViewDuration = pdfF.attribute("pageViewDuration").toInt();
ef.effectType = pdfF.attribute("effectType").toInt();
ef.Dm = pdfF.attribute("Dm").toInt();
ef.M = pdfF.attribute("M").toInt();
ef.Di = pdfF.attribute("Di").toInt();
doc->PDF_Options.PresentVals.append(ef);
}
PFO = PFO.nextSibling();
1842,10 → 1842,10
QDomElement elem=docu.documentElement();
if ((elem.tagName() != "SCRIBUSELEM") && (elem.tagName() != "SCRIBUSELEMUTF8"))
return false;
*x = QStodouble(elem.attribute("XP"));
*y = QStodouble(elem.attribute("YP"));
*w = QStodouble(elem.attribute("W","0"));
*h = QStodouble(elem.attribute("H","0"));
*x = elem.attribute("XP").toDouble();
*y = elem.attribute("YP").toDouble();
*w = elem.attribute("W", "0").toDouble();
*h = elem.attribute("H", "0").toDouble();
return true;
}
 
1897,8 → 1897,8
}
else
{
GrX = QStodouble(elem.attribute("XP"));
GrY = QStodouble(elem.attribute("YP"));
GrX = elem.attribute("XP").toDouble();
GrY = elem.attribute("YP").toDouble();
}
if (elem.hasAttribute("Version"))
newVersion = true;
1923,7 → 1923,7
QDomElement pg=DOC.toElement();
if(pg.tagName()=="Arrows")
{
if (QStoInt(pg.attribute("Index")) > startNumArrows)
if (pg.attribute("Index").toInt() > startNumArrows)
{
struct ArrowDesc arrow;
double xa, ya;
1938,10 → 1938,10
arrow.points.addPoint(xa, ya);
}
doc->arrowStyles.append(arrow);
arrowID.insert(QStoInt(pg.attribute("Index")), doc->arrowStyles.count());
arrowID.insert(pg.attribute("Index").toInt(), doc->arrowStyles.count());
}
else
arrowID.insert(QStoInt(pg.attribute("Index")), QStoInt(pg.attribute("Index")));
arrowID.insert(pg.attribute("Index").toInt(), pg.attribute("Index").toInt());
}
if(pg.tagName()=="FONT")
{
1988,11 → 1988,11
QDomElement MuL = MuLn.toElement();
struct SingleLine sl;
sl.Color = MuL.attribute("Color");
sl.Dash = QStoInt(MuL.attribute("Dash"));
sl.LineEnd = QStoInt(MuL.attribute("LineEnd"));
sl.LineJoin = QStoInt(MuL.attribute("LineJoin"));
sl.Shade = QStoInt(MuL.attribute("Shade"));
sl.Width = QStodouble(MuL.attribute("Width"));
sl.Dash = MuL.attribute("Dash").toInt();
sl.LineEnd = MuL.attribute("LineEnd").toInt();
sl.LineJoin = MuL.attribute("LineJoin").toInt();
sl.Shade = MuL.attribute("Shade").toInt();
sl.Width = MuL.attribute("Width").toDouble();
ml.push_back(sl);
MuLn = MuLn.nextSibling();
}
2013,16 → 2013,16
if(pg.tagName()=="ITEM")
{
GetItemProps(newVersion, &pg, &OB);
OB.Xpos = Xp + QStodouble(pg.attribute("XPOS")) - GrX;
OB.Ypos = Yp + QStodouble(pg.attribute("YPOS")) - GrY;
OB.startArrowIndex = arrowID[QStoInt(pg.attribute("startArrowIndex","0"))];
OB.endArrowIndex = arrowID[QStoInt(pg.attribute("endArrowIndex","0"))];
OB.isBookmark=QStoInt(pg.attribute("BOOKMARK"));
OB.Xpos = Xp + pg.attribute("XPOS").toDouble() - GrX;
OB.Ypos = Yp + pg.attribute("YPOS").toDouble() - GrY;
OB.startArrowIndex = arrowID[pg.attribute("startArrowIndex", "0").toInt()];
OB.endArrowIndex = arrowID[pg.attribute("endArrowIndex", "0").toInt()];
OB.isBookmark=pg.attribute("BOOKMARK").toInt();
OB.NamedLStyle = pg.attribute("NAMEDLST", "");
if (!doc->MLineStyles.contains(OB.NamedLStyle))
OB.NamedLStyle = "";
OB.BMnr = 0;
OB.textAlignment = DoVorl[QStoInt(pg.attribute("ALIGN","0"))].toUInt();
OB.textAlignment = DoVorl[pg.attribute("ALIGN", "0").toInt()].toUInt();
tmf = pg.attribute("IFONT", doc->toolSettings.defFont);
if (tmf.isEmpty())
tmf = doc->toolSettings.defFont;
2033,12 → 2033,12
OB.LayerNr = 0;
OB.Language = pg.attribute("LANGUAGE", doc->Language);
tmp = "";
if ((pg.hasAttribute("GROUPS")) && (QStoInt(pg.attribute("NUMGROUP","0")) != 0))
if ((pg.hasAttribute("GROUPS")) && (pg.attribute("NUMGROUP", "0").toInt() != 0))
{
tmp = pg.attribute("GROUPS");
QTextStream fg(&tmp, IO_ReadOnly);
OB.Groups.clear();
for (int cx = 0; cx < QStoInt(pg.attribute("NUMGROUP","0")); ++cx)
for (int cx = 0; cx < pg.attribute("NUMGROUP", "0").toInt(); ++cx)
{
fg >> x;
OB.Groups.push(x+doc->GroupCounter);
2056,9 → 2056,9
if (it.tagName()=="CSTOP")
{
QString name = it.attribute("NAME");
double ramp = QStodouble(it.attribute("RAMP","0.0"));
int shade = QStoInt(it.attribute("SHADE","100"));
double opa = QStodouble(it.attribute("TRANS","1"));
double ramp = it.attribute("RAMP", "0.0").toDouble();
int shade = it.attribute("SHADE", "100").toInt();
double opa = it.attribute("TRANS", "1").toDouble();
OB.fill_gradient.addStop(SetColor(doc, name, shade), ramp, 0.5, opa, name, shade);
OB.GrColor = "";
OB.GrColor2 = "";
2066,8 → 2066,8
if (it.tagName()=="Tabs")
{
struct PageItem::TabRecord tb;
tb.tabPosition = QStodouble(it.attribute("Pos"));
tb.tabType = QStoInt(it.attribute("Type"));
tb.tabPosition = it.attribute("Pos").toDouble();
tb.tabType = it.attribute("Type").toInt();
QString tbCh = "";
tbCh = it.attribute("Fill","");
if (tbCh.isEmpty())
2093,7 → 2093,7
if (Neu->isTableItem)
{
TableItems.append(Neu);
TableID.insert(QStoInt(pg.attribute("OwnLINK","0")), Neu->ItemNr);
TableID.insert(pg.attribute("OwnLINK", "0").toInt(), Neu->ItemNr);
}
}
DOC=DOC.nextSibling();
/branches/Version13x/Scribus/scribus/bookpalette.cpp
42,7 → 42,7
\fn void BookPalette::closeEvent(QCloseEvent *ce)
\author Franz Schmid
\date
\brief Emits the Signal Schliessen and accepts close event. The Signal is used in ScribusApp to adjust the Menues.
\brief Emits the Signal Schliessen and accepts close event. The Signal is used in ScribusMainWindow to adjust the Menues.
\param ce Close Event
\retval None
*/
/branches/Version13x/Scribus/scribus/documentinformation.h
6,7 → 6,7
 
/***************************************************************************
* *
* ScApp program is free software; you can redistribute it and/or modify *
* ScMW program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
/branches/Version13x/Scribus/scribus/edit1format.cpp
552,8 → 552,8
pm.fill(previewText->paletteBackgroundColor());
previewText->clear();
 
double sca = ScApp->view->getScale();
ScApp->view->setScale(1.0);
double sca = ScMW->view->getScale();
ScMW->view->setScale(1.0);
ParagraphStyle tmpStyle;
tmpStyle.Vname = Name->text() + " (preview temporary)";
tmpStyle.FontEffect = EffeS->getStyle();
644,7 → 644,7
painter->end();
previewText->setPixmap(pm);
delete(painter);
ScApp->view->setScale(sca);
ScMW->view->setScale(sca);
parentDoc->docParagraphStyles.remove(parentDoc->docParagraphStyles.fromLast());
qApp->restoreOverrideCursor();
}
/branches/Version13x/Scribus/scribus/scfonts.cpp
664,7 → 664,7
if (checkedFonts.count() == 0)
{
firstRun = true;
ScApp->setSplashStatus( QObject::tr("Creating Font Cache") );
ScMW->setSplashStatus( QObject::tr("Creating Font Cache") );
}
bool error = FT_New_Face( library, filename, 0, &face );
if (error)
688,7 → 688,7
if (!checkedFonts.contains(filename))
{
if (!firstRun)
ScApp->setSplashStatus( QObject::tr("New Font found, checking...") );
ScMW->setSplashStatus( QObject::tr("New Font found, checking...") );
FT_UInt gindex = 0;
FT_ULong charcode = FT_Get_First_Char( face, &gindex );
while ( gindex != 0 )
725,7 → 725,7
}
if (checkedFonts[filename].lastMod != fic.lastModified())
{
ScApp->setSplashStatus( QObject::tr("Modified Font found, checking...") );
ScMW->setSplashStatus( QObject::tr("Modified Font found, checking...") );
FT_UInt gindex = 0;
FT_ULong charcode = FT_Get_First_Char( face, &gindex );
while ( gindex != 0 )
1056,7 → 1056,7
QFile f(pf + "/checkfonts.xml");
if(!f.open(IO_ReadOnly))
return;
ScApp->setSplashStatus( QObject::tr("Reading Font Cache") );
ScMW->setSplashStatus( QObject::tr("Reading Font Cache") );
QTextStream ts(&f);
ts.setEncoding(QTextStream::UnicodeUTF8);
QString errorMsg;
1077,7 → 1077,7
if (dc.tagName()=="Font")
{
foCache.isChecked = false;
foCache.isOK = static_cast<bool>(QStoInt(dc.attribute("Status","1")));
foCache.isOK = static_cast<bool>(dc.attribute("Status", "1").toInt());
foCache.lastMod = QDateTime::fromString(dc.attribute("Modified"), Qt::ISODate);
checkedFonts.insert(dc.attribute("File"), foCache);
}
1103,7 → 1103,7
elem.appendChild(fosu);
}
}
ScApp->setSplashStatus( QObject::tr("Writing updated Font Cache") );
ScMW->setSplashStatus( QObject::tr("Writing updated Font Cache") );
QFile f(pf + "/checkfonts.xml");
if(f.open(IO_WriteOnly))
{
1120,7 → 1120,7
showFontInformation=showFontInfo;
FontPath.clear();
ReadCacheList(pf);
ScApp->setSplashStatus( QObject::tr("Searching for Fonts") );
ScMW->setSplashStatus( QObject::tr("Searching for Fonts") );
AddUserPath(pf);
// Search the system paths
QStringList ftDirs = ScPaths::getSystemFontDirs();
/branches/Version13x/Scribus/scribus/story.cpp
213,9 → 213,9
 
QString uc = k->text();
QKeySequence currKeySeq = QKeySequence(k->key() | keyMod);
if (currKeySeq == ScApp->scrActions["specialPageNumber"]->accel())
if (currKeySeq == ScMW->scrActions["specialPageNumber"]->accel())
{
insChars(QString(QChar(ScApp->scrActions["specialPageNumber"]->actionInt())));
insChars(QString(QChar(ScMW->scrActions["specialPageNumber"]->actionInt())));
setFarbe(true);
insert("#");
setFarbe(false);
223,9 → 223,9
emit SideBarUpdate();
return;
}
if (currKeySeq == ScApp->scrActions["specialNonBreakingSpace"]->accel())
if (currKeySeq == ScMW->scrActions["specialNonBreakingSpace"]->accel())
{
insChars(QString(QChar(ScApp->scrActions["specialNonBreakingSpace"]->actionInt())));
insChars(QString(QChar(ScMW->scrActions["specialNonBreakingSpace"]->actionInt())));
setFarbe(true);
insert("_");
setFarbe(false);
233,9 → 233,9
emit SideBarUpdate();
return;
}
if (currKeySeq == ScApp->scrActions["specialFrameBreak"]->accel())
if (currKeySeq == ScMW->scrActions["specialFrameBreak"]->accel())
{
insChars(QString(QChar(ScApp->scrActions["specialFrameBreak"]->actionInt())));
insChars(QString(QChar(ScMW->scrActions["specialFrameBreak"]->actionInt())));
setFarbe(true);
insert("|");
setFarbe(false);
243,9 → 243,9
emit SideBarUpdate();
return;
}
if (currKeySeq == ScApp->scrActions["specialNewLine"]->accel())
if (currKeySeq == ScMW->scrActions["specialNewLine"]->accel())
{
insChars(QString(QChar(ScApp->scrActions["specialNewLine"]->actionInt())));
insChars(QString(QChar(ScMW->scrActions["specialNewLine"]->actionInt())));
setFarbe(true);
insert("*");
setFarbe(false);
253,9 → 253,9
emit SideBarUpdate();
return;
}
if (currKeySeq == ScApp->scrActions["specialColumnBreak"]->accel())
if (currKeySeq == ScMW->scrActions["specialColumnBreak"]->accel())
{
insChars(QString(QChar(ScApp->scrActions["specialColumnBreak"]->actionInt())));
insChars(QString(QChar(ScMW->scrActions["specialColumnBreak"]->actionInt())));
setFarbe(true);
insert("^");
setFarbe(false);
263,9 → 263,9
emit SideBarUpdate();
return;
}
if (currKeySeq == ScApp->scrActions["specialNonBreakingHyphen"]->accel())
if (currKeySeq == ScMW->scrActions["specialNonBreakingHyphen"]->accel())
{
insChars(QString(QChar(ScApp->scrActions["specialNonBreakingHyphen"]->actionInt())));
insChars(QString(QChar(ScMW->scrActions["specialNonBreakingHyphen"]->actionInt())));
setFarbe(true);
insert("=");
setFarbe(false);
1031,7 → 1031,7
}
if ((Ali == hg->cab) && (Csty == hg->cstyle))
{
if (hg->ch == QChar(ScApp->scrActions["specialPageNumber"]->actionInt()))
if (hg->ch == QChar(ScMW->scrActions["specialPageNumber"]->actionInt()))
{
setAlign(Ali);
setStyle(Csty);
1043,7 → 1043,7
chars->append(hg);
continue;
}
else if (hg->ch == QChar(ScApp->scrActions["specialNonBreakingSpace"]->actionInt()))
else if (hg->ch == QChar(ScMW->scrActions["specialNonBreakingSpace"]->actionInt()))
{
setAlign(Ali);
setStyle(Csty);
1055,7 → 1055,7
chars->append(hg);
continue;
}
else if (hg->ch == QChar(ScApp->scrActions["specialFrameBreak"]->actionInt()))
else if (hg->ch == QChar(ScMW->scrActions["specialFrameBreak"]->actionInt()))
{
setAlign(Ali);
setStyle(Csty);
1067,7 → 1067,7
chars->append(hg);
continue;
}
else if (hg->ch == QChar(ScApp->scrActions["specialColumnBreak"]->actionInt()))
else if (hg->ch == QChar(ScMW->scrActions["specialColumnBreak"]->actionInt()))
{
setAlign(Ali);
setStyle(Csty);
1079,7 → 1079,7
chars->append(hg);
continue;
}
else if (hg->ch == QChar(ScApp->scrActions["specialNonBreakingHyphen"]->actionInt()))
else if (hg->ch == QChar(ScMW->scrActions["specialNonBreakingHyphen"]->actionInt()))
{
setAlign(Ali);
setStyle(Csty);
1091,7 → 1091,7
chars->append(hg);
continue;
}
else if (hg->ch == QChar(ScApp->scrActions["specialNewLine"]->actionInt()))
else if (hg->ch == QChar(ScMW->scrActions["specialNewLine"]->actionInt()))
{
setAlign(Ali);
setStyle(Csty);
1241,7 → 1241,7
}
if ((Ali == hg->cab) && (Csty == hg->cstyle))
{
if (hg->ch == QChar(ScApp->scrActions["specialPageNumber"]->actionInt()))
if (hg->ch == QChar(ScMW->scrActions["specialPageNumber"]->actionInt()))
{
setAlign(Ali);
setStyle(Csty);
1252,7 → 1252,7
Text = "";
continue;
}
else if (hg->ch == QChar(ScApp->scrActions["specialNonBreakingSpace"]->actionInt()))
else if (hg->ch == QChar(ScMW->scrActions["specialNonBreakingSpace"]->actionInt()))
{
setAlign(Ali);
setStyle(Csty);
1263,7 → 1263,7
Text = "";
continue;
}
else if (hg->ch == QChar(ScApp->scrActions["specialFrameBreak"]->actionInt()))
else if (hg->ch == QChar(ScMW->scrActions["specialFrameBreak"]->actionInt()))
{
setAlign(Ali);
setStyle(Csty);
1274,7 → 1274,7
Text = "";
continue;
}
else if (hg->ch == QChar(ScApp->scrActions["specialColumnBreak"]->actionInt()))
else if (hg->ch == QChar(ScMW->scrActions["specialColumnBreak"]->actionInt()))
{
setAlign(Ali);
setStyle(Csty);
1286,7 → 1286,7
chars->append(hg);
continue;
}
else if (hg->ch == QChar(ScApp->scrActions["specialNonBreakingHyphen"]->actionInt()))
else if (hg->ch == QChar(ScMW->scrActions["specialNonBreakingHyphen"]->actionInt()))
{
setAlign(Ali);
setStyle(Csty);
1298,7 → 1298,7
chars->append(hg);
continue;
}
else if (hg->ch == QChar(ScApp->scrActions["specialNewLine"]->actionInt()))
else if (hg->ch == QChar(ScMW->scrActions["specialNewLine"]->actionInt()))
{
setAlign(Ali);
setStyle(Csty);
2881,9 → 2881,9
{
blockUpdate = true;
QString retval;
if (ScApp->pluginManager->DLLexists("fontpreview"))
if (ScMW->pluginManager->DLLexists("fontpreview"))
{
bool result = ScApp->pluginManager->callSpecialActionPlugin("fontpreview", Editor->CurrFont, retval);
bool result = ScMW->pluginManager->callSpecialActionPlugin("fontpreview", Editor->CurrFont, retval);
if (result && !retval.isEmpty())
{
sDebug("Got retval");
2933,7 → 2933,7
void StoryEditor::Do_saveDocument()
{
updateTextFrame();
ScApp->slotFileSave();
ScMW->slotFileSave();
}
 
bool StoryEditor::Do_new()
3118,7 → 3118,7
nb2->Dirty = false;
nb2 = nb2->NextBox;
}
ScApp->view->DrawNew();
ScMW->view->DrawNew();
textChanged = false;
emenu->setItemEnabled(Mupdt, 0);
fmenu->setItemEnabled(M_FileRevert, 0);
3152,10 → 3152,10
//emit EditSt();
 
StilFormate *dia = new StilFormate(this, currDoc);
connect(dia, SIGNAL(saveStyle(StilFormate *)), ScApp, SLOT(saveStyles(StilFormate *)));
connect(dia, SIGNAL(saveStyle(StilFormate *)), ScMW, SLOT(saveStyles(StilFormate *)));
if (dia->exec())
ScApp->saveStyles(dia);
disconnect(dia, SIGNAL(saveStyle(StilFormate *)), ScApp, SLOT(saveStyles(StilFormate *)));
ScMW->saveStyles(dia);
disconnect(dia, SIGNAL(saveStyle(StilFormate *)), ScMW, SLOT(saveStyles(StilFormate *)));
delete dia;
 
AlignTools->Spal->setFormats(currDoc);
/branches/Version13x/Scribus/scribus/prefs.h
193,7 → 193,7
int choosenLayout;
int docUnitIndex;
double DisScale;
ScribusApp *ap;
ScribusMainWindow *ap;
QColor colorPaper;
 
signals:
/branches/Version13x/Scribus/scribus/docinfo.h
33,7 → 33,7
DocumentInformation infos;
 
/*! Returns the changed values.
Used e.g. in ScribusApp::SetupDoc().
Used e.g. in ScribusMainWindow::SetupDoc().
\retval DocumentInformation structure */
DocumentInformation getDocInfo();
 
/branches/Version13x/Scribus/scribus/pageitem.h
908,7 → 908,7
/**
* @brief Connect the item's signals to the GUI, primarily the Properties palette, also some to ScApp
* @brief Connect the item's signals to the GUI, primarily the Properties palette, also some to ScMW
* @return
*/
bool connectToGUI();
/branches/Version13x/Scribus/scribus/scrpalettebase.cpp
35,7 → 35,7
visibleOnStartup(false)
{
setPrefsContext(name);
ScribusApp *scapp = dynamic_cast<ScribusApp*>(parent);
ScribusMainWindow *scapp = dynamic_cast<ScribusMainWindow*>(parent);
if (scapp)
connect(scapp, SIGNAL(prefsChanged()), this, SLOT(setFontSize()));
}
/branches/Version13x/Scribus/scribus/main_nix.cpp
35,7 → 35,7
void initCrashHandler();
static void defaultCrashHandler(int sig);
 
ScribusApp SCRIBUS_API *ScApp;
ScribusMainWindow SCRIBUS_API *ScMW;
ScribusQApp SCRIBUS_API *ScQApp;
bool emergencyActivated;
 
116,10 → 116,10
std::cout << sigMsg << std::endl;
if (ScribusQApp::useGUI)
{
ScApp->closeSplash();
QMessageBox::critical(ScApp, sigHdr, sigMsg, QObject::tr("&OK"));
ScApp->emergencySave();
ScApp->close();
ScMW->closeSplash();
QMessageBox::critical(ScMW, sigHdr, sigMsg, QObject::tr("&OK"));
ScMW->emergencySave();
ScMW->close();
}
alarm(300);
}
/branches/Version13x/Scribus/scribus/commonstrings.cpp
6,7 → 6,7
 
/***************************************************************************
* *
* ScApp program is free software; you can redistribute it and/or modify *
* ScMW program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
/branches/Version13x/Scribus/scribus/picstatus.cpp
226,7 → 226,7
QString pageText = PicTable->text(QString(sender()->name()).toInt(), 2);
bool ok = false;
int pageNum = pageText.toInt(&ok);
ScApp->closeActiveWindowMasterPageEditor();
ScMW->closeActiveWindowMasterPageEditor();
if (!ok)
emit selectMasterPage(pageText);
else
/branches/Version13x/Scribus/scribus/reformdoc.h
20,7 → 20,7
class QSpinBox;
class DocSections;
class ScribusDoc;
class ScribusApp;
class ScribusMainWindow;
class TabTypograpy;
class HySettings;
class CMSPrefs;
49,7 → 49,7
const bool colorManagementSettingsChanged();
void updateDocumentSettings();
 
ScribusApp *ScApp;
ScribusMainWindow *ScMW;
ScribusDoc* currDoc;
int einheit;
int decimals;
/branches/Version13x/Scribus/scribus/seiten.cpp
526,11 → 526,11
connect(pageLayout, SIGNAL(selectedLayout(int )), this, SLOT(handlePageLayout(int )));
connect(pageLayout, SIGNAL(selectedFirstPage(int )), this, SLOT(handleFirstPage(int )));
connect(this, SIGNAL(EditTemp(QString)), ScApp, SLOT(manageMasterPages(QString)));
connect(pageView, SIGNAL(UseTemp(QString, int)), ScApp, SLOT(Apply_MasterPage(QString, int)));
connect(pageView, SIGNAL(NewPage(int, QString)), ScApp, SLOT(slotNewPageP(int, QString)));
connect(Trash, SIGNAL(DelPage(int)), ScApp, SLOT(DeletePage2(int)));
connect(this, SIGNAL(GotoSeite(int)), ScApp, SLOT(selectPagesFromOutlines(int)));
connect(this, SIGNAL(EditTemp(QString)), ScMW, SLOT(manageMasterPages(QString)));
connect(pageView, SIGNAL(UseTemp(QString, int)), ScMW, SLOT(Apply_MasterPage(QString, int)));
connect(pageView, SIGNAL(NewPage(int, QString)), ScMW, SLOT(slotNewPageP(int, QString)));
connect(Trash, SIGNAL(DelPage(int)), ScMW, SLOT(DeletePage2(int)));
connect(this, SIGNAL(GotoSeite(int)), ScMW, SLOT(selectPagesFromOutlines(int)));
QToolTip::add(Trash, "<qt>" + tr("Drag pages or master pages onto the trashbin to delete them") + "</qt>");
QToolTip::add(masterPageList, "<qt>" + tr("Here are all your master pages. To create a new page, drag a master page to the page view below") + "</qt>");
633,7 → 633,7
 
void PagePalette::RebuildTemp()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
masterPageList->clear();
if (currView == 0)
654,7 → 654,7
 
void PagePalette::RebuildPage()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
QString str;
disconnect(pageLayout, SIGNAL(selectedLayout(int )), this, SLOT(handlePageLayout(int )));
/branches/Version13x/Scribus/scribus/guidemanager.cpp
38,21 → 38,21
FPoint selectionTopLeft = FPoint(0, 0);
FPoint selectionBottomRight = FPoint(0, 0);
 
int docSelectionCount=ScApp->doc->selection->count();
int docSelectionCount=ScMW->doc->selection->count();
// multiselection
if (docSelectionCount > 1)
{
selectionTopLeft.setXY(ScApp->view->GroupX - ScApp->doc->currentPage->xOffset(),
ScApp->view->GroupY - ScApp->doc->currentPage->yOffset());
selectionBottomRight.setXY(ScApp->view->GroupW,
ScApp->view->GroupH);
selectionTopLeft.setXY(ScMW->view->GroupX - ScMW->doc->currentPage->xOffset(),
ScMW->view->GroupY - ScMW->doc->currentPage->yOffset());
selectionBottomRight.setXY(ScMW->view->GroupW,
ScMW->view->GroupH);
}
// only one item selected
else if (docSelectionCount == 1)
{
PageItem *currItem = ScApp->doc->selection->itemAt(0);
selectionTopLeft.setXY(currItem->xPos() - ScApp->doc->currentPage->xOffset(),
currItem->yPos() - ScApp->doc->currentPage->yOffset());
PageItem *currItem = ScMW->doc->selection->itemAt(0);
selectionTopLeft.setXY(currItem->xPos() - ScMW->doc->currentPage->xOffset(),
currItem->yPos() - ScMW->doc->currentPage->yOffset());
selectionBottomRight.setXY(currItem->width(), currItem->height());
}
 
71,40 → 71,40
setIcon(loadIcon("AppIcon.png"));
 
/* Initialise the global variables */
docUnitIndex = ScApp->doc->unitIndex();
docUnitIndex = ScMW->doc->unitIndex();
docUnitRatio = unitGetRatioFromIndex(docUnitIndex);
int decimals = unitGetDecimalsFromIndex(docUnitIndex);
 
horizontalGuides = ScApp->doc->currentPage->YGuides; // in page XGuides and YGuides are inverted
verticalGuides = ScApp->doc->currentPage->XGuides;
locPageWidth = ScApp->doc->currentPage->width();
locPageHeight = ScApp->doc->currentPage->height();
lockedGuides = ScApp->doc->GuideLock;
horizontalGuides = ScMW->doc->currentPage->YGuides; // in page XGuides and YGuides are inverted
verticalGuides = ScMW->doc->currentPage->XGuides;
locPageWidth = ScMW->doc->currentPage->width();
locPageHeight = ScMW->doc->currentPage->height();
lockedGuides = ScMW->doc->GuideLock;
 
locTop = ScApp->doc->pageMargins.Top;
locBottom = ScApp->doc->pageMargins.Bottom;
locTop = ScMW->doc->pageMargins.Top;
locBottom = ScMW->doc->pageMargins.Bottom;
// left or right page? See ScribusView::reformPages(bool moveObjects) as example
int counter = ScApp->doc->pageSets[ScApp->doc->currentPageLayout].FirstPage;
for (uint i = 0; i < ScApp->doc->currentPage->pageNr(); ++i)
int counter = ScMW->doc->pageSets[ScMW->doc->currentPageLayout].FirstPage;
for (uint i = 0; i < ScMW->doc->currentPage->pageNr(); ++i)
{
++counter;
if (counter >= ScApp->doc->pageSets[ScApp->doc->currentPageLayout].Columns)
if (counter >= ScMW->doc->pageSets[ScMW->doc->currentPageLayout].Columns)
counter = 0;
}
// middle page
locLeft = ScApp->doc->pageMargins.Left;
locRight = ScApp->doc->pageMargins.Left;
locLeft = ScMW->doc->pageMargins.Left;
locRight = ScMW->doc->pageMargins.Left;
// left page
if (counter == 0)
{
locLeft = ScApp->doc->pageMargins.Right;
locRight = ScApp->doc->pageMargins.Left;
locLeft = ScMW->doc->pageMargins.Right;
locRight = ScMW->doc->pageMargins.Left;
}
// right page
if (counter == ScApp->doc->pageSets[ScApp->doc->currentPageLayout].Columns-1)
if (counter == ScMW->doc->pageSets[ScMW->doc->currentPageLayout].Columns-1)
{
locRight = ScApp->doc->pageMargins.Right;
locLeft = ScApp->doc->pageMargins.Left;
locRight = ScMW->doc->pageMargins.Right;
locLeft = ScMW->doc->pageMargins.Left;
}
 
selHor = selVer = -1;
411,7 → 411,7
{
if (useRowGap->isChecked())
{
double gapValue = value2pts(rowGap->value(), ScApp->doc->unitIndex());
double gapValue = value2pts(rowGap->value(), ScMW->doc->unitIndex());
values.append(offset + (spacing * i) + (gapValue / 2.0));
values.append(offset + (spacing * i) - (gapValue / 2.0));
}
444,7 → 444,7
{
if (useColGap->isChecked())
{
double gapValue = value2pts(colGap->value(), ScApp->doc->unitIndex());
double gapValue = value2pts(colGap->value(), ScMW->doc->unitIndex());
values.append(offset + spacing * i + (gapValue / 2.0));
values.append(offset + spacing * i - (gapValue / 2.0));
}
653,25 → 653,25
 
void GuideManager::refreshDoc()
{
ScApp->doc->currentPage->addXGuides(verticalGuides);
ScApp->doc->currentPage->addYGuides(horizontalGuides);
ScApp->doc->lockGuides(lockedGuides);
ScApp->view->DrawNew();
ScMW->doc->currentPage->addXGuides(verticalGuides);
ScMW->doc->currentPage->addYGuides(horizontalGuides);
ScMW->doc->lockGuides(lockedGuides);
ScMW->view->DrawNew();
}
 
void GuideManager::refreshWholeDoc()
{
int origPage = ScApp->doc->currentPage->pageNr();
int origPage = ScMW->doc->currentPage->pageNr();
 
for (int i = 0; i < ScApp->doc->pageCount; ++i)
for (int i = 0; i < ScMW->doc->pageCount; ++i)
{
ScApp->view->GotoPage(i);
ScApp->doc->currentPage->addXGuides(verticalGuides);
ScApp->doc->currentPage->addYGuides(horizontalGuides);
ScApp->doc->lockGuides(lockedGuides);
ScMW->view->GotoPage(i);
ScMW->doc->currentPage->addXGuides(verticalGuides);
ScMW->doc->currentPage->addYGuides(horizontalGuides);
ScMW->doc->lockGuides(lockedGuides);
}
ScApp->view->GotoPage(origPage);
ScApp->view->DrawNew();
ScMW->view->GotoPage(origPage);
ScMW->view->DrawNew();
}
 
void GuideManager::useRowGap_clicked(bool state)
/branches/Version13x/Scribus/scribus/pageitem.cpp
818,7 → 818,7
 
void PageItem::DrawObj_Pre(ScPainter *p, double &sc)
{
sc = ScApp->view->getScale();
sc = ScMW->view->getScale();
p->save();
if (!isEmbedded)
{
919,7 → 919,7
}
if ((!isEmbedded) && (!Doc->RePos))
{
double scpInv = 1.0 / (QMAX(ScApp->view->getScale(), 1));
double scpInv = 1.0 / (QMAX(ScMW->view->getScale(), 1));
if ((Frame) && (Doc->guidesSettings.framesShown) && ((itemType() == ImageFrame) || (itemType() == TextFrame) || (itemType() == PathText)))
{
p->setPen(black, scpInv, DotLine, FlatCap, MiterJoin);
1090,11 → 1090,11
}
//qDebug("paintObj(QRect e, QPixmap *ppX)");
QPainter p;
double sc = ScApp->view->getScale();
double sc = ScMW->view->getScale();
if (toPixmap)
p.begin(ppX);
else
p.begin(ScApp->view->viewport());
p.begin(ScMW->view->viewport());
if ((!toPixmap) && (!Doc->RePos))
{
if (!e.isEmpty())
1101,14 → 1101,14
p.setClipRect(e);
else
{
int x = ScApp->view->contentsX();
int y = ScApp->view->contentsY();
QPoint out = ScApp->view->contentsToViewport(QPoint(x,y));
p.setClipRect(QRect(out.x(), out.y(), ScApp->view->visibleWidth(), ScApp->view->visibleWidth()));
int x = ScMW->view->contentsX();
int y = ScMW->view->contentsY();
QPoint out = ScMW->view->contentsToViewport(QPoint(x,y));
p.setClipRect(QRect(out.x(), out.y(), ScMW->view->visibleWidth(), ScMW->view->visibleWidth()));
}
}
QPoint in = QPoint(qRound((Xpos-Doc->minCanvasCoordinate.x())*sc), qRound((Ypos-Doc->minCanvasCoordinate.y())*sc));
QPoint out = ScApp->view->contentsToViewport(in);
QPoint out = ScMW->view->contentsToViewport(in);
p.translate(out.x(), out.y());
p.scale(sc, sc);
p.rotate(Rot);
1131,7 → 1131,7
if (Groups.count() == 0)
{
QPainter pr;
pr.begin(ScApp->view->viewport());
pr.begin(ScMW->view->viewport());
pr.translate(out.x(), out.y());
pr.rotate(Rot);
if (Locked)
1174,11 → 1174,11
p.setPen(QPen(darkCyan, 1, DotLine, FlatCap, MiterJoin));
p.setBrush(NoBrush);
p.drawRect(-1, -1, static_cast<int>(Width+2), static_cast<int>(Height+2));
//if (ScApp->view->SelItem.count() == 1)
//if (ScMW->view->SelItem.count() == 1)
if (Doc->selection->count() == 1)
{
QPainter pr;
pr.begin(ScApp->view->viewport());
pr.begin(ScMW->view->viewport());
pr.translate(out.x(), out.y());
pr.rotate(Rot);
pr.setPen(QPen(darkCyan, 1, SolidLine, FlatCap, MiterJoin));
1473,7 → 1473,7
{
SetFarbe(&tmp, ml[it].Color, ml[it].Shade);
p->setPen(QPen(tmp,
QMAX(static_cast<int>(ml[it].Width*ScApp->view->getScale()), 1),
QMAX(static_cast<int>(ml[it].Width*ScMW->view->getScale()), 1),
static_cast<PenStyle>(ml[it].Dash),
static_cast<PenCapStyle>(ml[it].LineEnd),
static_cast<PenJoinStyle>(ml[it].LineJoin)));
1491,7 → 1491,7
{
SetFarbe(&tmp, ml[it].Color, ml[it].Shade);
p->setPen(QPen(tmp,
QMAX(static_cast<int>(ml[it].Width*ScApp->view->getScale()), 1),
QMAX(static_cast<int>(ml[it].Width*ScMW->view->getScale()), 1),
static_cast<PenStyle>(ml[it].Dash),
static_cast<PenCapStyle>(ml[it].LineEnd),
static_cast<PenJoinStyle>(ml[it].LineJoin)));
1510,7 → 1510,7
{
SetFarbe(&tmp, ml[it].Color, ml[it].Shade);
p->setPen(QPen(tmp,
QMAX(static_cast<int>(ml[it].Width*ScApp->view->getScale()), 1),
QMAX(static_cast<int>(ml[it].Width*ScMW->view->getScale()), 1),
static_cast<PenStyle>(ml[it].Dash),
static_cast<PenCapStyle>(ml[it].LineEnd),
static_cast<PenJoinStyle>(ml[it].LineJoin)));
1914,7 → 1914,7
ScaleType = freeScale;
AspectRatio = keepRatio;
AdjustPictScale();
ScApp->view->RefreshItem(this);
ScMW->view->RefreshItem(this);
}
 
void PageItem::toggleLock()
2388,9 → 2388,9
 
bool PageItem::shouldCheck()
{
return ((!ScApp->view->mousePressed()) &&
(!ScApp->arrowKeyDown()) &&
(!ScApp->propertiesPalette->userActionOn()));
return ((!ScMW->view->mousePressed()) &&
(!ScMW->arrowKeyDown()) &&
(!ScMW->propertiesPalette->userActionOn()));
}
 
void PageItem::moveUndoAction()
2406,11 → 2406,11
if (oldOwnPage == -1)
oldp = Um::ScratchSpace;
else
oldp = QString(Um::PageNmbr).arg(ScApp->doc->FirstPnum + oldOwnPage);
oldp = QString(Um::PageNmbr).arg(ScMW->doc->FirstPnum + oldOwnPage);
if (OwnPage == -1)
newp = Um::ScratchSpace;
else
newp = QString(Um::PageNmbr).arg(ScApp->doc->FirstPnum + OwnPage);
newp = QString(Um::PageNmbr).arg(ScMW->doc->FirstPnum + OwnPage);
SimpleState *ss = new SimpleState(Um::Move,
QString(Um::MoveFromTo).arg(oldXpos).arg(oldYpos).arg(oldp).
arg(Xpos).arg(Ypos).arg(newp), Um::IMove);
2509,22 → 2509,22
else if (ss->contains("IMAGEFLIPH"))
{
select();
ScApp->view->FlipImageH();
ScMW->view->FlipImageH();
}
else if (ss->contains("IMAGEFLIPV"))
{
select();
ScApp->view->FlipImageV();
ScMW->view->FlipImageV();
}
else if (ss->contains("LOCK"))
{
select();
ScApp->view->ToggleLock();
ScMW->view->ToggleLock();
}
else if (ss->contains("SIZE_LOCK"))
{
select();
ScApp->view->ToggleSizeLock();
ScMW->view->ToggleSizeLock();
}
else if (ss->contains("NEW_NAME"))
restoreName(ss, isUndo);
2586,19 → 2586,19
restoreContourLine(ss, isUndo);
else if (ss->contains("MIRROR_PATH_H"))
{
bool editContour = ScApp->view->EditContour;
ScApp->view->EditContour = ss->getBool("IS_CONTOUR");
bool editContour = ScMW->view->EditContour;
ScMW->view->EditContour = ss->getBool("IS_CONTOUR");
select();
ScApp->view->MirrorPolyH();
ScApp->view->EditContour = editContour;
ScMW->view->MirrorPolyH();
ScMW->view->EditContour = editContour;
}
else if (ss->contains("MIRROR_PATH_V"))
{
bool editContour = ScApp->view->EditContour;
ScApp->view->EditContour = ss->getBool("IS_CONTOUR");
bool editContour = ScMW->view->EditContour;
ScMW->view->EditContour = ss->getBool("IS_CONTOUR");
select();
ScApp->view->MirrorPolyV();
ScApp->view->EditContour = editContour;
ScMW->view->MirrorPolyV();
ScMW->view->EditContour = editContour;
}
else if (ss->contains("SEND_TO_LAYER"))
restoreLayer(ss, isUndo);
2620,7 → 2620,7
mx = -mx;
my = -my;
}
ScApp->view->MoveItem(mx, my, this, false);
ScMW->view->MoveItem(mx, my, this, false);
oldXpos = Xpos;
oldYpos = Ypos;
oldOwnPage = OwnPage;
2642,17 → 2642,17
double my = oy - y;
if (isUndo)
{
ScApp->view->SizeItem(ow, oh, this, false, true, true);
ScApp->view->MoveItem(mx, my, this, false);
ScApp->view->RotateItem(ort, this);
ScMW->view->SizeItem(ow, oh, this, false, true, true);
ScMW->view->MoveItem(mx, my, this, false);
ScMW->view->RotateItem(ort, this);
}
else
{
mx = -mx;
my = -my;
ScApp->view->SizeItem(w, h, this, false, true, true);
ScApp->view->MoveItem(mx, my, this, false);
ScApp->view->RotateItem(rt, this);
ScMW->view->SizeItem(w, h, this, false, true, true);
ScMW->view->MoveItem(mx, my, this, false);
ScMW->view->RotateItem(rt, this);
}
oldWidth = Width;
oldHeight = Height;
2678,17 → 2678,17
double my = oy - y;
if (isUndo)
{
ScApp->view->RotateItem(ort, this);
ScApp->view->MoveItem(mx, my, this, false);
ScApp->view->SizeItem(ow, oh, this, false, true, true);
ScMW->view->RotateItem(ort, this);
ScMW->view->MoveItem(mx, my, this, false);
ScMW->view->SizeItem(ow, oh, this, false, true, true);
}
else
{
mx = -mx;
my = -my;
ScApp->view->RotateItem(rt, this);
ScApp->view->MoveItem(mx, my, this, false);
ScApp->view->SizeItem(w, h, this, false, true, true);
ScMW->view->RotateItem(rt, this);
ScMW->view->MoveItem(mx, my, this, false);
ScMW->view->SizeItem(w, h, this, false, true, true);
}
oldRot = Rot;
oldXpos = Xpos;
2704,7 → 2704,7
if (!isUndo)
fill = state->get("NEW_FILL");
select();
ScApp->view->ItemBrush(fill);
ScMW->view->ItemBrush(fill);
}
 
void PageItem::restoreShade(SimpleState *state, bool isUndo)
2713,7 → 2713,7
if (!isUndo)
shade = state->getInt("NEW_SHADE");
select();
ScApp->view->ItemBrushShade(shade);
ScMW->view->ItemBrushShade(shade);
}
 
void PageItem::restoreLineColor(SimpleState *state, bool isUndo)
2722,7 → 2722,7
if (!isUndo)
fill = state->get("NEW_COLOR");
select();
ScApp->view->ItemPen(fill);
ScMW->view->ItemPen(fill);
}
 
void PageItem::restoreLineShade(SimpleState *state, bool isUndo)
2731,7 → 2731,7
if (!isUndo)
shade = state->getInt("NEW_SHADE");
select();
ScApp->view->ItemPenShade(shade);
ScMW->view->ItemPenShade(shade);
}
 
void PageItem::restoreFillTP(SimpleState *state, bool isUndo)
2740,7 → 2740,7
if (!isUndo)
tp = state->getDouble("NEW_TP");
select();
ScApp->setItemFillTransparency(tp);
ScMW->setItemFillTransparency(tp);
}
 
void PageItem::restoreLineTP(SimpleState *state, bool isUndo)
2749,7 → 2749,7
if (!isUndo)
tp = state->getDouble("NEW_TP");
select();
ScApp->setItemLineTransparency(tp);
ScMW->setItemLineTransparency(tp);
}
 
 
2759,7 → 2759,7
if (!isUndo)
ps = static_cast<PenStyle>(state->getInt("NEW_STYLE"));
select();
ScApp->view->ChLineArt(ps);
ScMW->view->ChLineArt(ps);
}
 
void PageItem::restoreLineEnd(SimpleState *state, bool isUndo)
2768,7 → 2768,7
if (!isUndo)
pcs = static_cast<PenCapStyle>(state->getInt("NEW_STYLE"));
select();
ScApp->view->ChLineEnd(pcs);
ScMW->view->ChLineEnd(pcs);
}
 
void PageItem::restoreLineJoin(SimpleState *state, bool isUndo)
2777,7 → 2777,7
if (!isUndo)
pjs = static_cast<PenJoinStyle>(state->getInt("NEW_STYLE"));
select();
ScApp->view->ChLineJoin(pjs);
ScMW->view->ChLineJoin(pjs);
}
 
void PageItem::restoreLineWidth(SimpleState *state, bool isUndo)
2786,7 → 2786,7
if (!isUndo)
w = state->getDouble("NEW_WIDTH");
select();
ScApp->view->ChLineWidth(w);
ScMW->view->ChLineWidth(w);
}
 
void PageItem::restoreCustomLineStyle(SimpleState *state, bool isUndo)
2822,7 → 2822,7
if (!isUndo)
font = state->get("NEW_FONT");
select();
ScApp->view->ItemFont(font);
ScMW->view->ItemFont(font);
}
 
void PageItem::restoreFontSize(SimpleState *state, bool isUndo)
2831,7 → 2831,7
if (!isUndo)
size = state->getInt("NEW_SIZE");
select();
ScApp->view->chFSize(size);
ScMW->view->chFSize(size);
}
 
void PageItem::restoreFontWidth(SimpleState *state, bool isUndo)
2840,7 → 2840,7
if (!isUndo)
width = state->getInt("NEW_WIDTH");
select();
ScApp->view->ItemTextScale(width);
ScMW->view->ItemTextScale(width);
}
 
void PageItem::restoreFontFill(SimpleState *state, bool isUndo)
2849,7 → 2849,7
if (!isUndo)
color = state->get("NEW_FILL");
select();
ScApp->view->ItemTextBrush(color);
ScMW->view->ItemTextBrush(color);
}
 
void PageItem::restoreFontStroke(SimpleState *state, bool isUndo)
2858,7 → 2858,7
if (!isUndo)
color = state->get("NEW_STROKE");
select();
ScApp->view->ItemTextPen(color);
ScMW->view->ItemTextPen(color);
}
 
void PageItem::restoreFontFillShade(SimpleState *state, bool isUndo)
2867,7 → 2867,7
if (!isUndo)
shade = state->getInt("NEW_SHADE");
select();
ScApp->view->ItemTextBrushS(shade);
ScMW->view->ItemTextBrushS(shade);
}
 
void PageItem::restoreFontStrokeShade(SimpleState *state, bool isUndo)
2876,7 → 2876,7
if (!isUndo)
shade = state->getInt("NEW_SHADE");
select();
ScApp->view->ItemTextPenS(shade);
ScMW->view->ItemTextPenS(shade);
}
 
void PageItem::restoreKerning(SimpleState *state, bool isUndo)
2885,7 → 2885,7
if (!isUndo)
kerning = state->getInt("NEW_KERNING");
select();
ScApp->view->chKerning(kerning);
ScMW->view->chKerning(kerning);
}
 
void PageItem::restoreLineSpacing(SimpleState *state, bool isUndo)
2894,7 → 2894,7
if (!isUndo)
lsp = state->getDouble("NEW_SPACING");
select();
ScApp->view->ChLineSpa(lsp);
ScMW->view->ChLineSpa(lsp);
}
 
void PageItem::restoreLanguage(SimpleState *state, bool isUndo)
2910,7 → 2910,7
int styleid = state->getInt("OLD_STYLE");
if (!isUndo)
styleid = state->getInt("NEW_STYLE");
ScApp->view->chAbStyle(this, styleid);
ScMW->view->chAbStyle(this, styleid);
}
 
void PageItem::restoreFontEffect(SimpleState *state, bool isUndo)
2919,7 → 2919,7
if (!isUndo)
effect = state->getInt("NEW_EFFECT");
select();
ScApp->view->chTyStyle(effect);
ScMW->view->chTyStyle(effect);
}
 
 
2932,15 → 2932,15
int type = state->getInt("OLD_TYPE");
if (!isUndo)
type = state->getInt("NEW_TYPE");
ScApp->view->Deselect(false);
ScApp->view->SelectItem(item, false);
ScMW->view->Deselect(false);
ScMW->view->SelectItem(item, false);
switch (type) {
case ImageFrame: ScApp->view->ToPicFrame(); break;
case TextFrame: ScApp->view->ToTextFrame(); break;
case Polygon: ScApp->view->ToPolyFrame(); break;
case PolyLine: ScApp->view->ToBezierFrame(); break;
case ImageFrame: ScMW->view->ToPicFrame(); break;
case TextFrame: ScMW->view->ToTextFrame(); break;
case Polygon: ScMW->view->ToPolyFrame(); break;
case PolyLine: ScMW->view->ToBezierFrame(); break;
}
ScApp->setAppMode(modeNormal);
ScMW->setAppMode(modeNormal);
}
 
void PageItem::restoreTextFlowing(SimpleState *state, bool isUndo)
2996,8 → 2996,8
int mode = state->getInt("MODE");
int rot = state->getInt("ROT");
double scaling = state->getDouble("SCALING");
bool editContour = ScApp->view->EditContour;
ScApp->view->EditContour = isContour;
bool editContour = ScMW->view->EditContour;
ScMW->view->EditContour = isContour;
select();
if (isUndo)
{
3010,8 → 3010,8
else if (mode == 3)
scaling = ((100.0 / (100.0 - scaling)) - 1.0) * 100.0;
}
ScApp->view->TransformPoly(mode, rot, scaling);
ScApp->view->EditContour = editContour;
ScMW->view->TransformPoly(mode, rot, scaling);
ScMW->view->EditContour = editContour;
}
 
void PageItem::restoreContourLine(SimpleState *state, bool isUndo)
3030,8 → 3030,8
void PageItem::restoreLayer(SimpleState *state, bool isUndo)
{
setLayer(isUndo ? state->getInt("OLD_LAYER") : state->getInt("NEW_LAYER"));
ScApp->view->Deselect(true);
ScApp->view->updateContents();
ScMW->view->Deselect(true);
ScMW->view->updateContents();
}
 
void PageItem::restoreGetImage(SimpleState *state, bool isUndo)
3042,7 → 3042,7
if (fn.isEmpty())
{
select();
ScApp->view->ClearItem();
ScMW->view->ClearItem();
}
else
loadImage(fn, false);
3050,8 → 3050,8
 
void PageItem::select()
{
ScApp->view->Deselect(false);
ScApp->view->SelectItem(this, false);
ScMW->view->Deselect(false);
ScMW->view->SelectItem(this, false);
}
 
ObjAttrVector* PageItem::getObjectAttributes()
3692,9 → 3692,9
GrEndY = QMIN(QMAX(GrEndY, 0), Height);
GrStartX = QMIN(QMAX(GrStartX, 0), Width);
GrStartY = QMIN(QMAX(GrStartY, 0), Height);
//if (ScApp->view->SelItem.count()!=0 && this==ScApp->view->SelItem.at(0))
//if (ScMW->view->SelItem.count()!=0 && this==ScMW->view->SelItem.at(0))
//if (Doc->selection->count()!=0 && Doc->selection->primarySelectionIsMyself(this))
// ScApp->propertiesPalette->updateColorSpecialGradient();
// ScMW->propertiesPalette->updateColorSpecialGradient();
//CB Will only emit if connected, ie is first in GUI selection
double dur=Doc->unitRatio();
emit gradientColorUpdate(GrStartX*dur, GrStartY*dur, GrEndX*dur, GrEndY*dur, Width*dur, Height*dur);
3766,45 → 3766,45
if (!Doc->selection->primarySelectionIs(this))
return false;
connect(this, SIGNAL(myself(PageItem *)), ScApp->propertiesPalette, SLOT(SetCurItem(PageItem *)));
connect(this, SIGNAL(frameType(int)), ScApp, SLOT(HaveNewSel(int)));
connect(this, SIGNAL(frameType(int)), ScApp->view, SLOT(selectionChanged()));
connect(this, SIGNAL(frameType(int)), ScApp->propertiesPalette, SLOT(NewSel(int)));
connect(this, SIGNAL(position(double, double)), ScApp->propertiesPalette, SLOT(setXY(double, double)));
connect(this, SIGNAL(widthAndHeight(double, double)), ScApp->propertiesPalette, SLOT(setBH(double, double)));
connect(this, SIGNAL(colors(QString, QString, int, int)), ScApp, SLOT(setCSMenu(QString, QString, int, int)));
connect(this, SIGNAL(colors(QString, QString, int, int)), ScApp->propertiesPalette->Cpal, SLOT(setActFarben(QString, QString, int, int)));
connect(this, SIGNAL(gradientType(int)), ScApp->propertiesPalette->Cpal, SLOT(setActGradient(int)));
connect(this, SIGNAL(gradientColorUpdate(double, double, double, double, double, double)), ScApp->propertiesPalette->Cpal, SLOT(setSpecialGradient(double, double, double, double, double, double)));
connect(this, SIGNAL(rotation(double)), ScApp->propertiesPalette, SLOT(setR(double)));
connect(this, SIGNAL(transparency(double, double)), ScApp->propertiesPalette->Cpal, SLOT(setActTrans(double, double)));
connect(this, SIGNAL(myself(PageItem *)), ScMW->propertiesPalette, SLOT(SetCurItem(PageItem *)));
connect(this, SIGNAL(frameType(int)), ScMW, SLOT(HaveNewSel(int)));
connect(this, SIGNAL(frameType(int)), ScMW->view, SLOT(selectionChanged()));
connect(this, SIGNAL(frameType(int)), ScMW->propertiesPalette, SLOT(NewSel(int)));
connect(this, SIGNAL(position(double, double)), ScMW->propertiesPalette, SLOT(setXY(double, double)));
connect(this, SIGNAL(widthAndHeight(double, double)), ScMW->propertiesPalette, SLOT(setBH(double, double)));
connect(this, SIGNAL(colors(QString, QString, int, int)), ScMW, SLOT(setCSMenu(QString, QString, int, int)));
connect(this, SIGNAL(colors(QString, QString, int, int)), ScMW->propertiesPalette->Cpal, SLOT(setActFarben(QString, QString, int, int)));
connect(this, SIGNAL(gradientType(int)), ScMW->propertiesPalette->Cpal, SLOT(setActGradient(int)));
connect(this, SIGNAL(gradientColorUpdate(double, double, double, double, double, double)), ScMW->propertiesPalette->Cpal, SLOT(setSpecialGradient(double, double, double, double, double, double)));
connect(this, SIGNAL(rotation(double)), ScMW->propertiesPalette, SLOT(setR(double)));
connect(this, SIGNAL(transparency(double, double)), ScMW->propertiesPalette->Cpal, SLOT(setActTrans(double, double)));
//Shape signals
//Not connected when transferring code: void columns(int, double); //Number, gap
connect(this, SIGNAL(cornerRadius(double)), ScApp->propertiesPalette, SLOT(setRR(double)));
connect(this, SIGNAL(cornerRadius(double)), ScMW->propertiesPalette, SLOT(setRR(double)));
// connect(view, SIGNAL(ItemTextCols(int, double)), propertiesPalette, SLOT(setCols(int, double)));
//Line signals
connect(this, SIGNAL(lineWidth(double)), ScApp->propertiesPalette, SLOT(setSvalue(double)));
connect(this, SIGNAL(imageOffsetScale(double, double, double, double)), ScApp->propertiesPalette, SLOT(setLvalue(double, double, double, double)));
connect(this, SIGNAL(lineStyleCapJoin(Qt::PenStyle, Qt::PenCapStyle, Qt::PenJoinStyle)), ScApp->propertiesPalette, SLOT( setLIvalue(Qt::PenStyle, Qt::PenCapStyle, Qt::PenJoinStyle)));
connect(this, SIGNAL(lineWidth(double)), ScMW->propertiesPalette, SLOT(setSvalue(double)));
connect(this, SIGNAL(imageOffsetScale(double, double, double, double)), ScMW->propertiesPalette, SLOT(setLvalue(double, double, double, double)));
connect(this, SIGNAL(lineStyleCapJoin(Qt::PenStyle, Qt::PenCapStyle, Qt::PenJoinStyle)), ScMW->propertiesPalette, SLOT( setLIvalue(Qt::PenStyle, Qt::PenCapStyle, Qt::PenJoinStyle)));
//Frame text signals
connect(this, SIGNAL(lineSpacing(double)), ScApp->propertiesPalette, SLOT(setLsp(double)));
connect(this, SIGNAL(textToFrameDistances(double, double, double, double)), ScApp->propertiesPalette, SLOT(setDvals(double, double, double, double)));
connect(this, SIGNAL(textKerning(int)), ScApp->propertiesPalette, SLOT(setExtra(int)));
connect(this, SIGNAL(textStyle(int)), ScApp->propertiesPalette, SLOT(setStil(int)));
connect(this, SIGNAL(textStyle(int)), ScApp, SLOT(setStilvalue(int)));
connect(this, SIGNAL(textFont(QString)), ScApp, SLOT(AdjustFontMenu(QString)));
connect(this, SIGNAL(textSize(int)), ScApp->propertiesPalette, SLOT(setSize(int)));
connect(this, SIGNAL(textSize(int)), ScApp, SLOT(setFSizeMenu(int)));
connect(this, SIGNAL(textWidthScale(int)), ScApp->propertiesPalette, SLOT(setTScale(int)));
connect(this, SIGNAL(textHeightScale(int)), ScApp->propertiesPalette, SLOT(setTScaleV(int)));
connect(this, SIGNAL(textBaseLineOffset(int)), ScApp->propertiesPalette, SLOT(setTBase(int)));
connect(this, SIGNAL(textOutline(int)), ScApp->propertiesPalette, SLOT(setOutlineW(int)));
connect(this, SIGNAL(textShadow(int, int )), ScApp->propertiesPalette, SLOT(setShadowOffs(int, int )));
connect(this, SIGNAL(textUnderline(int, int)), ScApp->propertiesPalette, SLOT(setUnderline(int, int)));
connect(this, SIGNAL(textStrike(int, int)), ScApp->propertiesPalette, SLOT(setStrike(int, int)));
connect(this, SIGNAL(textColor(QString, QString, int, int)), ScApp->propertiesPalette, SLOT(setActFarben(QString, QString, int, int)));
connect(this, SIGNAL(textFormatting(int)), ScApp->propertiesPalette, SLOT(setAli(int)));
connect(this, SIGNAL(textFormatting(int)), ScApp, SLOT(setAbsValue(int)));
connect(this, SIGNAL(lineSpacing(double)), ScMW->propertiesPalette, SLOT(setLsp(double)));
connect(this, SIGNAL(textToFrameDistances(double, double, double, double)), ScMW->propertiesPalette, SLOT(setDvals(double, double, double, double)));
connect(this, SIGNAL(textKerning(int)), ScMW->propertiesPalette, SLOT(setExtra(int)));
connect(this, SIGNAL(textStyle(int)), ScMW->propertiesPalette, SLOT(setStil(int)));
connect(this, SIGNAL(textStyle(int)), ScMW, SLOT(setStilvalue(int)));
connect(this, SIGNAL(textFont(QString)), ScMW, SLOT(AdjustFontMenu(QString)));
connect(this, SIGNAL(textSize(int)), ScMW->propertiesPalette, SLOT(setSize(int)));
connect(this, SIGNAL(textSize(int)), ScMW, SLOT(setFSizeMenu(int)));
connect(this, SIGNAL(textWidthScale(int)), ScMW->propertiesPalette, SLOT(setTScale(int)));
connect(this, SIGNAL(textHeightScale(int)), ScMW->propertiesPalette, SLOT(setTScaleV(int)));
connect(this, SIGNAL(textBaseLineOffset(int)), ScMW->propertiesPalette, SLOT(setTBase(int)));
connect(this, SIGNAL(textOutline(int)), ScMW->propertiesPalette, SLOT(setOutlineW(int)));
connect(this, SIGNAL(textShadow(int, int )), ScMW->propertiesPalette, SLOT(setShadowOffs(int, int )));
connect(this, SIGNAL(textUnderline(int, int)), ScMW->propertiesPalette, SLOT(setUnderline(int, int)));
connect(this, SIGNAL(textStrike(int, int)), ScMW->propertiesPalette, SLOT(setStrike(int, int)));
connect(this, SIGNAL(textColor(QString, QString, int, int)), ScMW->propertiesPalette, SLOT(setActFarben(QString, QString, int, int)));
connect(this, SIGNAL(textFormatting(int)), ScMW->propertiesPalette, SLOT(setAli(int)));
connect(this, SIGNAL(textFormatting(int)), ScMW, SLOT(setAbsValue(int)));
 
return true;
}
/branches/Version13x/Scribus/scribus/scribusview.cpp
892,7 → 892,7
double gx, gy, gw, gh;
setActiveWindow();
raise();
ScApp->newActWin(Doc->WinHan);
ScMW->newActWin(Doc->WinHan);
updateContents();
// SeleItemPos(e->pos());
QUrl ur(text);
1658,7 → 1658,7
if ((!GetItem(&currItem)) && (m->button() == RightButton) && (!Doc->DragP) && (Doc->appMode == modeNormal))
{
QPopupMenu *pmen = new QPopupMenu();
if (ScApp->Buffer2.startsWith("<SCRIBUSELEM"))
if (ScMW->Buffer2.startsWith("<SCRIBUSELEM"))
{
Mxp = m->x();
Myp = m->y();
1666,26 → 1666,26
pmen->insertSeparator();
}
setObjectUndoMode();
ScApp->scrActions["editUndoAction"]->addTo(pmen);
ScApp->scrActions["editRedoAction"]->addTo(pmen);
ScMW->scrActions["editUndoAction"]->addTo(pmen);
ScMW->scrActions["editRedoAction"]->addTo(pmen);
pmen->insertSeparator();
ScApp->scrActions["viewShowMargins"]->addTo(pmen);
ScApp->scrActions["viewShowFrames"]->addTo(pmen);
ScApp->scrActions["viewShowImages"]->addTo(pmen);
ScApp->scrActions["viewShowGrid"]->addTo(pmen);
ScApp->scrActions["viewShowGuides"]->addTo(pmen);
ScApp->scrActions["viewShowBaseline"]->addTo(pmen);
ScApp->scrActions["viewShowTextChain"]->addTo(pmen);
ScApp->scrActions["viewRulerMode"]->addTo(pmen);
ScMW->scrActions["viewShowMargins"]->addTo(pmen);
ScMW->scrActions["viewShowFrames"]->addTo(pmen);
ScMW->scrActions["viewShowImages"]->addTo(pmen);
ScMW->scrActions["viewShowGrid"]->addTo(pmen);
ScMW->scrActions["viewShowGuides"]->addTo(pmen);
ScMW->scrActions["viewShowBaseline"]->addTo(pmen);
ScMW->scrActions["viewShowTextChain"]->addTo(pmen);
ScMW->scrActions["viewRulerMode"]->addTo(pmen);
pmen->insertSeparator();
// pmen->insertItem( tr("Unit"), unitSwitcher);
// pmen->insertSeparator();
ScApp->scrActions["viewSnapToGrid"]->addTo(pmen);
ScApp->scrActions["viewSnapToGuides"]->addTo(pmen);
ScMW->scrActions["viewSnapToGrid"]->addTo(pmen);
ScMW->scrActions["viewSnapToGuides"]->addTo(pmen);
pmen->insertSeparator();
ScApp->scrActions["pageApplyMasterPage"]->addTo(pmen);
ScApp->scrActions["pageManageGuides"]->addTo(pmen);
ScApp->scrActions["pageManageMargins"]->addTo(pmen);
ScMW->scrActions["pageApplyMasterPage"]->addTo(pmen);
ScMW->scrActions["pageManageGuides"]->addTo(pmen);
ScMW->scrActions["pageManageMargins"]->addTo(pmen);
pmen->exec(QCursor::pos());
setGlobalUndoMode();
delete pmen;
1827,12 → 1827,12
 
pmen4->insertItem(InfoGroup);
if ((currItem->itemType() == PageItem::ImageFrame) && (currItem->pixm.imgInfo.exifDataValid))
ScApp->scrActions["itemImageInfo"]->addTo(pmen4);
ScMW->scrActions["itemImageInfo"]->addTo(pmen4);
pmen->insertItem( tr("In&fo"), pmen4);
}
pmen->insertSeparator();
ScApp->scrActions["editUndoAction"]->addTo(pmen);
ScApp->scrActions["editRedoAction"]->addTo(pmen);
ScMW->scrActions["editUndoAction"]->addTo(pmen);
ScMW->scrActions["editRedoAction"]->addTo(pmen);
if (currItem->itemType() == PageItem::ImageFrame ||
currItem->itemType() == PageItem::TextFrame ||
currItem->itemType() == PageItem::PathText)
1840,61 → 1840,61
pmen->insertSeparator();
if (currItem->itemType() == PageItem::ImageFrame)
{
ScApp->scrActions["fileImportImage"]->addTo(pmen);
ScApp->scrActions["itemImageIsVisible"]->addTo(pmen);
ScMW->scrActions["fileImportImage"]->addTo(pmen);
ScMW->scrActions["itemImageIsVisible"]->addTo(pmen);
pmen->insertItem( tr("Preview Settings"), pmenResolution);
ScApp->scrActions["itemPreviewLow"]->addTo(pmenResolution);
ScApp->scrActions["itemPreviewNormal"]->addTo(pmenResolution);
ScApp->scrActions["itemPreviewFull"]->addTo(pmenResolution);
ScMW->scrActions["itemPreviewLow"]->addTo(pmenResolution);
ScMW->scrActions["itemPreviewNormal"]->addTo(pmenResolution);
ScMW->scrActions["itemPreviewFull"]->addTo(pmenResolution);
if ((currItem->PicAvail) && (currItem->pixm.imgInfo.valid))
ScApp->scrActions["itemExtendedImageProperties"]->addTo(pmen);
ScMW->scrActions["itemExtendedImageProperties"]->addTo(pmen);
if (currItem->PicAvail && currItem->isRaster)
{
ScApp->scrActions["styleInvertPict"]->addTo(pmen);
ScApp->scrActions["editEditWithImageEditor"]->addTo(pmen);
ScMW->scrActions["styleInvertPict"]->addTo(pmen);
ScMW->scrActions["editEditWithImageEditor"]->addTo(pmen);
}
if (currItem->PicAvail)
ScApp->scrActions["itemUpdateImage"]->addTo(pmen);
ScMW->scrActions["itemUpdateImage"]->addTo(pmen);
if ((currItem->PicAvail) && (!currItem->isTableItem))
ScApp->scrActions["itemAdjustFrameToImage"]->addTo(pmen);
ScMW->scrActions["itemAdjustFrameToImage"]->addTo(pmen);
}
if (currItem->itemType() == PageItem::TextFrame)
{
ScApp->scrActions["fileImportText"]->addTo(pmen);
ScApp->scrActions["fileImportAppendText"]->addTo(pmen);
ScApp->scrActions["toolsEditWithStoryEditor"]->addTo(pmen);
ScApp->scrActions["insertSampleText"]->addTo(pmen);
ScMW->scrActions["fileImportText"]->addTo(pmen);
ScMW->scrActions["fileImportAppendText"]->addTo(pmen);
ScMW->scrActions["toolsEditWithStoryEditor"]->addTo(pmen);
ScMW->scrActions["insertSampleText"]->addTo(pmen);
}
if (currItem->itemType() == PageItem::PathText)
ScApp->scrActions["toolsEditWithStoryEditor"]->addTo(pmen);
ScMW->scrActions["toolsEditWithStoryEditor"]->addTo(pmen);
}
pmen->insertSeparator();
ScApp->scrActions["itemAttributes"]->addTo(pmen);
ScMW->scrActions["itemAttributes"]->addTo(pmen);
if (currItem->itemType() == PageItem::TextFrame)
{
if (Doc->currentPage->PageNam.isEmpty())
{
ScApp->scrActions["itemPDFIsAnnotation"]->addTo(pmenPDF);
ScApp->scrActions["itemPDFIsBookmark"]->addTo(pmenPDF);
ScMW->scrActions["itemPDFIsAnnotation"]->addTo(pmenPDF);
ScMW->scrActions["itemPDFIsBookmark"]->addTo(pmenPDF);
if (currItem->isAnnotation)
{
if ((currItem->AnType == 0) || (currItem->AnType == 1) || (currItem->AnType > 9))
ScApp->scrActions["itemPDFAnnotationProps"]->addTo(pmenPDF);
ScMW->scrActions["itemPDFAnnotationProps"]->addTo(pmenPDF);
else
ScApp->scrActions["itemPDFFieldProps"]->addTo(pmenPDF);
ScMW->scrActions["itemPDFFieldProps"]->addTo(pmenPDF);
}
}
pmen->insertItem( tr("&PDF Options"), pmenPDF);
}
pmen->insertSeparator();
ScApp->scrActions["itemLock"]->addTo(pmen);
ScApp->scrActions["itemLockSize"]->addTo(pmen);
ScMW->scrActions["itemLock"]->addTo(pmen);
ScMW->scrActions["itemLockSize"]->addTo(pmen);
if (!currItem->isSingleSel)
{
ScApp->scrActions["itemSendToScrapbook"]->addTo(pmen);
ScMW->scrActions["itemSendToScrapbook"]->addTo(pmen);
if (Doc->layerCount() > 1)
{
for( QMap<QString, QGuardedPtr<ScrAction> >::Iterator it = ScApp->scrLayersActions.begin(); it!=ScApp->scrLayersActions.end(); ++it )
for( QMap<QString, QGuardedPtr<ScrAction> >::Iterator it = ScMW->scrLayersActions.begin(); it!=ScMW->scrLayersActions.end(); ++it )
(*it)->addTo(pmen3);
pmen->insertItem( tr("Send to La&yer"), pmen3);
}
1922,17 → 1922,17
isGroup = false;
}
if (!isGroup)
ScApp->scrActions["itemGroup"]->addTo(pmen);
ScMW->scrActions["itemGroup"]->addTo(pmen);
}
if (currItem->Groups.count() != 0)
ScApp->scrActions["itemUngroup"]->addTo(pmen);
ScMW->scrActions["itemUngroup"]->addTo(pmen);
if ((!currItem->isTableItem) && (!currItem->isSingleSel))
{
pmen->insertItem( tr("Le&vel"), pmenLevel);
ScApp->scrActions["itemRaiseToTop"]->addTo(pmenLevel);
ScApp->scrActions["itemRaise"]->addTo(pmenLevel);
ScApp->scrActions["itemLower"]->addTo(pmenLevel);
ScApp->scrActions["itemLowerToBottom"]->addTo(pmenLevel);
ScMW->scrActions["itemRaiseToTop"]->addTo(pmenLevel);
ScMW->scrActions["itemRaise"]->addTo(pmenLevel);
ScMW->scrActions["itemLower"]->addTo(pmenLevel);
ScMW->scrActions["itemLowerToBottom"]->addTo(pmenLevel);
}
}
if (Doc->appMode != modeEdit) //Create convertTo Menu
1942,16 → 1942,16
{
insertConvertToMenu=true;
if (currItem->itemType() == PageItem::PathText)
ScApp->scrActions["itemConvertToOutlines"]->addTo(pmen2);
ScMW->scrActions["itemConvertToOutlines"]->addTo(pmen2);
else
{
if (currItem->isTableItem)
ScApp->scrActions["itemConvertToImageFrame"]->addTo(pmen2);
ScMW->scrActions["itemConvertToImageFrame"]->addTo(pmen2);
if ((!currItem->isTableItem) && (currItem->BackBox == 0) && (currItem->NextBox == 0))
{
ScApp->scrActions["itemConvertToImageFrame"]->addTo(pmen2);
ScApp->scrActions["itemConvertToOutlines"]->addTo(pmen2);
ScApp->scrActions["itemConvertToPolygon"]->addTo(pmen2);
ScMW->scrActions["itemConvertToImageFrame"]->addTo(pmen2);
ScMW->scrActions["itemConvertToOutlines"]->addTo(pmen2);
ScMW->scrActions["itemConvertToPolygon"]->addTo(pmen2);
}
}
}
1958,16 → 1958,16
if (currItem->itemType() == PageItem::ImageFrame)
{
insertConvertToMenu=true;
ScApp->scrActions["itemConvertToTextFrame"]->addTo(pmen2);
ScMW->scrActions["itemConvertToTextFrame"]->addTo(pmen2);
if (!currItem->isTableItem)
ScApp->scrActions["itemConvertToPolygon"]->addTo(pmen2);
ScMW->scrActions["itemConvertToPolygon"]->addTo(pmen2);
}
if (currItem->itemType() == PageItem::Polygon)
{
insertConvertToMenu=true;
ScApp->scrActions["itemConvertToBezierCurve"]->addTo(pmen2);
ScApp->scrActions["itemConvertToImageFrame"]->addTo(pmen2);
ScApp->scrActions["itemConvertToTextFrame"]->addTo(pmen2);
ScMW->scrActions["itemConvertToBezierCurve"]->addTo(pmen2);
ScMW->scrActions["itemConvertToImageFrame"]->addTo(pmen2);
ScMW->scrActions["itemConvertToTextFrame"]->addTo(pmen2);
}
if (insertConvertToMenu)
pmen->insertItem( tr("Conve&rt to"), pmen2);
1974,17 → 1974,17
}
pmen->insertSeparator();
if (!currItem->locked() && !(currItem->isTableItem && currItem->isSingleSel))
ScApp->scrActions["editCut"]->addTo(pmen);
ScMW->scrActions["editCut"]->addTo(pmen);
if (!(currItem->isTableItem && currItem->isSingleSel))
ScApp->scrActions["editCopy"]->addTo(pmen);
if ((Doc->appMode == modeEdit) && (ScApp->Buffer2.startsWith("<SCRIBUSTEXT")) && (currItem->itemType() == PageItem::TextFrame))
ScApp->scrActions["editPaste"]->addTo(pmen);
ScMW->scrActions["editCopy"]->addTo(pmen);
if ((Doc->appMode == modeEdit) && (ScMW->Buffer2.startsWith("<SCRIBUSTEXT")) && (currItem->itemType() == PageItem::TextFrame))
ScMW->scrActions["editPaste"]->addTo(pmen);
if (!currItem->locked() && (Doc->appMode != modeEdit) && (!(currItem->isTableItem && currItem->isSingleSel)))
pmen->insertItem( tr("&Delete"), this, SLOT(DeleteItem()));
if ((currItem->itemType() == PageItem::ImageFrame) || (currItem->itemType() == PageItem::TextFrame))
ScApp->scrActions["editClearContents"]->addTo(pmen);
ScMW->scrActions["editClearContents"]->addTo(pmen);
pmen->insertSeparator();
ScApp->scrActions["toolsProperties"]->addTo(pmen);
ScMW->scrActions["toolsProperties"]->addTo(pmen);
 
pmen->exec(QCursor::pos());
setGlobalUndoMode();
3094,7 → 3094,7
Mxp = newX;
Myp = newY;
RefreshItem(currItem);
ScApp->propertiesPalette->updateColorSpecialGradient();
ScMW->propertiesPalette->updateColorSpecialGradient();
return;
}
if (Mpressed && (Doc->appMode == modeMeasurementTool))
4564,12 → 4564,12
if (Doc->Items->at(a)->isBookmark)
emit NewBMNr(Doc->Items->at(a)->BMnr, a);
}
ScApp->outlinePalette->BuildTree();
ScMW->outlinePalette->BuildTree();
}
else
{
if (ScApp->Buffer2.startsWith("<SCRIBUSTEXT"))
ScApp->slotEditPaste();
if (ScMW->Buffer2.startsWith("<SCRIBUSTEXT"))
ScMW->slotEditPaste();
}
RefreshItem(currItem);
}
7212,7 → 7212,7
 
void ScribusView::selectionChanged()
{
if (ScApp->isObjectSpecificUndo())
if (ScMW->isObjectSpecificUndo())
{
uint docSelectionCount=Doc->selection->count();
//if (SelItem.count() == 1)
7782,7 → 7782,7
}
if (prop)
emit HaveSel(-1);
ScApp->propertiesPalette->setGradientEditMode(false);
ScMW->propertiesPalette->setGradientEditMode(false);
}
 
/*
7791,7 → 7791,7
currItem->updateGradientVectors();
//if (currItem==SelItem.at(0))
if (Doc->selection->primarySelectionIsMyself(currItem))
ScApp->propertiesPalette->updateColorSpecialGradient();
ScMW->propertiesPalette->updateColorSpecialGradient();
}
*/
 
7842,7 → 7842,7
emit ItemTextFont(currItem->IFont);
emit ItemTextSize(currItem->ISize);
}
ScApp->propertiesPalette->updateColorSpecialGradient();
ScMW->propertiesPalette->updateColorSpecialGradient();
}
*/
void ScribusView::ToggleBookmark()
7875,7 → 7875,7
}
}
}
ScApp->actionManager->setPDFActions(this);
ScMW->actionManager->setPDFActions(this);
emit DocChanged();
}
}
7902,7 → 7902,7
}
}
}
ScApp->actionManager->setPDFActions(this);
ScMW->actionManager->setPDFActions(this);
emit DocChanged();
}
}
8010,7 → 8010,7
if (Doc->Items->at(a)->isBookmark)
emit NewBMNr(Doc->Items->at(a)->BMnr, a);
}
ScApp->outlinePalette->BuildTree();
ScMW->outlinePalette->BuildTree();
emit LevelChanged(0);
emit DocChanged();
updateContents();
8049,7 → 8049,7
if (Doc->Items->at(a)->isBookmark)
emit NewBMNr(Doc->Items->at(a)->BMnr, a);
}
ScApp->outlinePalette->BuildTree();
ScMW->outlinePalette->BuildTree();
//emit LevelChanged(SelItem.at(0)->ItemNr);
emit LevelChanged(Doc->selection->itemAt(0)->ItemNr);
emit DocChanged();
8114,7 → 8114,7
//SelItem.append(Doc->Items->at(a));
//Doc->selection->addItem(Doc->Items->at(a));
}
ScApp->outlinePalette->BuildTree();
ScMW->outlinePalette->BuildTree();
//emit LevelChanged(SelItem.at(0)->ItemNr);
Doc->selection->restoreFromTempList(0, tempList);
emit LevelChanged(Doc->selection->itemAt(0)->ItemNr);
8183,7 → 8183,7
//SelItem.append(Doc->Items->at(a));
//Doc->selection->addItem(Doc->Items->at(a));
}
ScApp->outlinePalette->BuildTree();
ScMW->outlinePalette->BuildTree();
//emit LevelChanged(SelItem.at(0)->ItemNr);
Doc->selection->restoreFromTempList(0, tempList);
emit LevelChanged(Doc->selection->itemAt(0)->ItemNr);
8206,8 → 8206,8
currItem = Doc->selection->itemAt(i);
if (currItem->asImageFrame())
{
if ((ScApp->fileWatcher->files().contains(currItem->Pfile) != 0) && (currItem->PicAvail))
ScApp->fileWatcher->removeFile(currItem->Pfile);
if ((ScMW->fileWatcher->files().contains(currItem->Pfile) != 0) && (currItem->PicAvail))
ScMW->fileWatcher->removeFile(currItem->Pfile);
}
else
if (currItem->asTextFrame())
8249,9 → 8249,9
offs++;
continue;
}
if ((currItem->asTextFrame() || currItem->asPathText()) && currItem==ScApp->storyEditor->currentItem() && Doc==ScApp->storyEditor->currentDocument())
if ((currItem->asTextFrame() || currItem->asPathText()) && currItem==ScMW->storyEditor->currentItem() && Doc==ScMW->storyEditor->currentDocument())
{
QMessageBox::critical(ScApp, tr("Cannot Delete In-Use Item"), tr("The item %1 is currently being edited by Story Editor. The delete operation will be cancelled").arg(currItem->itemName()), QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton);
QMessageBox::critical(ScMW, tr("Cannot Delete In-Use Item"), tr("The item %1 is currently being edited by Story Editor. The delete operation will be cancelled").arg(currItem->itemName()), QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton);
return;
}
tooltip += "\t" + currItem->getUName() + "\n";
8270,8 → 8270,8
{
//currItem = delItems.at(0);
currItem = delItems.last();
if ((currItem->asImageFrame()) && ((ScApp->fileWatcher->files().contains(currItem->Pfile) != 0) && (currItem->PicAvail)))
ScApp->fileWatcher->removeFile(currItem->Pfile);
if ((currItem->asImageFrame()) && ((ScMW->fileWatcher->files().contains(currItem->Pfile) != 0) && (currItem->PicAvail)))
ScMW->fileWatcher->removeFile(currItem->Pfile);
if (currItem->asTextFrame())
{
for (ScText *it = currItem->itemText.first(); it != 0; it = currItem->itemText.next())
8345,7 → 8345,7
undoManager->commit();
updateContents();
qApp->setOverrideCursor(QCursor(ArrowCursor), true);
ScApp->outlinePalette->BuildTree();
ScMW->outlinePalette->BuildTree();
//if (SelItem.count() == 0)
if (Doc->selection->count() == 0)
emit HaveSel(-1);
8361,7 → 8361,7
uint ac = Doc->Items->count();
if (UndoManager::undoEnabled())
undoManager->beginTransaction(Doc->currentPage->getUName(), 0, Um::Paste, "", Um::IPaste);
emit LoadElem(ScApp->Buffer2, Mxp / Scale, Myp / Scale, false, false, Doc, this);
emit LoadElem(ScMW->Buffer2, Mxp / Scale, Myp / Scale, false, false, Doc, this);
Doc->DraggedElem = 0;
Doc->DragElements.clear();
updateContents();
8418,7 → 8418,7
 
void ScribusView::setRulerPos(int x, int y)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
if (Doc->guidesSettings.rulerMode)
{
8455,7 → 8455,7
if (!pag.isEmpty())
newStatusBarText=( tr("Page %1 to %2").arg(pag.first()).arg(pag.last()));
}
ScApp->mainWindowStatusLabel->setText(newStatusBarText);
ScMW->mainWindowStatusLabel->setText(newStatusBarText);
}
 
void ScribusView::Zval()
8467,7 → 8467,7
rememberPreviousSettings(w / 2 + x,h / 2 + y);
setScale(zoomSpinBox->value() / 100.0 * Prefs->DisScale);
slotDoZoom();
ScApp->setFocus();
ScMW->setFocus();
}
 
//CB This MUST now be called AFTER a call to doc->addPage or doc->addMasterPage as it
8502,7 → 8502,7
Doc->RePos = savre;
}
*/
if ((!ScApp->ScriptRunning) && (!Doc->isLoading()) && (!Doc->masterPageMode()))
if ((!ScMW->ScriptRunning) && (!Doc->isLoading()) && (!Doc->masterPageMode()))
pageSelector->GotoPg(nr);
connect(pageSelector, SIGNAL(GotoPage(int)), this, SLOT(GotoPa(int)));
Mpressed = false;
8539,7 → 8539,7
Doc->reformPages(maxXPos, maxYPos, moveObjects);
FPoint maxSize(maxXPos, maxYPos);
adjustCanvas(FPoint(0,0), maxSize);
if (!ScApp->ScriptRunning)
if (!ScMW->ScriptRunning)
setContentsPos(qRound((Doc->currentPage->xOffset()-10 - Doc->minCanvasCoordinate.x()) * Scale), qRound((Doc->currentPage->yOffset()-10 - Doc->minCanvasCoordinate.y()) * Scale));
if (!Doc->isLoading())
{
8573,7 → 8573,7
 
void ScribusView::setMenTxt(int Seite)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
disconnect(pageSelector, SIGNAL(GotoPage(int)), this, SLOT(GotoPa(int)));
pageSelector->setMaxValue(Doc->pageCount);
8683,7 → 8683,7
 
void ScribusView::DrawNew()
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
evSpon = false;
forceRedraw = true;
8697,7 → 8697,7
 
void ScribusView::SetCCPo(int x, int y)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
center(static_cast<int>((x - Doc->minCanvasCoordinate.x()) * Scale), static_cast<int>((y - Doc->minCanvasCoordinate.y())* Scale));
setRulerPos(contentsX(), contentsY());
8705,7 → 8705,7
 
void ScribusView::SetCPo(int x, int y)
{
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
setContentsPos(static_cast<int>((x - Doc->minCanvasCoordinate.x()) * Scale), static_cast<int>((y - Doc->minCanvasCoordinate.y())* Scale));
setRulerPos(contentsX(), contentsY());
8752,13 → 8752,13
void ScribusView::GotoPa(int Seite)
{
GotoPage(Seite-1);
//ScApp->setFocus();
//ScMW->setFocus();
}
 
void ScribusView::GotoPage(int Seite)
{
Doc->currentPage = Doc->Pages->at(Seite);
if (ScApp->ScriptRunning)
if (ScMW->ScriptRunning)
return;
disconnect(pageSelector, SIGNAL(GotoPage(int)), this, SLOT(GotoPa(int)));
SetCPo(qRound(Doc->currentPage->xOffset()-10), qRound(Doc->currentPage->yOffset()-10));
9358,7 → 9358,7
uint selectedItemCount=Doc->selection->count();
if (selectedItemCount != 0)
{
if (farbe == ScApp->noneString)
if (farbe == ScMW->noneString)
farbe = "None";
if (selectedItemCount > 1)
undoManager->beginTransaction(Um::SelectionGroup,
9390,7 → 9390,7
uint selectedItemCount=Doc->selection->count();
if (selectedItemCount != 0)
{
if (farbe == ScApp->noneString)
if (farbe == ScMW->noneString)
farbe = "None";
if (selectedItemCount > 1)
undoManager->beginTransaction(Um::SelectionGroup, Um::IGroup, Um::SetFontFill,
9465,7 → 9465,7
 
void ScribusView::ItemTextPen(QString farbe)
{
if (farbe == ScApp->noneString)
if (farbe == ScMW->noneString)
farbe = "None";
//uint selectedItemCount=SelItem.count();
uint selectedItemCount=Doc->selection->count();
9792,7 → 9792,7
 
void ScribusView::ItemBrush(QString farbe)
{
if (farbe == ScApp->noneString)
if (farbe == ScMW->noneString)
farbe = "None";
//uint selectedItemCount=SelItem.count();
uint selectedItemCount=Doc->selection->count();
10439,15 → 10439,15
if (!found) //No image frames in the current selection!
return;
UpdatePic();
disconnect( ScApp->scrActions["itemPreviewLow"], SIGNAL(activatedData(int)) , 0, 0 );
disconnect( ScApp->scrActions["itemPreviewNormal"], SIGNAL(activatedData(int)) , 0, 0 );
disconnect( ScApp->scrActions["itemPreviewFull"], SIGNAL(activatedData(int)) , 0, 0 );
ScApp->scrActions["itemPreviewLow"]->setOn(id==ScApp->scrActions["itemPreviewLow"]->actionInt());
ScApp->scrActions["itemPreviewNormal"]->setOn(id==ScApp->scrActions["itemPreviewNormal"]->actionInt());
ScApp->scrActions["itemPreviewFull"]->setOn(id==ScApp->scrActions["itemPreviewFull"]->actionInt());
connect( ScApp->scrActions["itemPreviewLow"], SIGNAL(activatedData(int)), this, SLOT(changePreview(int)) );
connect( ScApp->scrActions["itemPreviewNormal"], SIGNAL(activatedData(int)), this, SLOT(changePreview(int)) );
connect( ScApp->scrActions["itemPreviewFull"], SIGNAL(activatedData(int)), this, SLOT(changePreview(int)) );
disconnect( ScMW->scrActions["itemPreviewLow"], SIGNAL(activatedData(int)) , 0, 0 );
disconnect( ScMW->scrActions["itemPreviewNormal"], SIGNAL(activatedData(int)) , 0, 0 );
disconnect( ScMW->scrActions["itemPreviewFull"], SIGNAL(activatedData(int)) , 0, 0 );
ScMW->scrActions["itemPreviewLow"]->setOn(id==ScMW->scrActions["itemPreviewLow"]->actionInt());
ScMW->scrActions["itemPreviewNormal"]->setOn(id==ScMW->scrActions["itemPreviewNormal"]->actionInt());
ScMW->scrActions["itemPreviewFull"]->setOn(id==ScMW->scrActions["itemPreviewFull"]->actionInt());
connect( ScMW->scrActions["itemPreviewLow"], SIGNAL(activatedData(int)), this, SLOT(changePreview(int)) );
connect( ScMW->scrActions["itemPreviewNormal"], SIGNAL(activatedData(int)), this, SLOT(changePreview(int)) );
connect( ScMW->scrActions["itemPreviewFull"], SIGNAL(activatedData(int)), this, SLOT(changePreview(int)) );
}
}
 
10978,7 → 10978,7
currItem->setLineTransparency(Buffer->TranspStroke);
currItem->setReversed(Buffer->Reverse);
currItem->NamedLStyle = Buffer->NamedLStyle;
currItem->Language = ScApp->GetLang(Buffer->Language);
currItem->Language = ScMW->GetLang(Buffer->Language);
currItem->Cols = Buffer->Cols;
currItem->ColGap = Buffer->ColGap;
if (Buffer->LayerNr != -1)
11248,7 → 11248,7
 
void ScribusView::TextToPath()
{
ScApp->NoFrameEdit();
ScMW->NoFrameEdit();
//uint selectedItemCount=SelItem.count();
uint selectedItemCount=Doc->selection->count();
if (selectedItemCount != 0)
11262,9 → 11262,9
bool cont=false;
if ((!((currItem->asTextFrame()) || (currItem->asPathText()))) || (currItem->isTableItem && currItem->isSingleSel) || (currItem->locked()) || currItem->itemText.count() == 0)
cont=true;
if (currItem==ScApp->storyEditor->currentItem() && Doc==ScApp->storyEditor->currentDocument())
if (currItem==ScMW->storyEditor->currentItem() && Doc==ScMW->storyEditor->currentDocument())
{
QMessageBox::information(ScApp, tr("Cannot Convert In-Use Item"), "<qt>" + tr("The item %1 is currently being edited by Story Editor. The convert to outlines operation for this item will be skipped").arg(currItem->itemName()) + "</qt>", QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton);
QMessageBox::information(ScMW, tr("Cannot Convert In-Use Item"), "<qt>" + tr("The item %1 is currently being edited by Story Editor. The convert to outlines operation for this item will be skipped").arg(currItem->itemName()) + "</qt>", QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton);
cont=true;
}
//Deselect();
11570,9 → 11570,9
void ScribusView::setObjectUndoMode()
{
_isGlobalMode = undoManager->isGlobalMode();
if (ScApp->HaveDoc)
if (ScMW->HaveDoc)
{
ScApp->scrActions["editActionMode"]->setOn(true);
ScMW->scrActions["editActionMode"]->setOn(true);
uint docSelectionCount=Doc->selection->count();
//if (SelItem.count() == 1)
if (docSelectionCount == 1)
11589,9 → 11589,9
 
void ScribusView::setGlobalUndoMode()
{
if (ScApp->HaveDoc)
if (ScMW->HaveDoc)
{
ScApp->scrActions["editActionMode"]->setOn(!_isGlobalMode);
ScMW->scrActions["editActionMode"]->setOn(!_isGlobalMode);
if (_isGlobalMode)
undoManager->showObject(Um::GLOBAL_UNDO_MODE);
else
/branches/Version13x/Scribus/scribus/commonstrings.h
6,7 → 6,7
 
/***************************************************************************
* *
* ScApp program is free software; you can redistribute it and/or modify *
* ScMW program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
/branches/Version13x/Scribus/scribus/actionmanager.cpp
6,7 → 6,7
 
/***************************************************************************
* *
* ScApp program is free software; you can redistribute it and/or modify *
* ScMW program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
24,9 → 24,9
 
ActionManager::ActionManager ( QObject * parent, const char * name ) : QObject ( parent, name )
{
ScApp=(ScribusApp *)parent;
scrActions=&(ScApp->scrActions);
scrActionGroups=&(ScApp->scrActionGroups);
ScMW=(ScribusMainWindow *)parent;
scrActions=&(ScMW->scrActions);
scrActionGroups=&(ScMW->scrActionGroups);
modeActionNames=new QStringList();
nonEditActionNames=new QStringList();
unicodeCharActionNames=new QStringList();
60,49 → 60,49
void ActionManager::initFileMenuActions()
{
//File Menu
scrActions->insert("fileNew", new ScrAction(QIconSet(loadIcon("DateiNeu16.png"), loadIcon("DateiNeu.xpm")), "", CTRL+Key_N, ScApp, "fileNew"));
scrActions->insert("fileOpen", new ScrAction(QIconSet(loadIcon("DateiOpen16.png"), loadIcon("DateiOpen.xpm")), "", CTRL+Key_O, ScApp, "fileOpen"));
scrActions->insert("fileClose", new ScrAction(QIconSet(loadIcon("DateiClos16.png"), loadIcon("DateiClose.png")), "", CTRL+Key_W, ScApp, "fileClose"));
scrActions->insert("fileSave", new ScrAction(QIconSet(loadIcon("DateiSave16.png"), loadIcon("DateiSave2.png")), "", CTRL+Key_S, ScApp, "fileSave"));
scrActions->insert("fileSaveAs", new ScrAction(loadIcon("filesaveas.png"), "", CTRL+SHIFT+Key_S, ScApp, "fileSaveAs"));
scrActions->insert("fileRevert", new ScrAction(loadIcon("revert.png"), "", QKeySequence(), ScApp, "fileRevert"));
scrActions->insert("fileCollect", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "fileCollect"));
scrActions->insert("fileNew", new ScrAction(QIconSet(loadIcon("DateiNeu16.png"), loadIcon("DateiNeu.xpm")), "", CTRL+Key_N, ScMW, "fileNew"));
scrActions->insert("fileOpen", new ScrAction(QIconSet(loadIcon("DateiOpen16.png"), loadIcon("DateiOpen.xpm")), "", CTRL+Key_O, ScMW, "fileOpen"));
scrActions->insert("fileClose", new ScrAction(QIconSet(loadIcon("DateiClos16.png"), loadIcon("DateiClose.png")), "", CTRL+Key_W, ScMW, "fileClose"));
scrActions->insert("fileSave", new ScrAction(QIconSet(loadIcon("DateiSave16.png"), loadIcon("DateiSave2.png")), "", CTRL+Key_S, ScMW, "fileSave"));
scrActions->insert("fileSaveAs", new ScrAction(loadIcon("filesaveas.png"), "", CTRL+SHIFT+Key_S, ScMW, "fileSaveAs"));
scrActions->insert("fileRevert", new ScrAction(loadIcon("revert.png"), "", QKeySequence(), ScMW, "fileRevert"));
scrActions->insert("fileCollect", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "fileCollect"));
//File Import Menu
scrActions->insert("fileImportText", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "fileImportText"));
scrActions->insert("fileImportAppendText", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "fileImportAppendText"));
scrActions->insert("fileImportImage", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "fileImportImage"));
scrActions->insert("fileImportText", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "fileImportText"));
scrActions->insert("fileImportAppendText", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "fileImportAppendText"));
scrActions->insert("fileImportImage", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "fileImportImage"));
 
//File Export Menu
scrActions->insert("fileExportText", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "fileExportText"));
scrActions->insert("fileExportAsEPS", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "fileExportAsEPS"));
scrActions->insert("fileExportAsPDF", new ScrAction(loadIcon("acrobat.png"), "", QKeySequence(), ScApp, "fileExportAsPDF"));
scrActions->insert("fileExportText", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "fileExportText"));
scrActions->insert("fileExportAsEPS", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "fileExportAsEPS"));
scrActions->insert("fileExportAsPDF", new ScrAction(loadIcon("acrobat.png"), "", QKeySequence(), ScMW, "fileExportAsPDF"));
//Rest of File Menu
scrActions->insert("fileDocSetup", new ScrAction(QPixmap(loadIcon("scribusdoc16.png")), "", 0, ScApp, "fileDocSetup"));
scrActions->insert("filePrint", new ScrAction(QIconSet(loadIcon("DateiPrint16.png"), loadIcon("DateiPrint.xpm")), "", CTRL+Key_P, ScApp, "filePrint"));
scrActions->insert("PrintPreview", new ScrAction(QIconSet(noIcon), "", CTRL+ALT+Key_P, ScApp, "PrintPreview"));
scrActions->insert("fileQuit", new ScrAction(QPixmap(loadIcon("exit.png")), "", CTRL+Key_Q, ScApp, "fileQuit"));
scrActions->insert("fileDocSetup", new ScrAction(QPixmap(loadIcon("scribusdoc16.png")), "", 0, ScMW, "fileDocSetup"));
scrActions->insert("filePrint", new ScrAction(QIconSet(loadIcon("DateiPrint16.png"), loadIcon("DateiPrint.xpm")), "", CTRL+Key_P, ScMW, "filePrint"));
scrActions->insert("PrintPreview", new ScrAction(QIconSet(noIcon), "", CTRL+ALT+Key_P, ScMW, "PrintPreview"));
scrActions->insert("fileQuit", new ScrAction(QPixmap(loadIcon("exit.png")), "", CTRL+Key_Q, ScMW, "fileQuit"));
 
//Connect our signals and slots
//File Menu
connect( (*scrActions)["fileNew"], SIGNAL(activated()), ScApp, SLOT(slotFileNew()) );
connect( (*scrActions)["fileOpen"], SIGNAL(activated()), ScApp, SLOT(slotDocOpen()) );
connect( (*scrActions)["fileClose"], SIGNAL(activated()), ScApp, SLOT(slotFileClose()) );
connect( (*scrActions)["filePrint"], SIGNAL(activated()), ScApp, SLOT(slotFilePrint()) );
connect( (*scrActions)["PrintPreview"], SIGNAL(activated()), ScApp, SLOT(printPreview()) );
connect( (*scrActions)["fileSave"], SIGNAL(activated()), ScApp, SLOT(slotFileSave()) );
connect( (*scrActions)["fileSaveAs"], SIGNAL(activated()), ScApp, SLOT(slotFileSaveAs()) );
connect( (*scrActions)["fileDocSetup"], SIGNAL(activated()), ScApp, SLOT(slotDocSetup()) );
connect( (*scrActions)["fileRevert"], SIGNAL(activated()), ScApp, SLOT(slotFileRevert()) );
connect( (*scrActions)["fileCollect"], SIGNAL(activated()), ScApp, SLOT(Collect()) );
connect( (*scrActions)["fileQuit"], SIGNAL(activated()), ScApp, SLOT(slotFileQuit()) );
connect( (*scrActions)["fileNew"], SIGNAL(activated()), ScMW, SLOT(slotFileNew()) );
connect( (*scrActions)["fileOpen"], SIGNAL(activated()), ScMW, SLOT(slotDocOpen()) );
connect( (*scrActions)["fileClose"], SIGNAL(activated()), ScMW, SLOT(slotFileClose()) );
connect( (*scrActions)["filePrint"], SIGNAL(activated()), ScMW, SLOT(slotFilePrint()) );
connect( (*scrActions)["PrintPreview"], SIGNAL(activated()), ScMW, SLOT(printPreview()) );
connect( (*scrActions)["fileSave"], SIGNAL(activated()), ScMW, SLOT(slotFileSave()) );
connect( (*scrActions)["fileSaveAs"], SIGNAL(activated()), ScMW, SLOT(slotFileSaveAs()) );
connect( (*scrActions)["fileDocSetup"], SIGNAL(activated()), ScMW, SLOT(slotDocSetup()) );
connect( (*scrActions)["fileRevert"], SIGNAL(activated()), ScMW, SLOT(slotFileRevert()) );
connect( (*scrActions)["fileCollect"], SIGNAL(activated()), ScMW, SLOT(Collect()) );
connect( (*scrActions)["fileQuit"], SIGNAL(activated()), ScMW, SLOT(slotFileQuit()) );
//File Import Menu
connect( (*scrActions)["fileImportText"], SIGNAL(activated()), ScApp, SLOT(slotFileOpen()) );
connect( (*scrActions)["fileImportAppendText"], SIGNAL(activated()), ScApp, SLOT(slotFileAppend()) );
connect( (*scrActions)["fileImportImage"], SIGNAL(activated()), ScApp, SLOT(slotFileOpen()) );
connect( (*scrActions)["fileImportText"], SIGNAL(activated()), ScMW, SLOT(slotGetContent()) );
connect( (*scrActions)["fileImportAppendText"], SIGNAL(activated()), ScMW, SLOT(slotFileAppend()) );
connect( (*scrActions)["fileImportImage"], SIGNAL(activated()), ScMW, SLOT(slotGetContent()) );
//File Export Menu
connect( (*scrActions)["fileExportText"], SIGNAL(activated()), ScApp, SLOT(SaveText()) );
connect( (*scrActions)["fileExportAsEPS"], SIGNAL(activated()), ScApp, SLOT(SaveAsEps()) );
connect( (*scrActions)["fileExportAsPDF"], SIGNAL(activated()), ScApp, SLOT(SaveAsPDF()) );
connect( (*scrActions)["fileExportText"], SIGNAL(activated()), ScMW, SLOT(SaveText()) );
connect( (*scrActions)["fileExportAsEPS"], SIGNAL(activated()), ScMW, SLOT(SaveAsEps()) );
connect( (*scrActions)["fileExportAsPDF"], SIGNAL(activated()), ScMW, SLOT(SaveAsPDF()) );
//The rest are plugins
}
 
109,52 → 109,52
void ActionManager::initEditMenuActions()
{
//Edit Menu
scrActions->insert("editUndoAction", new ScrAction(ScrAction::DataInt, QIconSet(loadIcon("u_undo16.png"), loadIcon("u_undo.png")), "", CTRL+Key_Z, ScApp, "editUndoAction",1));
scrActions->insert("editRedoAction", new ScrAction(ScrAction::DataInt, QIconSet(loadIcon("u_redo16.png"), loadIcon("u_redo.png")), "", CTRL+SHIFT+Key_Z, ScApp, "editRedoAction", 1));
scrActions->insert("editActionMode", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "editActionMode"));
scrActions->insert("editUndoAction", new ScrAction(ScrAction::DataInt, QIconSet(loadIcon("u_undo16.png"), loadIcon("u_undo.png")), "", CTRL+Key_Z, ScMW, "editUndoAction",1));
scrActions->insert("editRedoAction", new ScrAction(ScrAction::DataInt, QIconSet(loadIcon("u_redo16.png"), loadIcon("u_redo.png")), "", CTRL+SHIFT+Key_Z, ScMW, "editRedoAction", 1));
scrActions->insert("editActionMode", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "editActionMode"));
(*scrActions)["editActionMode"]->setToggleAction(true);
scrActions->insert("editCut", new ScrAction(QIconSet(loadIcon("editcut.png"), loadIcon("editcut22.png")), "", CTRL+Key_X, ScApp, "editCut"));
scrActions->insert("editCopy", new ScrAction(QIconSet(loadIcon("editcopy.png"), loadIcon("editcopy.png")), "", CTRL+Key_C, ScApp, "editCopy"));
scrActions->insert("editPaste", new ScrAction(QIconSet(loadIcon("editpaste.png"), loadIcon("editpaste.png")), "", CTRL+Key_V, ScApp, "editPaste"));
scrActions->insert("editClearContents", new ScrAction(QIconSet(loadIcon("editdelete.png"), loadIcon("editdelete22.png")), "", QKeySequence(), ScApp, "editClearContents"));
scrActions->insert("editSelectAll", new ScrAction(QIconSet(noIcon), "", CTRL+Key_A, ScApp, "editSelectAll"));
scrActions->insert("editDeselectAll", new ScrAction(QIconSet(noIcon), "", CTRL+SHIFT+Key_A, ScApp, "editDeselectAll"));
scrActions->insert("editSearchReplace", new ScrAction(QIconSet(loadIcon("find16.png"), loadIcon("find16.png")), "", QKeySequence(CTRL+Key_F), ScApp, "editSearchReplace"));
scrActions->insert("editCut", new ScrAction(QIconSet(loadIcon("editcut.png"), loadIcon("editcut22.png")), "", CTRL+Key_X, ScMW, "editCut"));
scrActions->insert("editCopy", new ScrAction(QIconSet(loadIcon("editcopy.png"), loadIcon("editcopy.png")), "", CTRL+Key_C, ScMW, "editCopy"));
scrActions->insert("editPaste", new ScrAction(QIconSet(loadIcon("editpaste.png"), loadIcon("editpaste.png")), "", CTRL+Key_V, ScMW, "editPaste"));
scrActions->insert("editClearContents", new ScrAction(QIconSet(loadIcon("editdelete.png"), loadIcon("editdelete22.png")), "", QKeySequence(), ScMW, "editClearContents"));
scrActions->insert("editSelectAll", new ScrAction(QIconSet(noIcon), "", CTRL+Key_A, ScMW, "editSelectAll"));
scrActions->insert("editDeselectAll", new ScrAction(QIconSet(noIcon), "", CTRL+SHIFT+Key_A, ScMW, "editDeselectAll"));
scrActions->insert("editSearchReplace", new ScrAction(QIconSet(loadIcon("find16.png"), loadIcon("find16.png")), "", QKeySequence(CTRL+Key_F), ScMW, "editSearchReplace"))