r17195 by jghali - #10512: No way to specify subject in PDF file
scribus-commit
scribus-commit at lists.scribus.net
Thu Jan 12 12:38:49 UTC 2012
Author: jghali
Date: Thu Jan 12 12:38:49 2012
New Revision: 17195
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17195
Log:
#10512: No way to specify subject in PDF file
Modified:
branches/Version14x/Scribus/scribus/docinfo.cpp
branches/Version14x/Scribus/scribus/docinfo.h
branches/Version14x/Scribus/scribus/documentinformation.cpp
branches/Version14x/Scribus/scribus/documentinformation.h
branches/Version14x/Scribus/scribus/pdflib_core.cpp
branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
Modified: branches/Version14x/Scribus/scribus/docinfo.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17195&path=/branches/Version14x/Scribus/scribus/docinfo.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/docinfo.cpp (original)
+++ branches/Version14x/Scribus/scribus/docinfo.cpp Thu Jan 12 12:38:49 2012
@@ -49,21 +49,28 @@
layout1->addWidget( authorLabel, 1, 0 );
layout1->addWidget( authorEdit, 1, 1 );
+ subjectEdit = new QLineEdit( page1 );
+ subjectLabel = new QLabel( tr("&Subject:"), page1);
+ subjectLabel->setBuddy(subjectEdit);
+ subjectLabel->resize( subjectLabel->sizeHint() );
+ layout1->addWidget( subjectLabel, 2, 0 );
+ layout1->addWidget( subjectEdit, 2, 1 );
+
keywordsEdit = new QTextEdit( page1 );
keywordsLabel = new QLabel( tr("&Keywords:"), page1 );
keywordsLabel->setBuddy(keywordsEdit);
keywordsLabel->setAlignment(Qt::AlignTop | Qt::AlignLeft);
keywordsEdit->setMinimumSize(QSize(200, 105));
- layout1->addWidget( keywordsLabel, 2, 0 );
- layout1->addWidget( keywordsEdit, 2, 1 );
+ layout1->addWidget( keywordsLabel, 3, 0 );
+ layout1->addWidget( keywordsEdit, 3, 1 );
descriptionEdit = new QTextEdit( page1 );
descriptionLabel = new QLabel( tr("Descri&ption:"), page1 );
descriptionLabel->setBuddy(descriptionEdit);
descriptionLabel->setAlignment(Qt::AlignTop | Qt::AlignLeft);
descriptionEdit->setMinimumSize(QSize(200, 105));
- layout1->addWidget( descriptionLabel, 3, 0 );
- layout1->addWidget( descriptionEdit, 3, 1 );
+ layout1->addWidget( descriptionLabel, 4, 0 );
+ layout1->addWidget( descriptionEdit, 4, 1 );
page2 = new QWidget( this );
layout2 = new QGridLayout(page2);
@@ -190,6 +197,7 @@
docInfo.setRelation(relationEdit->text());
docInfo.setRights(rightsEdit->text());
docInfo.setSource(sourceEdit->text());
+ docInfo.setSubject(subjectEdit->text());
docInfo.setTitle(titleEdit->text());
docInfo.setType(typeEdit->text());
return docInfo;
@@ -199,6 +207,7 @@
{
titleEdit->setText(infos.getTitle());
authorEdit->setText(infos.getAuthor());
+ subjectEdit->setText(infos.getSubject());
descriptionEdit->setPlainText(infos.getComments());
keywordsEdit->setPlainText(infos.getKeywords());
publisherEdit->setText(infos.getPublisher());
Modified: branches/Version14x/Scribus/scribus/docinfo.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17195&path=/branches/Version14x/Scribus/scribus/docinfo.h
==============================================================================
--- branches/Version14x/Scribus/scribus/docinfo.h (original)
+++ branches/Version14x/Scribus/scribus/docinfo.h Thu Jan 12 12:38:49 2012
@@ -55,6 +55,7 @@
QLineEdit* rightsEdit;
QLineEdit* titleEdit;
QLineEdit* authorEdit;
+ QLineEdit* subjectEdit;
QTextEdit* descriptionEdit;
QTextEdit* keywordsEdit;
@@ -62,6 +63,7 @@
QLabel* authorLabel;
QLabel* titleLabel;
+ QLabel* subjectLabel;
QLabel* publisherLabel;
QLabel* dateLabel;
QLabel* typeLabel;
Modified: branches/Version14x/Scribus/scribus/documentinformation.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17195&path=/branches/Version14x/Scribus/scribus/documentinformation.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/documentinformation.cpp (original)
+++ branches/Version14x/Scribus/scribus/documentinformation.cpp Thu Jan 12 12:38:49 2012
@@ -105,6 +105,11 @@
return source;
}
+const QString DocumentInformation::getSubject()
+{
+ return subject;
+}
+
const QString DocumentInformation::getTitle()
{
return title;
@@ -181,6 +186,11 @@
source=_source;
}
+void DocumentInformation::setSubject(const QString &_subject)
+{
+ subject=_subject;
+}
+
void DocumentInformation::setTitle(const QString &_title)
{
title=_title;
Modified: branches/Version14x/Scribus/scribus/documentinformation.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17195&path=/branches/Version14x/Scribus/scribus/documentinformation.h
==============================================================================
--- branches/Version14x/Scribus/scribus/documentinformation.h (original)
+++ branches/Version14x/Scribus/scribus/documentinformation.h Thu Jan 12 12:38:49 2012
@@ -43,6 +43,7 @@
const QString getRelation();
const QString getRights();
const QString getSource();
+ const QString getSubject();
const QString getTitle();
const QString getType();
@@ -59,6 +60,7 @@
void setRelation(const QString &_relation);
void setRights(const QString &_rights);
void setSource(const QString &_source);
+ void setSubject(const QString &_subject);
void setTitle(const QString &_title);
void setType(const QString &_type);
@@ -76,6 +78,7 @@
QString relation;
QString rights;
QString source;
+ QString subject;
QString title;
QString type;
};
Modified: branches/Version14x/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17195&path=/branches/Version14x/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/pdflib_core.cpp (original)
+++ branches/Version14x/Scribus/scribus/pdflib_core.cpp Thu Jan 12 12:38:49 2012
@@ -876,6 +876,7 @@
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("/CreationDate "+EncString("("+Datum+")",2)+"\n");
PutDoc("/ModDate "+EncString("("+Datum+")",2)+"\n");
Modified: branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17195&path=/branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp (original)
+++ branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp Thu Jan 12 12:38:49 2012
@@ -292,6 +292,7 @@
m_Doc->documentInfo.setComments(dc.attribute("COMMENTS"));
m_Doc->documentInfo.setKeywords(dc.attribute("KEYWORDS",""));
m_Doc->documentInfo.setTitle(dc.attribute("TITLE"));
+ m_Doc->documentInfo.setSubject(dc.attribute("SUBJECT"));
m_Doc->documentInfo.setPublisher(dc.attribute("PUBLISHER", ""));
m_Doc->documentInfo.setDate(dc.attribute("DOCDATE", ""));
m_Doc->documentInfo.setType(dc.attribute("DOCTYPE", ""));
Modified: branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17195&path=/branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp (original)
+++ branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp Thu Jan 12 12:38:49 2012
@@ -107,18 +107,19 @@
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("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("VHOCH" , m_Doc->typographicSettings.valueSuperScript);
docu.writeAttribute("VHOCHSC", m_Doc->typographicSettings.scalingSuperScript);
docu.writeAttribute("VTIEF" , m_Doc->typographicSettings.valueSubScript);
More information about the scribus-commit
mailing list