r15037 by cbradney - Move Document Information and Sections to the prefsdata struct
scribus-commit
scribus-commit at lists.scribus.net
Sun May 2 23:52:27 CEST 2010
Revision: 15037
Author: cbradney
Date: 2010-05-02T21:48:45.444572Z
Commit message: Move Document Information and Sections to the prefsdata struct
Changeset:
M /trunk/Scribus/scribus/documentinformation.h
M /trunk/Scribus/scribus/plugins/scripter/scripterimpl.cpp
M /trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
M /trunk/Scribus/scribus/pageitem.cpp
M /trunk/Scribus/scribus/ui/reformdoc.cpp
M /trunk/Scribus/scribus/ui/prefs_documentinformation.cpp
M /trunk/Scribus/scribus/scribusdoc.cpp
M /trunk/Scribus/scribus/scdocoutput_ps2.cpp
M /trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp
M /trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
M /trunk/Scribus/scribus/scribusdoc.h
M /trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
M /trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp
M /trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp
M /trunk/Scribus/scribus/pdflib_core.cpp
M /trunk/Scribus/scribus/plugins/import/ai/importai.cpp
M /trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
M /trunk/Scribus/scribus/pslib.cpp
M /trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
M /trunk/Scribus/scribus/scribus.cpp
M /trunk/Scribus/scribus/prefsstructs.h
M /trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
M /trunk/Scribus/scribus/plugins/CMakeLists.txt
M /trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp
M /trunk/Scribus/scribus/docinfo.cpp
M /trunk/Scribus/scribus/documentinformation.cpp
M /trunk/Scribus/scribus/plugins/scriptplugin/pconsole.cpp
M /trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
M /trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
Diffs:
Index: scribus/pdflib_core.cpp
===================================================================
--- scribus/pdflib_core.cpp (revision 15036)
+++ scribus/pdflib_core.cpp (revision 15037)
@@ -858,8 +858,8 @@
IDg += Options.fileName;
IDg += "Scribus "+QString(VERSION);
IDg += "Scribus PDF Library "+QString(VERSION);
- IDg += doc.documentInfo.getTitle();
- IDg += doc.documentInfo.getAuthor();
+ IDg += doc.documentInfo().title();
+ IDg += doc.documentInfo().author();
IDg += "/False";
FileID = ComputeMD5(IDg);
if (Options.Encrypt)
@@ -888,14 +888,14 @@
StartObj(2);
PutDoc("<<\n/Creator "+EncString("(Scribus "+QString(VERSION)+")",2)+"\n");
PutDoc("/Producer "+EncString("(Scribus PDF Library "+QString(VERSION)+")",2)+"\n");
- QString docTitle = doc.documentInfo.getTitle();
+ QString docTitle = doc.documentInfo().title();
if (((Options.Version == PDFOptions::PDFVersion_X3) || (Options.Version == PDFOptions::PDFVersion_X1a) || (Options.Version == PDFOptions::PDFVersion_X4)) && (docTitle.isEmpty()))
PutDoc("/Title "+EncStringUTF16("("+doc.DocName+")",2)+"\n");
else
- PutDoc("/Title "+EncStringUTF16("("+doc.documentInfo.getTitle()+")",2)+"\n");
- PutDoc("/Author "+EncStringUTF16("("+doc.documentInfo.getAuthor()+")",2)+"\n");
- PutDoc("/Subject "+EncStringUTF16("("+doc.documentInfo.getSubject()+")",2)+"\n");
- PutDoc("/Keywords "+EncStringUTF16("("+doc.documentInfo.getKeywords()+")",2)+"\n");
+ PutDoc("/Title "+EncStringUTF16("("+doc.documentInfo().title()+")",2)+"\n");
+ PutDoc("/Author "+EncStringUTF16("("+doc.documentInfo().author()+")",2)+"\n");
+ PutDoc("/Subject "+EncStringUTF16("("+doc.documentInfo().subject()+")",2)+"\n");
+ PutDoc("/Keywords "+EncStringUTF16("("+doc.documentInfo().keywords()+")",2)+"\n");
PutDoc("/CreationDate "+EncString("("+Datum+")",2)+"\n");
PutDoc("/ModDate "+EncString("("+Datum+")",2)+"\n");
if (Options.Version == PDFOptions::PDFVersion_X3)
@@ -2759,7 +2759,7 @@
QPainterPath painter1, painter2;
QFont infoFont("Helvetica", 7);
double startX = markOffs+bleedLeft+10.0;
- QString docTitle = doc.documentInfo.getTitle();
+ QString docTitle = doc.documentInfo().title();
if (docTitle.isEmpty())
{
QFileInfo fi(doc.DocName);
@@ -10022,7 +10022,7 @@
QString pdfNS = "http://ns.adobe.com/pdf/1.3/";
descPDF.setAttributeNS(pdfNS, "pdf:Producer", "Scribus PDF Library "+QString(VERSION));
descPDF.setAttribute("pdf:Trapped", "False");
- descPDF.setAttribute("pdf:Keywords", doc.documentInfo.getKeywords());
+ descPDF.setAttribute("pdf:Keywords", doc.documentInfo().keywords());
QDomElement descDC = desc.cloneNode().toElement();
rdf.appendChild(descDC);
@@ -10035,7 +10035,7 @@
QDomElement li1 = xmpDoc.createElement("rdf:li");
li1.setAttribute("xml:lang", "x-default");
alt1.appendChild(li1);
- QString docTitle = doc.documentInfo.getTitle();
+ QString docTitle = doc.documentInfo().title();
if (((Options.Version == PDFOptions::PDFVersion_X3) || (Options.Version == PDFOptions::PDFVersion_X1a) || (Options.Version == PDFOptions::PDFVersion_X4)) && (docTitle.isEmpty()))
docTitle = doc.DocName;
li1.appendChild(xmpDoc.createTextNode(docTitle));
@@ -10045,7 +10045,7 @@
creator.appendChild(seq);
QDomElement li2 = xmpDoc.createElement("rdf:li");
seq.appendChild(li2);
- li2.appendChild(xmpDoc.createTextNode(doc.documentInfo.getAuthor()));
+ li2.appendChild(xmpDoc.createTextNode(doc.documentInfo().author()));
// Subject's entry in Document Info dictionary is actually dc:description in XMP, not dc:subject.
QDomElement description = xmpDoc.createElement("dc:description");
descDC.appendChild(description);
@@ -10054,7 +10054,7 @@
QDomElement li3 = xmpDoc.createElement("rdf:li");
li3.setAttribute("xml:lang", "x-default");
alt2.appendChild(li3);
- li3.appendChild(xmpDoc.createTextNode(doc.documentInfo.getSubject()));
+ li3.appendChild(xmpDoc.createTextNode(doc.documentInfo().subject()));
if ((Options.Version == PDFOptions::PDFVersion_X3) || (Options.Version == PDFOptions::PDFVersion_X1a) || (Options.Version == PDFOptions::PDFVersion_X4))
{
Index: scribus/scribusdoc.cpp
===================================================================
--- scribus/scribusdoc.cpp (revision 15036)
+++ scribus/scribusdoc.cpp (revision 15037)
@@ -3139,7 +3139,7 @@
if (key == -1)
pageNumberText = "";
else
- pageNumberText = out.arg(getStringFromSequence(sections[key].type, sections[key].toindex - sections[key].fromindex + 1));
+ pageNumberText = out.arg(getStringFromSequence(docPrefsData.docSectionMap[key].type, docPrefsData.docSectionMap[key].toindex - docPrefsData.docSectionMap[key].fromindex + 1));
}
else
{
@@ -3154,7 +3154,7 @@
if (key == -1)
newText = "";
else
- newText = out.arg(getStringFromSequence(sections[key].type, sections[key].toindex - sections[key].fromindex + 1));
+ newText = out.arg(getStringFromSequence(docPrefsData.docSectionMap[key].type, docPrefsData.docSectionMap[key].toindex - docPrefsData.docSectionMap[key].fromindex + 1));
for (int nti=0;nti<newText.length();++nti)
if (pageNumberText.indexOf(newText[nti])==-1)
pageNumberText+=newText[nti];
@@ -5330,7 +5330,7 @@
{
struct DocumentSection newSection;
uint docPageCount=DocPages.count();
- bool empty=sections.isEmpty();
+ bool empty=docPrefsData.docSectionMap.isEmpty();
if (empty)
{
newSection.number=0;
@@ -5341,7 +5341,7 @@
newSection.sectionstartindex=1;
newSection.reversed=false;
newSection.active=true;
- sections.insert(newSection.number, newSection);
+ docPrefsData.docSectionMap.insert(newSection.number, newSection);
}
else if (number!=-1)
{
@@ -5355,22 +5355,22 @@
newSection.sectionstartindex=sectionstartindex;
newSection.reversed=reversed;
newSection.active=active;
- sections.insert(newSection.number, newSection);
+ docPrefsData.docSectionMap.insert(newSection.number, newSection);
}
}
bool ScribusDoc::deleteSection(const uint number)
{
- if (!sections.contains(number))
+ if (!docPrefsData.docSectionMap.contains(number))
return false;
- if (sections.count()<=1)
+ if (docPrefsData.docSectionMap.count()<=1)
return false;
- QMap<uint, DocumentSection>::Iterator itprev=sections.begin();
+ QMap<uint, DocumentSection>::Iterator itprev=docPrefsData.docSectionMap.begin();
QMap<uint, DocumentSection>::Iterator it=itprev;
uint currMinIndex = itprev.value().fromindex;
uint currMaxIndex = itprev.value().toindex;
- for ( ; it != sections.end(); ++it )
+ for ( ; it != docPrefsData.docSectionMap.end(); ++it )
{
currMinIndex=it.value().fromindex;
currMaxIndex=it.value().toindex;
@@ -5388,7 +5388,7 @@
++itnext;
itnext.value().fromindex=it.value().fromindex;
}
- sections.erase(it);
+ docPrefsData.docSectionMap.erase(it);
return true;
}
@@ -5397,8 +5397,8 @@
{
bool found=false;
int retVal=-1;
- DocumentSectionMap::ConstIterator it = sections.begin();
- for (; it!= sections.end(); ++it)
+ DocumentSectionMap::ConstIterator it = docPrefsData.docSectionMap.begin();
+ for (; it!= docPrefsData.docSectionMap.end(); ++it)
{
if (pageIndex>=it.value().fromindex && pageIndex<=it.value().toindex)
{
@@ -5419,11 +5419,11 @@
if (key==-1)
return retVal;
- uint sectionIndexOffset=pageIndex-sections[key].fromindex+sections[key].sectionstartindex;
+ uint sectionIndexOffset=pageIndex-docPrefsData.docSectionMap[key].fromindex+docPrefsData.docSectionMap[key].sectionstartindex;
//If a section is inactive, theres no page numbers printed
- if (sections[key].active==false)
+ if (docPrefsData.docSectionMap[key].active==false)
return "";
- retVal=getStringFromSequence(sections[key].type, sectionIndexOffset);
+ retVal=getStringFromSequence(docPrefsData.docSectionMap[key].type, sectionIndexOffset);
return retVal;
}
@@ -5442,8 +5442,8 @@
uint searchedIndex = (otherPageIndex > 0) ? (otherPageIndex - 1) : 0;
if ((location == 0) && (searchedIndex > 0))
--searchedIndex;
- DocumentSectionMap::Iterator it = sections.begin();
- for (; it!= sections.end(); ++it)
+ DocumentSectionMap::Iterator it = docPrefsData.docSectionMap.begin();
+ for (; it!= docPrefsData.docSectionMap.end(); ++it)
{
fromIndex = it.value().fromindex;
toIndex = it.value().toindex;
@@ -5461,19 +5461,19 @@
{
//Get the section of the new page index.
uint fromIndex, toIndex;
- DocumentSectionMap::Iterator it = sections.begin();
- for (; it!= sections.end(); ++it)
+ DocumentSectionMap::Iterator it = docPrefsData.docSectionMap.begin();
+ for (; it!= docPrefsData.docSectionMap.end(); ++it)
{
if (pageIndex>=it.value().fromindex && pageIndex<=it.value().toindex)
{
fromIndex = it.value().fromindex;
toIndex = it.value().toindex - 1;
if (fromIndex > toIndex) // Remove section in that case
- sections.remove(it.key());
+ docPrefsData.docSectionMap.remove(it.key());
break;
}
}
- for (it = sections.begin(); it != sections.end(); ++it)
+ for (it = docPrefsData.docSectionMap.begin(); it != docPrefsData.docSectionMap.end(); ++it)
{
fromIndex = it.value().fromindex;
toIndex = it.value().toindex;
@@ -5489,7 +5489,7 @@
void ScribusDoc::setFirstSectionFromFirstPageNumber()
{
- DocumentSectionMap::Iterator it = sections.begin();
+ DocumentSectionMap::Iterator it = docPrefsData.docSectionMap.begin();
it.value().sectionstartindex=FirstPnum;
updateSectionPageNumbersToPages();
}
Index: scribus/docinfo.cpp
===================================================================
--- scribus/docinfo.cpp (revision 15036)
+++ scribus/docinfo.cpp (revision 15037)
@@ -206,20 +206,20 @@
void DocInfos::restoreDefaults()
{
- titleEdit->setText(infos.getTitle());
- subjectEdit->setText(infos.getSubject());
- authorEdit->setText(infos.getAuthor());
- descriptionEdit->setPlainText(infos.getComments());
- keywordsEdit->setPlainText(infos.getKeywords());
- publisherEdit->setText(infos.getPublisher());
- dateEdit->setText(infos.getDate());
- typeEdit->setText(infos.getType());
- formatEdit->setText(infos.getFormat());
- identifierEdit->setText(infos.getIdent());
- sourceEdit->setText(infos.getSource());
- languageEdit->setText(infos.getLangInfo());
- relationEdit->setText(infos.getRelation());
- coverageEdit->setText(infos.getCover());
- rightsEdit->setText(infos.getRights());
- contributorsEdit->setPlainText(infos.getContrib());
+ titleEdit->setText(infos.title());
+ subjectEdit->setText(infos.subject());
+ authorEdit->setText(infos.author());
+ descriptionEdit->setPlainText(infos.comments());
+ keywordsEdit->setPlainText(infos.keywords());
+ publisherEdit->setText(infos.publisher());
+ dateEdit->setText(infos.date());
+ typeEdit->setText(infos.type());
+ formatEdit->setText(infos.format());
+ identifierEdit->setText(infos.ident());
+ sourceEdit->setText(infos.source());
+ languageEdit->setText(infos.langInfo());
+ relationEdit->setText(infos.relation());
+ coverageEdit->setText(infos.cover());
+ rightsEdit->setText(infos.rights());
+ contributorsEdit->setPlainText(infos.contrib());
}
Index: scribus/documentinformation.h
===================================================================
--- scribus/documentinformation.h (revision 15036)
+++ scribus/documentinformation.h (revision 15037)
@@ -30,22 +30,22 @@
public:
DocumentInformation();
~DocumentInformation() {};
- const QString getAuthor();
- const QString getComments();
- const QString getContrib();
- const QString getCover();
- const QString getDate();
- const QString getFormat();
- const QString getIdent();
- const QString getKeywords();
- const QString getLangInfo();
- const QString getPublisher();
- const QString getRelation();
- const QString getRights();
- const QString getSource();
- const QString getSubject();
- const QString getTitle();
- const QString getType();
+ const QString& author();
+ const QString& comments();
+ const QString& contrib();
+ const QString& cover();
+ const QString& date();
+ const QString& format();
+ const QString& ident();
+ const QString& keywords();
+ const QString& langInfo();
+ const QString& publisher();
+ const QString& relation();
+ const QString& rights();
+ const QString& source();
+ const QString& subject();
+ const QString& title();
+ const QString& type();
void setAuthor(const QString &_author);
void setComments(const QString &_comments);
@@ -64,23 +64,23 @@
void setTitle(const QString &_title);
void setType(const QString &_type);
- private:
- QString author;
- QString comments;
- QString contrib;
- QString cover;
- QString date;
- QString format;
- QString ident;
- QString keywords;
- QString langInfo;
- QString publisher;
- QString relation;
- QString rights;
- QString source;
- QString subject;
- QString title;
- QString type;
+ protected:
+ QString m_author;
+ QString m_comments;
+ QString m_contrib;
+ QString m_cover;
+ QString m_date;
+ QString m_format;
+ QString m_ident;
+ QString m_keywords;
+ QString m_langInfo;
+ QString m_publisher;
+ QString m_relation;
+ QString m_rights;
+ QString m_source;
+ QString m_subject;
+ QString m_title;
+ QString m_type;
};
#endif
Index: scribus/scdocoutput_ps2.cpp
===================================================================
--- scribus/scdocoutput_ps2.cpp (revision 15036)
+++ scribus/scdocoutput_ps2.cpp (revision 15037)
@@ -22,8 +22,8 @@
m_pageNumbers = pageNumbers;
m_clip = clip;
m_options = options;
- m_author = doc->documentInfo.getAuthor();
- m_title = doc->documentInfo.getTitle();
+ m_author = doc->documentInfo().author();
+ m_title = doc->documentInfo().title();
m_creator = QString("Scribus ") + QString(VERSION);
}
Index: scribus/prefsstructs.h
===================================================================
--- scribus/prefsstructs.h (revision 15036)
+++ scribus/prefsstructs.h (revision 15037)
@@ -16,9 +16,11 @@
#include <QList>
#include <QSet>
#include <QHash>
+#include "pagestructs.h"
#include "pdfoptions.h"
#include "scfonts.h"
#include "vgradient.h"
+#include "documentinformation.h"
struct CheckerPrefs
{
@@ -374,34 +376,35 @@
int compressionLevel; //!< Cache image compression level (see QImage)
};
+
struct ApplicationPrefs
{
- UIPrefs uiPrefs;
- PathPrefs pathPrefs;
+ ColorPrefs colorPrefs;
+ DisplayPrefs displayPrefs;
DocumentSetupPrefs docSetupPrefs;
+ ExternalToolsPrefs extToolPrefs;
+ FontPrefs fontPrefs;
GuidesPrefs guidesPrefs;
- TypoPrefs typoPrefs;
- ItemToolPrefs itemToolPrefs;
- OperatorToolPrefs opToolPrefs;
HyphenatorPrefs hyphPrefs;
- FontPrefs fontPrefs;
- PrinterPrefs printerPrefs;
- ColorPrefs colorPrefs;
- PDFOptions pdfPrefs;
+ ImageCachePrefs imageCachePrefs;
ItemAttrPrefs itemAttrPrefs;
- TOCPrefs tocPrefs;
+ ItemToolPrefs itemToolPrefs;
KeyboardShortcutsPrefs keyShortcutPrefs;
- ScrapbookPrefs scrapbookPrefs;
- DisplayPrefs displayPrefs;
- ExternalToolsPrefs extToolPrefs;
MiscellaneousPrefs miscPrefs;
+ OperatorToolPrefs opToolPrefs;
+ PDFOptions pdfPrefs;
+ PathPrefs pathPrefs;
PluginPrefs pluginPrefs;
+ PrintPreviewPrefs printPreviewPrefs;
+ PrinterPrefs printerPrefs;
+ ScrapbookPrefs scrapbookPrefs;
+ ScripterPrefs scripterPrefs;
ShortWordPrefs shortwordPrefs;
- ScripterPrefs scripterPrefs;
+ StoryEditorPrefs storyEditorPrefs;
+ TOCPrefs tocPrefs;
+ TypoPrefs typoPrefs;
+ UIPrefs uiPrefs;
VerifierPrefs verifierPrefs;
- StoryEditorPrefs storyEditorPrefs;
- PrintPreviewPrefs printPreviewPrefs;
- ImageCachePrefs imageCachePrefs;
QList<ArrowDesc> arrowStyles;
QMap<QString, VGradient> defaultGradients;
@@ -413,6 +416,10 @@
//! System default QStyle name for current instance, seemingly unused
QString ui_SystemTheme;
// bool Gcr_Mode;
+
+ //Added for Doc Only
+ DocumentInformation docInfo;
+ DocumentSectionMap docSectionMap;
};
#endif
Index: scribus/pageitem.cpp
===================================================================
--- scribus/pageitem.cpp (revision 15036)
+++ scribus/pageitem.cpp (revision 15037)
@@ -2407,7 +2407,7 @@
int key = m_Doc->getSectionKeyForPageIndex(OwnPage);
if (key == -1)
return "%";
- chstr = out.arg(getStringFromSequence(m_Doc->sections[key].type, m_Doc->sections[key].toindex - m_Doc->sections[key].fromindex + 1));
+ chstr = out.arg(getStringFromSequence(m_Doc->sections()[key].type, m_Doc->sections()[key].toindex - m_Doc->sections()[key].fromindex + 1));
}
else
return "%";
Index: scribus/scribusdoc.h
===================================================================
--- scribus/scribusdoc.h (revision 15036)
+++ scribus/scribusdoc.h (revision 15037)
@@ -213,6 +213,10 @@
OperatorToolPrefs& opToolPrefs() { return docPrefsData.opToolPrefs; }
ColorPrefs& colorPrefs() { return docPrefsData.colorPrefs; }
CMSData& cmsSettings() { return docPrefsData.colorPrefs.DCMSset; }
+ DocumentInformation& documentInfo() { return docPrefsData.docInfo; }
+ void setDocumentInfo(DocumentInformation di) { docPrefsData.docInfo=di; }
+ DocumentSectionMap& sections() { return docPrefsData.docSectionMap; }
+ void setSections(DocumentSectionMap dsm) { docPrefsData.docSectionMap=dsm; }
const ApplicationPrefs& prefsData() { return docPrefsData; }
void setNewPrefs(const ApplicationPrefs& prefsData, const ApplicationPrefs& oldPrefsData);
@@ -1078,8 +1082,8 @@
bool useRaster;
/** \brief Im Dokument benutzte Farben */
ColorList PageColors;
- /** \brief InfoStrings fuer das aktuelle Dokument */
- DocumentInformation documentInfo;
+ //->Prefs /** \brief InfoStrings fuer das aktuelle Dokument */
+ //->Prefs DocumentInformation documentInfo;
int appMode;
int SubMode;
double *ShapeValues;
@@ -1191,7 +1195,7 @@
//Attributes to be applied to frames
//->Prefs ObjAttrVector docItemAttributes;
//->Prefs ToCSetupVector docToCSetups;
- DocumentSectionMap sections;
+ //->Prefs DocumentSectionMap sections;
FPointArray symReturn;
FPointArray symNewLine;
FPointArray symTab;
Index: scribus/documentinformation.cpp
===================================================================
--- scribus/documentinformation.cpp (revision 15036)
+++ scribus/documentinformation.cpp (revision 15037)
@@ -23,180 +23,181 @@
DocumentInformation::DocumentInformation()
{
- author = "";
- comments = "";
- contrib = "";
- cover = "";
- date = "";
- format = "";
- ident = "";
- keywords = "";
- langInfo = "";
- publisher = "";
- relation = "";
- rights = "";
- source = "";
- title = "";
- type = "";
+ /*m_author = "";
+ m_comments = "";
+ m_contrib = "";
+ m_cover = "";
+ m_date = "";
+ m_format = "";
+ m_ident = "";
+ m_keywords = "";
+ m_langInfo = "";
+ m_publisher = "";
+ m_relation = "";
+ m_rights = "";
+ m_source = "";
+ m_title = "";
+ m_type = "";*/
}
-const QString DocumentInformation::getAuthor()
+const QString& DocumentInformation::author()
{
- return author;
+ return m_author;
}
-const QString DocumentInformation::getComments()
+const QString& DocumentInformation::comments()
{
- return comments;
+ return m_comments;
}
-const QString DocumentInformation::getContrib()
+const QString& DocumentInformation::contrib()
{
- return contrib;
+ return m_contrib;
}
-const QString DocumentInformation::getCover()
+const QString& DocumentInformation::cover()
{
- return cover;
+ return m_cover;
}
-const QString DocumentInformation::getDate()
+const QString& DocumentInformation::date()
{
- return date;
+ return m_date;
}
-const QString DocumentInformation::getFormat()
+const QString& DocumentInformation::format()
{
- return format;
+ return m_format;
}
-const QString DocumentInformation::getIdent()
+const QString& DocumentInformation::ident()
{
- return ident;
+ return m_ident;
}
-const QString DocumentInformation::getKeywords()
+const QString& DocumentInformation::keywords()
{
- return keywords;
+ return m_keywords;
}
-const QString DocumentInformation::getLangInfo()
+const QString& DocumentInformation::langInfo()
{
- return langInfo;
+ return m_langInfo;
}
-const QString DocumentInformation::getPublisher()
+const QString& DocumentInformation::publisher()
{
- return publisher;
+ return m_publisher;
}
-const QString DocumentInformation::getRelation()
+const QString& DocumentInformation::relation()
{
- return relation;
+ return m_relation;
}
-const QString DocumentInformation::getRights()
+const QString& DocumentInformation::rights()
{
- return rights;
+ return m_rights;
}
-const QString DocumentInformation::getSource()
+const QString& DocumentInformation::source()
{
- return source;
+ return m_source;
}
-const QString DocumentInformation::getSubject()
+const QString& DocumentInformation::subject()
{
- return subject;
+ return m_subject;
}
-const QString DocumentInformation::getTitle()
+const QString& DocumentInformation::title()
{
- return title;
+ return m_title;
}
-const QString DocumentInformation::getType()
+const QString& DocumentInformation::type()
{
- return type;
+ return m_type;
}
void DocumentInformation::setAuthor(const QString &_author)
{
- author=_author;
+ m_author=_author;
}
void DocumentInformation::setComments(const QString &_comments)
{
- comments=_comments;
+ m_comments=_comments;
}
void DocumentInformation::setContrib(const QString &_contrib)
{
- contrib=_contrib;
+ m_contrib=_contrib;
}
void DocumentInformation::setCover(const QString &_cover)
{
- cover=_cover;
+ m_cover=_cover;
}
void DocumentInformation::setDate(const QString &_date)
{
- date=_date;
+ m_date=_date;
}
void DocumentInformation::setFormat(const QString &_format)
{
- format=_format;
+ m_format=_format;
}
void DocumentInformation::setIdent(const QString &_ident)
{
- ident=_ident;
+ m_ident=_ident;
}
void DocumentInformation::setKeywords(const QString &_keywords)
{
- keywords=_keywords;
+ m_keywords=_keywords;
}
void DocumentInformation::setLangInfo(const QString &_langInfo)
{
- langInfo=_langInfo;
+ m_langInfo=_langInfo;
}
void DocumentInformation::setPublisher(const QString &_publisher)
{
- publisher=_publisher;
+ m_publisher=_publisher;
}
void DocumentInformation::setRelation(const QString &_relation)
{
- relation=_relation;
+ m_relation=_relation;
}
void DocumentInformation::setRights(const QString &_rights)
{
- rights=_rights;
+ m_rights=_rights;
}
void DocumentInformation::setSource(const QString &_source)
{
- source=_source;
+ m_source=_source;
}
void DocumentInformation::setSubject(const QString & _subject)
{
- subject = _subject;
+ m_subject = _subject;
}
void DocumentInformation::setTitle(const QString &_title)
{
- title=_title;
+ m_title=_title;
}
void DocumentInformation::setType(const QString &_type)
{
- type=_type;
+ m_type=_type;
}
+
Index: scribus/ui/reformdoc.cpp
===================================================================
--- scribus/ui/reformdoc.cpp (revision 15036)
+++ scribus/ui/reformdoc.cpp (revision 15037)
@@ -65,7 +65,7 @@
tabPage->hideReform();
addItem( tr("Document"), loadIcon("scribusdoc.png"), tabPage);
- docInfos = new DocInfos(prefsWidgets, doc->documentInfo);
+ docInfos = new DocInfos(prefsWidgets, doc->documentInfo());
addItem( tr("Document Information"), loadIcon("documentinfo32.png"), docInfos);
tabGuides = new TabGuides(prefsWidgets, &doc->guidesPrefs(), &doc->typographicPrefs(), docUnitIndex);
@@ -106,7 +106,7 @@
addItem( tr("Table of Contents and Indexes"), loadIcon("tabtocindex.png"), tabTOCIndexPrefs);
tabDocSections = new DocSections(prefsWidgets);
- tabDocSections->setup(currDoc->sections, currDoc->DocPages.count()-1);
+ tabDocSections->setup(currDoc->sections(), currDoc->DocPages.count()-1);
addItem( tr("Sections"), loadIcon("tabtocindex.png"), tabDocSections);
int cmsTab = 0;
@@ -630,10 +630,10 @@
}
}
- currDoc->documentInfo = docInfos->getDocInfo();
+ currDoc->setDocumentInfo(docInfos->getDocInfo());
currDoc->setItemAttributes(*(tabDocItemAttributes->getNewAttributes()));
currDoc->setTocSetups(*(tabTOCIndexPrefs->getNewToCs()));
- currDoc->sections = tabDocSections->getNewSections();
+ currDoc->setSections(tabDocSections->getNewSections());
uint itemCount=currDoc->Items->count();
for (uint b=0; b<itemCount; ++b)
Index: scribus/ui/prefs_documentinformation.cpp
===================================================================
--- scribus/ui/prefs_documentinformation.cpp (revision 15036)
+++ scribus/ui/prefs_documentinformation.cpp (revision 15037)
@@ -26,11 +26,41 @@
void Prefs_DocumentInformation::restoreDefaults(struct ApplicationPrefs *prefsData)
{
-// autoSendCopiedToScrapCheckBox->setChecked(prefsData->scrapbookPrefs.doCopyToScrapbook);
+// titleLineEdit->setText(prefsData->docInfo.title());
+// authorLineEdit->setText(prefsData->docInfo.author());
+// subjectLineEdit->setText(prefsData->docInfo.subject());
+// keywordsTextEdit->setText(prefsData->docInfo.keywords());
+// descriptionTextEdit->setText(prefsData->docInfo.comments());
+// publisherLineEdit->setText(prefsData->docInfo.publisher());
+// contributorsTextEdit->setText(prefsData->docInfo.contrib());
+// dateLineEdit->setText(prefsData->docInfo.date());
+// typeLineEdit->setText(prefsData->docInfo.type());
+// formatLineEdit->setText(prefsData->docInfo.format());
+// identifierLineEdit->setText(prefsData->docInfo.ident());
+// sourceLineEdit->setText(prefsData->docInfo.source());
+// languageLineEdit->setText(prefsData->docInfo.langInfo());
+// relationLineEdit->setText(prefsData->docInfo.relation());
+// coverageLineEdit->setText(prefsData->docInfo.cover());
+// rightsLineEdit->setText(prefsData->docInfo.rights());
}
void Prefs_DocumentInformation::saveGuiToPrefs(struct ApplicationPrefs *prefsData) const
{
-// prefsData->scrapbookPrefs.doCopyToScrapbook=autoSendCopiedToScrapCheckBox->isChecked();
+// prefsData->docInfo.setTitle(titleLineEdit->text());
+// prefsData->docInfo.setAuthor(authorLineEdit->text());
+// prefsData->docInfo.setSubject(subjectLineEdit->text());
+// prefsData->docInfo.setKeywords(keywordsTextEdit->toPlainText());
+// prefsData->docInfo.setComments(descriptionTextEdit->toPlainText());
+// prefsData->docInfo.setPublisher(publisherLineEdit->text());
+// prefsData->docInfo.setContrib(contributorsTextEdit->toPlainText());
+// prefsData->docInfo.setDate(dateLineEdit->text());
+// prefsData->docInfo.setType(typeLineEdit->text());
+// prefsData->docInfo.setFormat(formatLineEdit->text());
+// prefsData->docInfo.setIdent(identifierLineEdit->text());
+// prefsData->docInfo.setSource(sourceLineEdit->text());
+// prefsData->docInfo.setLangInfo(languageLineEdit->text());
+// prefsData->docInfo.setRelation(relationLineEdit->text());
+// prefsData->docInfo.setCover(coverageLineEdit->text());
+// prefsData->docInfo.setRights(rightsLineEdit->text());
}
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp (revision 15036)
+++ scribus/scribus.cpp (revision 15037)
@@ -3849,7 +3849,7 @@
if (doc->MasterPages.count() == 0)
doc->addMasterPage(0, CommonStrings::masterPageNormal);
//Add doc sections if we have none
- if (doc->sections.count()==0)
+ if (doc->sections().count()==0)
{
doc->addSection(-1);
doc->setFirstSectionFromFirstPageNumber();
Index: scribus/plugins/scriptplugin/pconsole.cpp
===================================================================
--- scribus/plugins/scriptplugin/pconsole.cpp (revision 15036)
+++ scribus/plugins/scriptplugin/pconsole.cpp (revision 15037)
@@ -340,25 +340,31 @@
SyntaxColors::SyntaxColors()
{
PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("scriptplugin");
- errorColor.setNamedColor(prefs->get("syntaxerror", "#aa0000"));
- commentColor.setNamedColor(prefs->get("syntaxcomment", "#A0A0A0"));
- keywordColor.setNamedColor(prefs->get("syntaxkeyword", "#00007f"));
- signColor.setNamedColor(prefs->get("syntaxsign", "#aa00ff"));
- numberColor.setNamedColor(prefs->get("syntaxnumber", "#ffaa00"));
- stringColor.setNamedColor(prefs->get("syntaxstring", "#005500"));
- textColor.setNamedColor(prefs->get("syntaxtext", "#000000"));
+ if (prefs)
+ {
+ errorColor.setNamedColor(prefs->get("syntaxerror", "#aa0000"));
+ commentColor.setNamedColor(prefs->get("syntaxcomment", "#A0A0A0"));
+ keywordColor.setNamedColor(prefs->get("syntaxkeyword", "#00007f"));
+ signColor.setNamedColor(prefs->get("syntaxsign", "#aa00ff"));
+ numberColor.setNamedColor(prefs->get("syntaxnumber", "#ffaa00"));
+ stringColor.setNamedColor(prefs->get("syntaxstring", "#005500"));
+ textColor.setNamedColor(prefs->get("syntaxtext", "#000000"));
+ }
}
SyntaxColors::~SyntaxColors()
{
PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("scriptplugin");
- prefs->set("syntaxerror", qcolor2named(errorColor));
- prefs->set("syntaxcomment", qcolor2named(commentColor));
- prefs->set("syntaxkeyword", qcolor2named(keywordColor));
- prefs->set("syntaxsign", qcolor2named(signColor));
- prefs->set("syntaxnumber", qcolor2named(numberColor));
- prefs->set("syntaxstring", qcolor2named(stringColor));
- prefs->set("syntaxtext", qcolor2named(textColor));
+ if (prefs)
+ {
+ prefs->set("syntaxerror", qcolor2named(errorColor));
+ prefs->set("syntaxcomment", qcolor2named(commentColor));
+ prefs->set("syntaxkeyword", qcolor2named(keywordColor));
+ prefs->set("syntaxsign", qcolor2named(signColor));
+ prefs->set("syntaxnumber", qcolor2named(numberColor));
+ prefs->set("syntaxstring", qcolor2named(stringColor));
+ prefs->set("syntaxtext", qcolor2named(textColor));
+ }
}
QString SyntaxColors::qcolor2named(QColor color)
Index: scribus/plugins/scripter/scripterimpl.cpp
===================================================================
--- scribus/plugins/scripter/scripterimpl.cpp (revision 15036)
+++ scribus/plugins/scripter/scripterimpl.cpp (revision 15037)
@@ -16,9 +16,9 @@
ScripterImpl::ScripterImpl() : QObject(QApplication::instance())
{
- setObjectName("Scripter");
- _instance = this;
- qDebug() << "ScripterImpl object created";
+ setObjectName("Scripter");
+ _instance = this;
+ qDebug() << "ScripterImpl object created";
}
Index: scribus/plugins/fileloader/scribus12format/scribus12format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus12format/scribus12format.cpp (revision 15036)
+++ scribus/plugins/fileloader/scribus12format/scribus12format.cpp (revision 15037)
@@ -312,21 +312,23 @@
m_Doc->itemToolPrefs().textFont = Defont;
m_Doc->itemToolPrefs().textColumns=dc.attribute("DCOL", "1").toInt();
m_Doc->itemToolPrefs().textColumnGap=ScCLocale::toDoubleC(dc.attribute("DGAP"), 0.0);
- m_Doc->documentInfo.setAuthor(dc.attribute("AUTHOR"));
- m_Doc->documentInfo.setComments(dc.attribute("COMMENTS"));
- m_Doc->documentInfo.setKeywords(dc.attribute("KEYWORDS",""));
- m_Doc->documentInfo.setTitle(dc.attribute("TITLE"));
- m_Doc->documentInfo.setPublisher(dc.attribute("PUBLISHER", ""));
- m_Doc->documentInfo.setDate(dc.attribute("DOCDATE", ""));
- m_Doc->documentInfo.setType(dc.attribute("DOCTYPE", ""));
- m_Doc->documentInfo.setFormat(dc.attribute("DOCFORMAT", ""));
- m_Doc->documentInfo.setIdent(dc.attribute("DOCIDENT", ""));
- m_Doc->documentInfo.setSource(dc.attribute("DOCSOURCE", ""));
- m_Doc->documentInfo.setLangInfo(dc.attribute("DOCLANGINFO", ""));
- m_Doc->documentInfo.setRelation(dc.attribute("DOCRELATION", ""));
- m_Doc->documentInfo.setCover(dc.attribute("DOCCOVER", ""));
- m_Doc->documentInfo.setRights(dc.attribute("DOCRIGHTS", ""));
- m_Doc->documentInfo.setContrib(dc.attribute("DOCCONTRIB", ""));
+ DocumentInformation di;
+ di.setAuthor(dc.attribute("AUTHOR"));
+ di.setComments(dc.attribute("COMMENTS"));
+ di.setKeywords(dc.attribute("KEYWORDS",""));
+ di.setTitle(dc.attribute("TITLE"));
+ di.setPublisher(dc.attribute("PUBLISHER", ""));
+ di.setDate(dc.attribute("DOCDATE", ""));
+ di.setType(dc.attribute("DOCTYPE", ""));
+ di.setFormat(dc.attribute("DOCFORMAT", ""));
+ di.setIdent(dc.attribute("DOCIDENT", ""));
+ di.setSource(dc.attribute("DOCSOURCE", ""));
+ di.setLangInfo(dc.attribute("DOCLANGINFO", ""));
+ di.setRelation(dc.attribute("DOCRELATION", ""));
+ di.setCover(dc.attribute("DOCCOVER", ""));
+ di.setRights(dc.attribute("DOCRIGHTS", ""));
+ di.setContrib(dc.attribute("DOCCONTRIB", ""));
+ m_Doc->setDocumentInfo(di);
m_Doc->typographicPrefs().valueSuperScript = dc.attribute("VHOCH").toInt();
m_Doc->typographicPrefs().scalingSuperScript = dc.attribute("VHOCHSC").toInt();
m_Doc->typographicPrefs().valueSubScript = dc.attribute("VTIEF").toInt();
Index: scribus/plugins/fileloader/scribus13format/scribus13format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus13format/scribus13format.cpp (revision 15036)
+++ scribus/plugins/fileloader/scribus13format/scribus13format.cpp (revision 15037)
@@ -278,21 +278,23 @@
m_Doc->itemToolPrefs().textFont = Defont;
m_Doc->itemToolPrefs().textColumns= dc.attribute("DCOL", "1").toInt();
m_Doc->itemToolPrefs().textColumnGap = ScCLocale::toDoubleC(dc.attribute("DGAP"), 0.0);
- m_Doc->documentInfo.setAuthor(dc.attribute("AUTHOR"));
- m_Doc->documentInfo.setComments(dc.attribute("COMMENTS"));
- m_Doc->documentInfo.setKeywords(dc.attribute("KEYWORDS",""));
- m_Doc->documentInfo.setTitle(dc.attribute("TITLE"));
- m_Doc->documentInfo.setPublisher(dc.attribute("PUBLISHER", ""));
- m_Doc->documentInfo.setDate(dc.attribute("DOCDATE", ""));
- m_Doc->documentInfo.setType(dc.attribute("DOCTYPE", ""));
- m_Doc->documentInfo.setFormat(dc.attribute("DOCFORMAT", ""));
- m_Doc->documentInfo.setIdent(dc.attribute("DOCIDENT", ""));
- m_Doc->documentInfo.setSource(dc.attribute("DOCSOURCE", ""));
- m_Doc->documentInfo.setLangInfo(dc.attribute("DOCLANGINFO", ""));
- m_Doc->documentInfo.setRelation(dc.attribute("DOCRELATION", ""));
- m_Doc->documentInfo.setCover(dc.attribute("DOCCOVER", ""));
- m_Doc->documentInfo.setRights(dc.attribute("DOCRIGHTS", ""));
- m_Doc->documentInfo.setContrib(dc.attribute("DOCCONTRIB", ""));
+ DocumentInformation di;
+ di.setAuthor(dc.attribute("AUTHOR"));
+ di.setComments(dc.attribute("COMMENTS"));
+ di.setKeywords(dc.attribute("KEYWORDS",""));
+ di.setTitle(dc.attribute("TITLE"));
+ di.setPublisher(dc.attribute("PUBLISHER", ""));
+ di.setDate(dc.attribute("DOCDATE", ""));
+ di.setType(dc.attribute("DOCTYPE", ""));
+ di.setFormat(dc.attribute("DOCFORMAT", ""));
+ di.setIdent(dc.attribute("DOCIDENT", ""));
+ di.setSource(dc.attribute("DOCSOURCE", ""));
+ di.setLangInfo(dc.attribute("DOCLANGINFO", ""));
+ di.setRelation(dc.attribute("DOCRELATION", ""));
+ di.setCover(dc.attribute("DOCCOVER", ""));
+ di.setRights(dc.attribute("DOCRIGHTS", ""));
+ di.setContrib(dc.attribute("DOCCONTRIB", ""));
+ m_Doc->setDocumentInfo(di);
m_Doc->typographicPrefs().valueSuperScript = dc.attribute("VHOCH").toInt();
m_Doc->typographicPrefs().scalingSuperScript = dc.attribute("VHOCHSC").toInt();
m_Doc->typographicPrefs().valueSubScript = dc.attribute("VTIEF").toInt();
@@ -775,7 +777,7 @@
newSection.sectionstartindex=sectionElem.attribute("Start").toInt();
newSection.reversed=static_cast<bool>(sectionElem.attribute("Reversed").toInt());
newSection.active=static_cast<bool>(sectionElem.attribute("Active").toInt());
- m_Doc->sections.insert(newSection.number, newSection);
+ m_Doc->sections().insert(newSection.number, newSection);
}
Section = Section.nextSibling();
}
@@ -1209,21 +1211,21 @@
dc.setAttribute("DGAP",m_Doc->itemToolPrefs().textColumnGap);
dc.setAttribute("TabFill",m_Doc->itemToolPrefs().textTabFillChar);
dc.setAttribute("TabWidth",m_Doc->itemToolPrefs().textTabWidth);
- dc.setAttribute("AUTHOR",m_Doc->documentInfo.getAuthor());
- dc.setAttribute("COMMENTS",m_Doc->documentInfo.getComments());
- dc.setAttribute("KEYWORDS",m_Doc->documentInfo.getKeywords());
- dc.setAttribute("PUBLISHER",m_Doc->documentInfo.getPublisher());
- dc.setAttribute("DOCDATE",m_Doc->documentInfo.getDate());
- dc.setAttribute("DOCTYPE",m_Doc->documentInfo.getType());
- dc.setAttribute("DOCFORMAT",m_Doc->documentInfo.getFormat());
- dc.setAttribute("DOCIDENT",m_Doc->documentInfo.getIdent());
- dc.setAttribute("DOCSOURCE",m_Doc->documentInfo.getSource());
- dc.setAttribute("DOCLANGINFO",m_Doc->documentInfo.getLangInfo());
- dc.setAttribute("DOCRELATION",m_Doc->documentInfo.getRelation());
- dc.setAttribute("DOCCOVER",m_Doc->documentInfo.getCover());
- dc.setAttribute("DOCRIGHTS",m_Doc->documentInfo.getRights());
- dc.setAttribute("DOCCONTRIB",m_Doc->documentInfo.getContrib());
- dc.setAttribute("TITLE",m_Doc->documentInfo.getTitle());
+ dc.setAttribute("AUTHOR",m_Doc->documentInfo().author());
+ dc.setAttribute("COMMENTS",m_Doc->documentInfo().comments());
+ dc.setAttribute("KEYWORDS",m_Doc->documentInfo().keywords());
+ dc.setAttribute("PUBLISHER",m_Doc->documentInfo().publisher());
+ dc.setAttribute("DOCDATE",m_Doc->documentInfo().date());
+ dc.setAttribute("DOCTYPE",m_Doc->documentInfo().type());
+ dc.setAttribute("DOCFORMAT",m_Doc->documentInfo().format());
+ dc.setAttribute("DOCIDENT",m_Doc->documentInfo().ident());
+ dc.setAttribute("DOCSOURCE",m_Doc->documentInfo().source());
+ dc.setAttribute("DOCLANGINFO",m_Doc->documentInfo().langInfo());
+ dc.setAttribute("DOCRELATION",m_Doc->documentInfo().relation());
+ dc.setAttribute("DOCCOVER",m_Doc->documentInfo().cover());
+ dc.setAttribute("DOCRIGHTS",m_Doc->documentInfo().rights());
+ dc.setAttribute("DOCCONTRIB",m_Doc->documentInfo().contrib());
+ dc.setAttribute("TITLE",m_Doc->documentInfo().title());
dc.setAttribute("VHOCH",m_Doc->typographicPrefs().valueSuperScript);
dc.setAttribute("VHOCHSC",m_Doc->typographicPrefs().scalingSuperScript);
dc.setAttribute("VTIEF",m_Doc->typographicPrefs().valueSubScript);
@@ -1620,7 +1622,7 @@
}
dc.appendChild(tocElem);
QDomElement sectionElem = docu.createElement("Sections");
- for(DocumentSectionMap::Iterator it = m_Doc->sections.begin() ; it != m_Doc->sections.end(); ++it )
+ for(DocumentSectionMap::Iterator it = m_Doc->sections().begin() ; it != m_Doc->sections().end(); ++it )
{
QDomElement currsection = docu.createElement("Section");
currsection.setAttribute("Number", (*it).number);
Index: scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
===================================================================
--- scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp (revision 15036)
+++ scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp (revision 15037)
@@ -106,22 +106,22 @@
docu.writeAttribute("DGAP" ,m_Doc->itemToolPrefs().textColumnGap);
docu.writeAttribute("TabFill" ,m_Doc->itemToolPrefs().textTabFillChar);
docu.writeAttribute("TabWidth" ,m_Doc->itemToolPrefs().textTabWidth);
- docu.writeAttribute("AUTHOR" ,m_Doc->documentInfo.getAuthor());
- docu.writeAttribute("COMMENTS" ,m_Doc->documentInfo.getComments());
- docu.writeAttribute("KEYWORDS" ,m_Doc->documentInfo.getKeywords());
- docu.writeAttribute("PUBLISHER",m_Doc->documentInfo.getPublisher());
- docu.writeAttribute("DOCDATE",m_Doc->documentInfo.getDate());
- docu.writeAttribute("DOCTYPE",m_Doc->documentInfo.getType());
- docu.writeAttribute("DOCFORMAT",m_Doc->documentInfo.getFormat());
- docu.writeAttribute("DOCIDENT",m_Doc->documentInfo.getIdent());
- docu.writeAttribute("DOCSOURCE",m_Doc->documentInfo.getSource());
- docu.writeAttribute("DOCLANGINFO",m_Doc->documentInfo.getLangInfo());
- docu.writeAttribute("DOCRELATION",m_Doc->documentInfo.getRelation());
- docu.writeAttribute("DOCCOVER",m_Doc->documentInfo.getCover());
- docu.writeAttribute("DOCRIGHTS",m_Doc->documentInfo.getRights());
- docu.writeAttribute("DOCCONTRIB",m_Doc->documentInfo.getContrib());
- docu.writeAttribute("TITLE",m_Doc->documentInfo.getTitle());
- docu.writeAttribute("SUBJECT",m_Doc->documentInfo.getSubject());
+ docu.writeAttribute("AUTHOR" ,m_Doc->documentInfo().author());
+ docu.writeAttribute("COMMENTS" ,m_Doc->documentInfo().comments());
+ docu.writeAttribute("KEYWORDS" ,m_Doc->documentInfo().keywords());
+ docu.writeAttribute("PUBLISHER",m_Doc->documentInfo().publisher());
+ docu.writeAttribute("DOCDATE",m_Doc->documentInfo().date());
+ docu.writeAttribute("DOCTYPE",m_Doc->documentInfo().type());
+ docu.writeAttribute("DOCFORMAT",m_Doc->documentInfo().format());
+ docu.writeAttribute("DOCIDENT",m_Doc->documentInfo().ident());
+ docu.writeAttribute("DOCSOURCE",m_Doc->documentInfo().source());
+ docu.writeAttribute("DOCLANGINFO",m_Doc->documentInfo().langInfo());
+ docu.writeAttribute("DOCRELATION",m_Doc->documentInfo().relation());
+ docu.writeAttribute("DOCCOVER",m_Doc->documentInfo().cover());
+ docu.writeAttribute("DOCRIGHTS",m_Doc->documentInfo().rights());
+ docu.writeAttribute("DOCCONTRIB",m_Doc->documentInfo().contrib());
+ docu.writeAttribute("TITLE",m_Doc->documentInfo().title());
+ docu.writeAttribute("SUBJECT",m_Doc->documentInfo().subject());
docu.writeAttribute("VHOCH" , m_Doc->typographicPrefs().valueSuperScript);
docu.writeAttribute("VHOCHSC", m_Doc->typographicPrefs().scalingSuperScript);
docu.writeAttribute("VTIEF" , m_Doc->typographicPrefs().valueSubScript);
@@ -811,7 +811,7 @@
void Scribus150Format::writeSections(ScXmlStreamWriter & docu)
{
docu.writeStartElement("Sections");
- for(DocumentSectionMap::Iterator it = m_Doc->sections.begin() ; it != m_Doc->sections.end(); ++it )
+ for(DocumentSectionMap::Iterator it = m_Doc->sections().begin() ; it != m_Doc->sections().end(); ++it )
{
docu.writeEmptyElement("Section");
docu.writeAttribute("Number", (*it).number);
Index: scribus/plugins/fileloader/scribus150format/scribus150format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus150format/scribus150format.cpp (revision 15036)
+++ scribus/plugins/fileloader/scribus150format/scribus150format.cpp (revision 15037)
@@ -819,22 +819,24 @@
void Scribus150Format::readDocumentInfo(ScribusDoc* doc, ScXmlStreamAttributes& attrs)
{
- doc->documentInfo.setAuthor(attrs.valueAsString("AUTHOR"));
- doc->documentInfo.setComments(attrs.valueAsString("COMMENTS"));
- doc->documentInfo.setKeywords(attrs.valueAsString("KEYWORDS",""));
- doc->documentInfo.setTitle(attrs.valueAsString("TITLE"));
- doc->documentInfo.setSubject(attrs.valueAsString("SUBJECT"));
- doc->documentInfo.setPublisher(attrs.valueAsString("PUBLISHER", ""));
- doc->documentInfo.setDate(attrs.valueAsString("DOCDATE", ""));
- doc->documentInfo.setType(attrs.valueAsString("DOCTYPE", ""));
- doc->documentInfo.setFormat(attrs.valueAsString("DOCFORMAT", ""));
- doc->documentInfo.setIdent(attrs.valueAsString("DOCIDENT", ""));
- doc->documentInfo.setSource(attrs.valueAsString("DOCSOURCE", ""));
- doc->documentInfo.setLangInfo(attrs.valueAsString("DOCLANGINFO", ""));
- doc->documentInfo.setRelation(attrs.valueAsString("DOCRELATION", ""));
- doc->documentInfo.setCover(attrs.valueAsString("DOCCOVER", ""));
- doc->documentInfo.setRights(attrs.valueAsString("DOCRIGHTS", ""));
- doc->documentInfo.setContrib(attrs.valueAsString("DOCCONTRIB", ""));
+ DocumentInformation di;
+ di.setAuthor(attrs.valueAsString("AUTHOR"));
+ di.setComments(attrs.valueAsString("COMMENTS"));
+ di.setKeywords(attrs.valueAsString("KEYWORDS",""));
+ di.setTitle(attrs.valueAsString("TITLE"));
+ di.setSubject(attrs.valueAsString("SUBJECT"));
+ di.setPublisher(attrs.valueAsString("PUBLISHER", ""));
+ di.setDate(attrs.valueAsString("DOCDATE", ""));
+ di.setType(attrs.valueAsString("DOCTYPE", ""));
+ di.setFormat(attrs.valueAsString("DOCFORMAT", ""));
+ di.setIdent(attrs.valueAsString("DOCIDENT", ""));
+ di.setSource(attrs.valueAsString("DOCSOURCE", ""));
+ di.setLangInfo(attrs.valueAsString("DOCLANGINFO", ""));
+ di.setRelation(attrs.valueAsString("DOCRELATION", ""));
+ di.setCover(attrs.valueAsString("DOCCOVER", ""));
+ di.setRights(attrs.valueAsString("DOCRIGHTS", ""));
+ di.setContrib(attrs.valueAsString("DOCCONTRIB", ""));
+ doc->setDocumentInfo(di);
}
void Scribus150Format::readGuideSettings(ScribusDoc* doc, ScXmlStreamAttributes& attrs)
@@ -1602,7 +1604,7 @@
newSection.sectionstartindex = attrs.valueAsInt("Start");
newSection.reversed = attrs.valueAsBool("Reversed");
newSection.active = attrs.valueAsBool("Active");
- doc->sections.insert(newSection.number, newSection);
+ doc->sections().insert(newSection.number, newSection);
}
}
return !reader.hasError();
Index: scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp (revision 15036)
+++ scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp (revision 15037)
@@ -103,22 +103,22 @@
docu.writeAttribute("DGAP" ,m_Doc->itemToolPrefs().textColumnGap);
docu.writeAttribute("TabFill" ,m_Doc->itemToolPrefs().textTabFillChar);
docu.writeAttribute("TabWidth" ,m_Doc->itemToolPrefs().textTabWidth);
- docu.writeAttribute("AUTHOR" ,m_Doc->documentInfo.getAuthor());
- docu.writeAttribute("COMMENTS" ,m_Doc->documentInfo.getComments());
- docu.writeAttribute("KEYWORDS" ,m_Doc->documentInfo.getKeywords());
- docu.writeAttribute("PUBLISHER",m_Doc->documentInfo.getPublisher());
- docu.writeAttribute("DOCDATE",m_Doc->documentInfo.getDate());
- docu.writeAttribute("DOCTYPE",m_Doc->documentInfo.getType());
- docu.writeAttribute("DOCFORMAT",m_Doc->documentInfo.getFormat());
- docu.writeAttribute("DOCIDENT",m_Doc->documentInfo.getIdent());
- docu.writeAttribute("DOCSOURCE",m_Doc->documentInfo.getSource());
- docu.writeAttribute("DOCLANGINFO",m_Doc->documentInfo.getLangInfo());
- docu.writeAttribute("DOCRELATION",m_Doc->documentInfo.getRelation());
- docu.writeAttribute("DOCCOVER",m_Doc->documentInfo.getCover());
- docu.writeAttribute("DOCRIGHTS",m_Doc->documentInfo.getRights());
- docu.writeAttribute("DOCCONTRIB",m_Doc->documentInfo.getContrib());
- docu.writeAttribute("TITLE",m_Doc->documentInfo.getTitle());
- docu.writeAttribute("SUBJECT",m_Doc->documentInfo.getSubject());
+ docu.writeAttribute("AUTHOR" ,m_Doc->documentInfo().author());
+ docu.writeAttribute("COMMENTS" ,m_Doc->documentInfo().comments());
+ docu.writeAttribute("KEYWORDS" ,m_Doc->documentInfo().keywords());
+ docu.writeAttribute("PUBLISHER",m_Doc->documentInfo().publisher());
+ docu.writeAttribute("DOCDATE",m_Doc->documentInfo().date());
+ docu.writeAttribute("DOCTYPE",m_Doc->documentInfo().type());
+ docu.writeAttribute("DOCFORMAT",m_Doc->documentInfo().format());
+ docu.writeAttribute("DOCIDENT",m_Doc->documentInfo().ident());
+ docu.writeAttribute("DOCSOURCE",m_Doc->documentInfo().source());
+ docu.writeAttribute("DOCLANGINFO",m_Doc->documentInfo().langInfo());
+ docu.writeAttribute("DOCRELATION",m_Doc->documentInfo().relation());
+ docu.writeAttribute("DOCCOVER",m_Doc->documentInfo().cover());
+ docu.writeAttribute("DOCRIGHTS",m_Doc->documentInfo().rights());
+ docu.writeAttribute("DOCCONTRIB",m_Doc->documentInfo().contrib());
+ docu.writeAttribute("TITLE",m_Doc->documentInfo().title());
+ docu.writeAttribute("SUBJECT",m_Doc->documentInfo().subject());
docu.writeAttribute("VHOCH" , m_Doc->typographicPrefs().valueSuperScript);
docu.writeAttribute("VHOCHSC", m_Doc->typographicPrefs().scalingSuperScript);
docu.writeAttribute("VTIEF" , m_Doc->typographicPrefs().valueSubScript);
@@ -787,7 +787,7 @@
void Scribus134Format::writeSections(ScXmlStreamWriter & docu)
{
docu.writeStartElement("Sections");
- for(DocumentSectionMap::Iterator it = m_Doc->sections.begin() ; it != m_Doc->sections.end(); ++it )
+ for(DocumentSectionMap::Iterator it = m_Doc->sections().begin() ; it != m_Doc->sections().end(); ++it )
{
docu.writeEmptyElement("Section");
docu.writeAttribute("Number", (*it).number);
Index: scribus/plugins/fileloader/scribus134format/scribus134format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format.cpp (revision 15036)
+++ scribus/plugins/fileloader/scribus134format/scribus134format.cpp (revision 15037)
@@ -814,22 +814,24 @@
void Scribus134Format::readDocumentInfo(ScribusDoc* doc, ScXmlStreamAttributes& attrs)
{
- doc->documentInfo.setAuthor(attrs.valueAsString("AUTHOR"));
- doc->documentInfo.setComments(attrs.valueAsString("COMMENTS"));
- doc->documentInfo.setKeywords(attrs.valueAsString("KEYWORDS",""));
- doc->documentInfo.setTitle(attrs.valueAsString("TITLE"));
- doc->documentInfo.setSubject(attrs.valueAsString("SUBJECT"));
- doc->documentInfo.setPublisher(attrs.valueAsString("PUBLISHER", ""));
- doc->documentInfo.setDate(attrs.valueAsString("DOCDATE", ""));
- doc->documentInfo.setType(attrs.valueAsString("DOCTYPE", ""));
- doc->documentInfo.setFormat(attrs.valueAsString("DOCFORMAT", ""));
- doc->documentInfo.setIdent(attrs.valueAsString("DOCIDENT", ""));
- doc->documentInfo.setSource(attrs.valueAsString("DOCSOURCE", ""));
- doc->documentInfo.setLangInfo(attrs.valueAsString("DOCLANGINFO", ""));
- doc->documentInfo.setRelation(attrs.valueAsString("DOCRELATION", ""));
- doc->documentInfo.setCover(attrs.valueAsString("DOCCOVER", ""));
- doc->documentInfo.setRights(attrs.valueAsString("DOCRIGHTS", ""));
- doc->documentInfo.setContrib(attrs.valueAsString("DOCCONTRIB", ""));
+ DocumentInformation di;
+ di.setAuthor(attrs.valueAsString("AUTHOR"));
+ di.setComments(attrs.valueAsString("COMMENTS"));
+ di.setKeywords(attrs.valueAsString("KEYWORDS",""));
+ di.setTitle(attrs.valueAsString("TITLE"));
+ di.setSubject(attrs.valueAsString("SUBJECT"));
+ di.setPublisher(attrs.valueAsString("PUBLISHER", ""));
+ di.setDate(attrs.valueAsString("DOCDATE", ""));
+ di.setType(attrs.valueAsString("DOCTYPE", ""));
+ di.setFormat(attrs.valueAsString("DOCFORMAT", ""));
+ di.setIdent(attrs.valueAsString("DOCIDENT", ""));
+ di.setSource(attrs.valueAsString("DOCSOURCE", ""));
+ di.setLangInfo(attrs.valueAsString("DOCLANGINFO", ""));
+ di.setRelation(attrs.valueAsString("DOCRELATION", ""));
+ di.setCover(attrs.valueAsString("DOCCOVER", ""));
+ di.setRights(attrs.valueAsString("DOCRIGHTS", ""));
+ di.setContrib(attrs.valueAsString("DOCCONTRIB", ""));
+ doc->setDocumentInfo(di);
}
void Scribus134Format::readGuideSettings(ScribusDoc* doc, ScXmlStreamAttributes& attrs)
@@ -1597,7 +1599,7 @@
newSection.sectionstartindex = attrs.valueAsInt("Start");
newSection.reversed = attrs.valueAsBool("Reversed");
newSection.active = attrs.valueAsBool("Active");
- doc->sections.insert(newSection.number, newSection);
+ doc->sections().insert(newSection.number, newSection);
}
}
return !reader.hasError();
Index: scribus/plugins/import/svg/svgplugin.cpp
===================================================================
--- scribus/plugins/import/svg/svgplugin.cpp (revision 15036)
+++ scribus/plugins/import/svg/svgplugin.cpp (revision 15037)
@@ -492,8 +492,8 @@
QList<PageItem*> Elements = parseGroup( docElem );
if (flags & LoadSavePlugin::lfCreateDoc)
{
- m_Doc->documentInfo.setTitle(docTitle);
- m_Doc->documentInfo.setComments(docDesc);
+ m_Doc->documentInfo().setTitle(docTitle);
+ m_Doc->documentInfo().setComments(docDesc);
}
tmpSel->clear();
if (Elements.count() == 0)
Index: scribus/plugins/import/cgm/importcgm.cpp
===================================================================
--- scribus/plugins/import/cgm/importcgm.cpp (revision 15036)
+++ scribus/plugins/import/cgm/importcgm.cpp (revision 15037)
@@ -2520,7 +2520,7 @@
void CgmPlug::handleStartMetaFile(QString value)
{
if (importerFlags & LoadSavePlugin::lfCreateDoc)
- m_Doc->documentInfo.setTitle(value);
+ m_Doc->documentInfo().setTitle(value);
// qDebug() << "Start Metafile" << value;
}
@@ -2560,7 +2560,7 @@
void CgmPlug::handleMetaFileDescription(QString value)
{
if (importerFlags & LoadSavePlugin::lfCreateDoc)
- m_Doc->documentInfo.setComments(value);
+ m_Doc->documentInfo().setComments(value);
// qDebug() << "Metafile Description" << value;
}
Index: scribus/plugins/import/ai/importai.cpp
===================================================================
--- scribus/plugins/import/ai/importai.cpp (revision 15036)
+++ scribus/plugins/import/ai/importai.cpp (revision 15037)
@@ -450,10 +450,10 @@
}
if (flags & LoadSavePlugin::lfCreateDoc)
{
- m_Doc->documentInfo.setAuthor(docCreator);
- m_Doc->documentInfo.setPublisher(docOrganisation);
- m_Doc->documentInfo.setTitle(docTitle);
- m_Doc->documentInfo.setDate(docDate+" "+docTime);
+ m_Doc->documentInfo().setAuthor(docCreator);
+ m_Doc->documentInfo().setPublisher(docOrganisation);
+ m_Doc->documentInfo().setTitle(docTitle);
+ m_Doc->documentInfo().setDate(docDate+" "+docTime);
}
if ((!ret) && (interactive))
{
Index: scribus/plugins/import/wmf/wmfimport.cpp
===================================================================
--- scribus/plugins/import/wmf/wmfimport.cpp (revision 15036)
+++ scribus/plugins/import/wmf/wmfimport.cpp (revision 15037)
@@ -688,8 +688,8 @@
QList<PageItem*> Elements = parseWmfCommands();
if (flags & LoadSavePlugin::lfCreateDoc)
{
- m_Doc->documentInfo.setTitle(m_docTitle);
- m_Doc->documentInfo.setComments(m_docDesc);
+ m_Doc->documentInfo().setTitle(m_docTitle);
+ m_Doc->documentInfo().setComments(m_docDesc);
}
m_tmpSel->clear();
if (Elements.count() == 0)
Index: scribus/plugins/import/oodraw/oodrawimp.cpp
===================================================================
--- scribus/plugins/import/oodraw/oodrawimp.cpp (revision 15036)
+++ scribus/plugins/import/oodraw/oodrawimp.cpp (revision 15037)
@@ -565,22 +565,22 @@
QDomElement mp = metaElem.namedItem( "office:meta" ).toElement();
mpg = mp.namedItem( "dc:title" );
if (!mpg.isNull())
- m_Doc->documentInfo.setTitle(mpg.toElement().text());
+ m_Doc->documentInfo().setTitle(mpg.toElement().text());
mpg = mp.namedItem( "meta:initial-creator" );
if (!mpg.isNull())
- m_Doc->documentInfo.setAuthor(mpg.toElement().text());
+ m_Doc->documentInfo().setAuthor(mpg.toElement().text());
mpg = mp.namedItem( "dc:description" );
if (!mpg.isNull())
- m_Doc->documentInfo.setComments(mpg.toElement().text());
+ m_Doc->documentInfo().setComments(mpg.toElement().text());
mpg = mp.namedItem( "dc:language" );
if (!mpg.isNull())
- m_Doc->documentInfo.setLangInfo(mpg.toElement().text());
+ m_Doc->documentInfo().setLangInfo(mpg.toElement().text());
mpg = mp.namedItem( "meta:creation-date" );
if (!mpg.isNull())
- m_Doc->documentInfo.setDate(mpg.toElement().text());
+ m_Doc->documentInfo().setDate(mpg.toElement().text());
mpg = mp.namedItem( "dc:creator" );
if (!mpg.isNull())
- m_Doc->documentInfo.setContrib(mpg.toElement().text());
+ m_Doc->documentInfo().setContrib(mpg.toElement().text());
mpg = mp.namedItem( "meta:keywords" );
if (!mpg.isNull())
{
@@ -590,7 +590,7 @@
Keys += n.toElement().text()+", ";
}
if (Keys.length() > 2)
- m_Doc->documentInfo.setKeywords(Keys.left(Keys.length()-2));
+ m_Doc->documentInfo().setKeywords(Keys.left(Keys.length()-2));
}
}
FPoint minSize = m_Doc->minCanvasCoordinate;
Index: scribus/plugins/import/xfig/importxfig.cpp
===================================================================
--- scribus/plugins/import/xfig/importxfig.cpp (revision 15036)
+++ scribus/plugins/import/xfig/importxfig.cpp (revision 15037)
@@ -387,10 +387,10 @@
}
if (flags & LoadSavePlugin::lfCreateDoc)
{
- m_Doc->documentInfo.setAuthor(docCreator);
- m_Doc->documentInfo.setPublisher(docOrganisation);
- m_Doc->documentInfo.setTitle(docTitle);
- m_Doc->documentInfo.setDate(docDate+" "+docTime);
+ m_Doc->documentInfo().setAuthor(docCreator);
+ m_Doc->documentInfo().setPublisher(docOrganisation);
+ m_Doc->documentInfo().setTitle(docTitle);
+ m_Doc->documentInfo().setDate(docDate+" "+docTime);
}
if ((!ret) && (interactive))
{
Index: scribus/plugins/svgexplugin/svgexplugin.cpp
===================================================================
--- scribus/plugins/svgexplugin/svgexplugin.cpp (revision 15036)
+++ scribus/plugins/svgexplugin/svgexplugin.cpp (revision 15037)
@@ -214,16 +214,16 @@
docElement.setAttribute("xmlns", "http://www.w3.org/2000/svg");
docElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink");
docElement.setAttribute("version","1.1");
- if (!m_Doc->documentInfo.getTitle().isEmpty())
+ if (!m_Doc->documentInfo().title().isEmpty())
{
- QDomText title = docu.createTextNode(m_Doc->documentInfo.getTitle());
+ QDomText title = docu.createTextNode(m_Doc->documentInfo().title());
QDomElement titleElem = docu.createElement("title");
titleElem.appendChild(title);
docElement.appendChild(titleElem);
}
- if (!m_Doc->documentInfo.getComments().isEmpty())
+ if (!m_Doc->documentInfo().comments().isEmpty())
{
- QDomText desc = docu.createTextNode(m_Doc->documentInfo.getComments());
+ QDomText desc = docu.createTextNode(m_Doc->documentInfo().comments());
QDomElement descElem = docu.createElement("desc");
descElem.appendChild(desc);
docElement.appendChild(descElem);
Index: scribus/plugins/CMakeLists.txt
===================================================================
--- scribus/plugins/CMakeLists.txt (revision 15036)
+++ scribus/plugins/CMakeLists.txt (revision 15037)
@@ -8,13 +8,13 @@
ADD_SUBDIRECTORY(pixmapexport)
ADD_SUBDIRECTORY(saveastemplateplugin)
IF(NOT WANT_SCRIPTER2)
-#scripter1
-IF(NOT WIN32)
- MESSAGE(STATUS "Building with Scripter 1")
- ADD_SUBDIRECTORY(scriptplugin)
-ENDIF(NOT WIN32)
+ #scripter1
+ IF(NOT WIN32)
+ MESSAGE(STATUS "Building with Scripter 1")
+ ADD_SUBDIRECTORY(scriptplugin)
+ ENDIF(NOT WIN32)
ELSE(NOT WANT_SCRIPTER2)
-#scripter2
+ #scripter2
MESSAGE(STATUS "Building with Scripter 2")
ADD_SUBDIRECTORY(scripter)
ENDIF(NOT WANT_SCRIPTER2)
Index: scribus/pslib.cpp
===================================================================
--- scribus/pslib.cpp (revision 15036)
+++ scribus/pslib.cpp (revision 15037)
@@ -1486,8 +1486,8 @@
double gy = 0.0;
double gw = 0.0;
double gh = 0.0;;
- PS_set_Info("Author", Doc->documentInfo.getAuthor());
- PS_set_Info("Title", Doc->documentInfo.getTitle());
+ PS_set_Info("Author", Doc->documentInfo().author());
+ PS_set_Info("Title", Doc->documentInfo().title());
if (!farb)
PS_setGray();
applyICC = Ic;
More information about the scribus-commit
mailing list