Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 1641 → Rev 1642

/branches/Version13x/Scribus/scribus/fileloader.cpp
620,6 → 620,109
}
doc->arrowStyles.append(arrow);
}
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")));
if (pg.hasAttribute("MirrorH"))
doc->PDF_Options.MirrorH = static_cast<bool>(QStoInt(pg.attribute("MirrorH")));
else
doc->PDF_Options.MirrorH = false;
if (pg.hasAttribute("MirrorV"))
doc->PDF_Options.MirrorV = static_cast<bool>(QStoInt(pg.attribute("MirrorV")));
else
doc->PDF_Options.MirrorV = false;
if (pg.hasAttribute("RotateDeg"))
doc->PDF_Options.RotateDeg = QStoInt(pg.attribute("RotateDeg","0"));
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 = QStoInt(pg.attribute("Version"));
doc->PDF_Options.Resolution = QStoInt(pg.attribute("Resolution"));
doc->PDF_Options.Binding = QStoInt(pg.attribute("Binding"));
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.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.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.UseLPI = static_cast<bool>(QStoInt(pg.attribute("UseLpi","0")));
QDomNode PFO = PAGE.firstChild();
while(!PFO.isNull())
{
QDomElement pdfF = PFO.toElement();
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"));
doc->PDF_Options.LPISettings[pdfF.attribute("Color")] = lpo;
}
if(pdfF.tagName() == "Fonts")
{
if (!doc->PDF_Options.EmbedList.contains(pdfF.attribute("Name")))
doc->PDF_Options.EmbedList.append(pdfF.attribute("Name"));
}
if(pdfF.tagName() == "Subset")
{
if (!doc->PDF_Options.SubsetList.contains(pdfF.attribute("Name")))
doc->PDF_Options.SubsetList.append(pdfF.attribute("Name"));
}
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"));
doc->PDF_Options.PresentVals.append(ef);
}
PFO = PFO.nextSibling();
}
}
if(pg.tagName()=="DocItemAttributes")
{
QDomNode DIA = PAGE.firstChild();
int count=0;
doc->docItemAttributes.clear();
while(!DIA.isNull())
{
QDomElement itemAttr = DIA.toElement();
if(itemAttr.tagName() == "ItemAttribute")
{
ObjectAttribute objattr;
objattr.name=itemAttr.attribute("Name");
objattr.type=itemAttr.attribute("Type");
objattr.value=itemAttr.attribute("Value");
objattr.parameter=itemAttr.attribute("Parameter");
doc->docItemAttributes.insert(count++,objattr);
}
DIA = DIA.nextSibling();
}
}
if ((pg.tagName()=="PAGE") || (pg.tagName()=="MASTERPAGE"))
{
a = QStoInt(pg.attribute("NUM"));
828,6 → 931,7
}
PAGE=PAGE.nextSibling();
}
/*
PAGE=DOC.firstChild();
while(!PAGE.isNull())
{
916,7 → 1020,7
}
}
PAGE=PAGE.nextSibling();
}
}*/
DOC=DOC.nextSibling();
}
if (TableItems.count() != 0)
/branches/Version13x/Scribus/scribus/prefs.cpp
370,7 → 370,7
addItem( tr("Fonts"), loadIcon("font.png"), tabFonts);
 
tabDocChecker = new TabCheckDoc( prefsWidgets, prefsData->checkerProfiles, prefsData->curCheckProfile);
addItem( tr("Doc-Checker"), loadIcon("checkdoc.png"), tabDocChecker);
addItem( tr("Document Checker"), loadIcon("checkdoc.png"), tabDocChecker);
 
if (CMSavail)
{
/branches/Version13x/Scribus/scribus/scribusXml.cpp
2824,12 → 2824,23
pdf4.setAttribute("SpotFunction", itlp.data().SpotFunc);
pdf.appendChild(pdf4);
}
dc.appendChild(pdf);
QDomElement docItemAttrs = docu.createElement("DocItemAttributes");
for(QMap<int, ObjectAttribute>::Iterator objAttrIt = doc->docItemAttributes.begin() ; objAttrIt != doc->docItemAttributes.end(); ++objAttrIt )
{
QDomElement itemAttr = docu.createElement("ItemAttribute");
itemAttr.setAttribute("Name", objAttrIt.data().name);
itemAttr.setAttribute("Type", objAttrIt.data().type);
itemAttr.setAttribute("Value", objAttrIt.data().value);
itemAttr.setAttribute("Parameter", objAttrIt.data().parameter);
docItemAttrs.appendChild(itemAttr);
}
dc.appendChild(docItemAttrs);
if (dia2 != 0)
{
dia2->setTotalSteps(doc->DocPages.count()+doc->MasterPages.count()+doc->DocItems.count()+doc->MasterItems.count());
dia2->setProgress(0);
}
dc.appendChild(pdf);
WritePages(doc, &docu, &dc, dia2, 0, true);
WritePages(doc, &docu, &dc, dia2, doc->MasterPages.count(), false);
WriteObjects(doc, &docu, &dc, dia2, doc->MasterPages.count()+doc->DocPages.count(), true);
3155,6 → 3166,18
pdf4.setAttribute("SpotFunction", itlp.data().SpotFunc);
pdf.appendChild(pdf4);
}
elem.appendChild(pdf);
QDomElement docItemAttrs = docu.createElement("DefaultItemAttributes");
for(QMap<int, ObjectAttribute>::Iterator objAttrIt = Vor->defaultItemAttributes.begin() ; objAttrIt != Vor->defaultItemAttributes.end(); ++objAttrIt )
{
QDomElement itemAttr = docu.createElement("ItemAttribute");
itemAttr.setAttribute("Name", objAttrIt.data().name);
itemAttr.setAttribute("Type", objAttrIt.data().type);
itemAttr.setAttribute("Value", objAttrIt.data().value);
itemAttr.setAttribute("Parameter", objAttrIt.data().parameter);
docItemAttrs.appendChild(itemAttr);
}
elem.appendChild(docItemAttrs);
QFile f(ho);
if(!f.open(IO_WriteOnly))
return;
3484,6 → 3507,26
PFO = PFO.nextSibling();
}
}
if(dc.tagName()=="DefaultItemAttributes")
{
QDomNode DIA = DOC.firstChild();
int count=0;
Vorein->defaultItemAttributes.clear();
while(!DIA.isNull())
{
QDomElement itemAttr = DIA.toElement();
if(itemAttr.tagName() == "ItemAttribute")
{
ObjectAttribute objattr;
objattr.name=itemAttr.attribute("Name");
objattr.type=itemAttr.attribute("Type");
objattr.value=itemAttr.attribute("Value");
objattr.parameter=itemAttr.attribute("Parameter");
Vorein->defaultItemAttributes.insert(count++,objattr);
}
DIA = DIA.nextSibling();
}
}
DOC=DOC.nextSibling();
}
if (Vorein->GUI != "Default")
/branches/Version13x/Scribus/scribus/docitemattrprefs.ui.h
36,7 → 36,6
attributesTable->setItem(it.key(), i++, item2);
QTableItem *item3 = new QTableItem(attributesTable, QTableItem::WhenCurrent, it.data().parameter);
attributesTable->setItem(it.key(), i++, item3);
 
attributesTable->verticalHeader()->setLabel(it.key(), QString("%1").arg(it.key()));
}
/branches/Version13x/Scribus/scribus/scribus.cpp
602,22 → 602,8
Prefs.PDF_Options.UseLPI = false;
Prefs.PDF_Options.LPISettings.clear();
//Attribute setup
ObjectAttribute objattr;
objattr.name="Name";
objattr.type="String";
objattr.value="";
objattr.parameter="";
//Attribute setup
Prefs.defaultItemAttributes.clear();
Prefs.defaultItemAttributes.insert(0,objattr);
objattr.name="Author";
Prefs.defaultItemAttributes.insert(1,objattr);
objattr.name="Title";
Prefs.defaultItemAttributes.insert(2,objattr);
objattr.name="Table of Contents Entry";
objattr.value="My Toc Entry";
objattr.parameter="1";
Prefs.defaultItemAttributes.insert(3,objattr);
}
 
 
2940,24 → 2926,6
doc->PDF_Options.Intent = doc->CMSSettings.DefaultIntentMonitor;
doc->PDF_Options.Intent2 = doc->CMSSettings.DefaultIntentMonitor2;
/*CB TODO
for(QMap<int, ObjectAttribute>::Iterator it = Prefs.defaultItemAttributes->begin(); it!= Prefs.defaultItemAttributes->end(); ++it)
{
uint i=0;
QTableItem *item = new QTableItem(attributesTable, QTableItem::Never, it.data().name);
attributesTable->setItem(it.key(), i++, item);
QTableItem *item1 = new QTableItem(attributesTable, QTableItem::Never, it.data().type);
attributesTable->setItem(it.key(), i++, item1);
QTableItem *item2 = new QTableItem(attributesTable, QTableItem::Never, it.data().value);
attributesTable->setItem(it.key(), i++, item2);
QTableItem *item3 = new QTableItem(attributesTable, QTableItem::Never, it.data().parameter);
attributesTable->setItem(it.key(), i++, item3);
 
attributesTable->verticalHeader()->setLabel(it.key(), QString("%1").arg(it.key()));
}
*/
struct LPIData lpo;
lpo.Frequency = 75;
lpo.SpotFunc = 2;