r17925 by fschmid - Fixed Bug #11160: pdf exporting preferences / document setting are not saved.
scribus-commit
scribus-commit at lists.scribus.net
Sat Dec 1 11:28:12 UTC 2012
Author: fschmid
Date: Sat Dec 1 11:28:12 2012
New Revision: 17925
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17925
Log:
Fixed Bug #11160: pdf exporting preferences / document setting are not saved.
Document Settings are saved now, for preferences this doesn't make sense.
Modified:
trunk/Scribus/scribus/pdfoptions.h
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
trunk/Scribus/scribus/prefsmanager.cpp
trunk/Scribus/scribus/ui/pdfopts.cpp
trunk/Scribus/scribus/ui/tabpdfoptions.cpp
Modified: trunk/Scribus/scribus/pdfoptions.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17925&path=/trunk/Scribus/scribus/pdfoptions.h
==============================================================================
--- trunk/Scribus/scribus/pdfoptions.h (original)
+++ trunk/Scribus/scribus/pdfoptions.h Sat Dec 1 11:28:12 2012
@@ -157,6 +157,8 @@
double markLength;
double markOffset;
QString openAction;
+ int pageRangeSelection;
+ QString pageRangeString;
};
#endif
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17925&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Sat Dec 1 11:28:12 2012
@@ -2974,6 +2974,8 @@
doc->pdfOptions().MirrorH = attrs.valueAsBool("MirrorH", false);
doc->pdfOptions().MirrorV = attrs.valueAsBool("MirrorV", false);
doc->pdfOptions().RotateDeg = attrs.valueAsInt("RotateDeg", 0);
+ doc->pdfOptions().pageRangeSelection = attrs.valueAsInt("rangeSel", 0);
+ doc->pdfOptions().pageRangeString = attrs.valueAsString("rangeTxt", "");
doc->pdfOptions().doClip = attrs.valueAsBool("Clip", false);
doc->pdfOptions().PresentMode = attrs.valueAsBool("PresentMode");
doc->pdfOptions().PicRes = attrs.valueAsInt("PicRes");
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17925&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp Sat Dec 1 11:28:12 2012
@@ -1044,6 +1044,8 @@
docu.writeAttribute("MirrorH", static_cast<int>(m_Doc->pdfOptions().MirrorH));
docu.writeAttribute("MirrorV", static_cast<int>(m_Doc->pdfOptions().MirrorV));
docu.writeAttribute("Clip", static_cast<int>(m_Doc->pdfOptions().doClip));
+ docu.writeAttribute("rangeSel", m_Doc->pdfOptions().pageRangeSelection);
+ docu.writeAttribute("rangeTxt", m_Doc->pdfOptions().pageRangeString);
docu.writeAttribute("RotateDeg", static_cast<int>(m_Doc->pdfOptions().RotateDeg));
docu.writeAttribute("PresentMode", static_cast<int>(m_Doc->pdfOptions().PresentMode));
docu.writeAttribute("RecalcPic", static_cast<int>(m_Doc->pdfOptions().RecalcPic));
Modified: trunk/Scribus/scribus/prefsmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17925&path=/trunk/Scribus/scribus/prefsmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.cpp (original)
+++ trunk/Scribus/scribus/prefsmanager.cpp Sat Dec 1 11:28:12 2012
@@ -435,6 +435,8 @@
appPrefs.pdfPrefs.MirrorH = false;
appPrefs.pdfPrefs.MirrorV = false;
appPrefs.pdfPrefs.doClip = false;
+ appPrefs.pdfPrefs.pageRangeSelection = 0;
+ appPrefs.pdfPrefs.pageRangeString = "";
appPrefs.pdfPrefs.RotateDeg = 0;
appPrefs.pdfPrefs.PresentMode = false;
appPrefs.pdfPrefs.fileName = "";
Modified: trunk/Scribus/scribus/ui/pdfopts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17925&path=/trunk/Scribus/scribus/ui/pdfopts.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pdfopts.cpp (original)
+++ trunk/Scribus/scribus/ui/pdfopts.cpp Sat Dec 1 11:28:12 2012
@@ -254,6 +254,8 @@
Opts.MirrorV = Options->MirrorV->isChecked();
Opts.doClip = Options->ClipMarg->isChecked();
Opts.RotateDeg = Options->RotateDeg->currentIndex() * 90;
+ Opts.pageRangeSelection = Options->AllPages->isChecked() ? 0 : 1;
+ Opts.pageRangeString = Options->PageNr->text();
Opts.PresentMode = Options->CheckBox10->isChecked();
Opts.PresentVals = EffVal;
Opts.Articles = Options->Article->isChecked();
Modified: trunk/Scribus/scribus/ui/tabpdfoptions.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17925&path=/trunk/Scribus/scribus/ui/tabpdfoptions.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/tabpdfoptions.cpp (original)
+++ trunk/Scribus/scribus/ui/tabpdfoptions.cpp Sat Dec 1 11:28:12 2012
@@ -1027,6 +1027,17 @@
AllPages->setChecked( true );
PageNr->setEnabled(false);
pageNrButton->setEnabled(false);
+ if (mdoc != 0 && exporting)
+ {
+ AllPages->setChecked(Opts.pageRangeSelection == 0);
+ OnlySome->setChecked(Opts.pageRangeSelection != 0);
+ if (OnlySome->isChecked())
+ {
+ PageNr->setEnabled(true);
+ PageNr->setText(Opts.pageRangeString);
+ pageNrButton->setEnabled(true);
+ }
+ }
RotateDeg->setCurrentIndex(Opts.RotateDeg / 90);
MirrorH->setChecked(Opts.MirrorH);
MirrorV->setChecked(Opts.MirrorV);
@@ -1471,6 +1482,8 @@
pdfOptions.MirrorH = MirrorH->isChecked();
pdfOptions.MirrorV = MirrorV->isChecked();
pdfOptions.RotateDeg = RotateDeg->currentIndex() * 90;
+ pdfOptions.pageRangeSelection = AllPages->isChecked() ? 0 : 1;
+ pdfOptions.pageRangeString = PageNr->text();
pdfOptions.Articles = Article->isChecked();
pdfOptions.Encrypt = Encry->isChecked();
pdfOptions.UseLPI = UseLPI->isChecked();
More information about the scribus-commit
mailing list