r18394 by fschmid - Fixed Bug #11522: "Deleting pages should delete Effekte data structures", by moving the data structure to the pages itself.
scribus-commit
scribus-commit at lists.scribus.net
Sun Jul 21 19:54:14 UTC 2013
Author: fschmid
Date: Sun Jul 21 19:54:14 2013
New Revision: 18394
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18394
Log:
Fixed Bug #11522: "Deleting pages should delete Effekte data structures", by moving the data structure to the pages itself.
Modified:
trunk/Scribus/scribus/pdflib_core.cpp
trunk/Scribus/scribus/pdfoptions.h
trunk/Scribus/scribus/pdfoptionsio.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.h
trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.h
trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.h
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
trunk/Scribus/scribus/prefsmanager.cpp
trunk/Scribus/scribus/scpage.cpp
trunk/Scribus/scribus/scpage.h
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/ui/pdfopts.cpp
trunk/Scribus/scribus/ui/pdfopts.h
trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
trunk/Scribus/scribus/ui/tabpdfoptions.cpp
trunk/Scribus/scribus/ui/tabpdfoptions.h
trunk/Scribus/scribus/util_formats.cpp
Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp (original)
+++ trunk/Scribus/scribus/pdflib_core.cpp Sun Jul 21 19:54:14 2013
@@ -2948,21 +2948,21 @@
}
if (Options.PresentMode)
{
- if (Options.PresentVals[PgNr].pageViewDuration > 0)
- PutDoc("/Dur "+QString::number(Options.PresentVals[PgNr].pageViewDuration)+"\n");
- if (Options.PresentVals[PgNr].effectType != 0)
+ if (ActPageP->PresentVals.pageViewDuration > 0)
+ PutDoc("/Dur "+QString::number(ActPageP->PresentVals.pageViewDuration)+"\n");
+ if (ActPageP->PresentVals.effectType != 0)
{
PutDoc("/Trans << /Type /Trans\n");
- PutDoc("/D "+QString::number(Options.PresentVals[PgNr].pageEffectDuration)+"\n");
- switch (Options.PresentVals[PgNr].effectType)
+ PutDoc("/D "+QString::number(ActPageP->PresentVals.pageEffectDuration)+"\n");
+ switch (ActPageP->PresentVals.effectType)
{
case 1:
PutDoc("/S /Blinds\n");
- PutDoc(Options.PresentVals[PgNr].Dm == 0 ? "/Dm /H\n" : "/Dm /V\n");
+ PutDoc(ActPageP->PresentVals.Dm == 0 ? "/Dm /H\n" : "/Dm /V\n");
break;
case 2:
PutDoc("/S /Box\n");
- PutDoc(Options.PresentVals[PgNr].M == 0 ? "/M /I\n" : "/M /O\n");
+ PutDoc(ActPageP->PresentVals.M == 0 ? "/M /I\n" : "/M /O\n");
break;
case 3:
PutDoc("/S /Dissolve\n");
@@ -2970,7 +2970,7 @@
case 4:
PutDoc("/S /Glitter\n");
PutDoc("/Di ");
- switch (Options.PresentVals[PgNr].Di)
+ switch (ActPageP->PresentVals.Di)
{
case 0:
PutDoc("0");
@@ -2989,13 +2989,13 @@
break;
case 5:
PutDoc("/S /Split\n");
- PutDoc(Options.PresentVals[PgNr].Dm == 0 ? "/Dm /H\n" : "/Dm /V\n");
- PutDoc(Options.PresentVals[PgNr].M == 0 ? "/M /I\n" : "/M /O\n");
+ PutDoc(ActPageP->PresentVals.Dm == 0 ? "/Dm /H\n" : "/Dm /V\n");
+ PutDoc(ActPageP->PresentVals.M == 0 ? "/M /I\n" : "/M /O\n");
break;
case 6:
PutDoc("/S /Wipe\n");
PutDoc("/Di ");
- switch (Options.PresentVals[PgNr].Di)
+ switch (ActPageP->PresentVals.Di)
{
case 0:
PutDoc("0");
@@ -3018,7 +3018,7 @@
case 7:
PutDoc("/S /Push\n");
PutDoc("/Di ");
- switch (Options.PresentVals[PgNr].Di)
+ switch (ActPageP->PresentVals.Di)
{
case 0:
PutDoc("0");
@@ -3041,7 +3041,7 @@
case 8:
PutDoc("/S /Cover\n");
PutDoc("/Di ");
- switch (Options.PresentVals[PgNr].Di)
+ switch (ActPageP->PresentVals.Di)
{
case 0:
PutDoc("0");
@@ -3064,7 +3064,7 @@
case 9:
PutDoc("/S /Uncover\n");
PutDoc("/Di ");
- switch (Options.PresentVals[PgNr].Di)
+ switch (ActPageP->PresentVals.Di)
{
case 0:
PutDoc("0");
Modified: trunk/Scribus/scribus/pdfoptions.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&path=/trunk/Scribus/scribus/pdfoptions.h
==============================================================================
--- trunk/Scribus/scribus/pdfoptions.h (original)
+++ trunk/Scribus/scribus/pdfoptions.h Sun Jul 21 19:54:14 2013
@@ -116,7 +116,6 @@
bool doClip;
int RotateDeg;
bool PresentMode;
- QList<PDFPresentationData> PresentVals;
QString fileName;
bool isGrayscale;
bool UseRGB;
Modified: trunk/Scribus/scribus/pdfoptionsio.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&path=/trunk/Scribus/scribus/pdfoptionsio.cpp
==============================================================================
--- trunk/Scribus/scribus/pdfoptionsio.cpp (original)
+++ trunk/Scribus/scribus/pdfoptionsio.cpp Sun Jul 21 19:54:14 2013
@@ -226,7 +226,7 @@
// </presentationSettingsEntry>
// ...
// </presentationSettings>
- QDomElement presentationSettings = m_doc.createElement("presentationSettings");
+/* QDomElement presentationSettings = m_doc.createElement("presentationSettings");
m_root.appendChild(presentationSettings);
QList<PDFPresentationData>::iterator it;
for (it = m_opts->PresentVals.begin(); it != m_opts->PresentVals.end(); ++it)
@@ -241,7 +241,7 @@
addElem(psEntry, "dm", (*it).Dm);
addElem(psEntry, "m", (*it).M);
addElem(psEntry, "di", (*it).Di);
- }
+ }*/
}
// Save PDFOptions::LPISettings
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&path=/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp Sun Jul 21 19:54:14 2013
@@ -1232,7 +1232,7 @@
ef.Dm = pdfF.attribute("Dm").toInt();
ef.M = pdfF.attribute("M").toInt();
ef.Di = pdfF.attribute("Di").toInt();
- m_Doc->pdfOptions().PresentVals.append(ef);
+ EffVal.append(ef);
}
PFO = PFO.nextSibling();
}
@@ -1246,6 +1246,14 @@
//m_Doc->Items = m_Doc->DocItems;
m_Doc->setMasterPageMode(false);
m_View->reformPages();
+ if (!EffVal.isEmpty())
+ {
+ for (int pdoE = 0; pdoE < EffVal.count(); ++pdoE)
+ {
+ if (pdoE < m_Doc->Pages->count())
+ m_Doc->Pages->at(pdoE)->PresentVals = EffVal[pdoE];
+ }
+ }
handleOldLayerBehavior(m_Doc);
if (m_Doc->layerCount() == 0)
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&path=/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.h
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.h (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.h Sun Jul 21 19:54:14 2013
@@ -66,6 +66,7 @@
QMap<long long,int> itemRemap;
QMap<int,long long> itemNext;
QMap<uint,QString> DoVorl;
+ QList<PDFPresentationData> EffVal;
uint VorlC;
struct CopyPasteBuffer
{
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp Sun Jul 21 19:54:14 2013
@@ -577,6 +577,14 @@
layerToSetActive = nl->ID;
}
m_Doc->setActiveLayer(layerToSetActive);
+ if (!EffVal.isEmpty())
+ {
+ for (int pdoE = 0; pdoE < EffVal.count(); ++pdoE)
+ {
+ if (pdoE < m_Doc->Pages->count())
+ m_Doc->Pages->at(pdoE)->PresentVals = EffVal[pdoE];
+ }
+ }
// reestablish textframe links
if (itemNext.count() != 0)
@@ -1589,7 +1597,7 @@
ef.Dm = attrs.valueAsInt("Dm");
ef.M = attrs.valueAsInt("M");
ef.Di = attrs.valueAsInt("Di");
- doc->pdfOptions().PresentVals.append(ef);
+ EffVal.append(ef);
}
}
return !reader.hasError();
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.h
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.h (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.h Sun Jul 21 19:54:14 2013
@@ -127,6 +127,7 @@
QMap<int, int> itemRemapM;
QMap<int, int> itemNextM;
QList<PageItem*> FrameItems;
+ QList<PDFPresentationData> EffVal;
int itemCount;
int itemCountM;
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&path=/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp Sun Jul 21 19:54:14 2013
@@ -696,7 +696,7 @@
ef.Dm = pdfF.attribute("Dm").toInt();
ef.M = pdfF.attribute("M").toInt();
ef.Di = pdfF.attribute("Di").toInt();
- m_Doc->pdfOptions().PresentVals.append(ef);
+ EffVal.append(ef);
}
PFO = PFO.nextSibling();
}
@@ -1071,6 +1071,14 @@
layerToSetActive = nl->ID;
}
m_Doc->setActiveLayer(layerToSetActive);
+ if (!EffVal.isEmpty())
+ {
+ for (int pdoE = 0; pdoE < EffVal.count(); ++pdoE)
+ {
+ if (pdoE < m_Doc->Pages->count())
+ m_Doc->Pages->at(pdoE)->PresentVals = EffVal[pdoE];
+ }
+ }
// reestablish textframe links
if (itemNext.count() != 0)
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&path=/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.h
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.h (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.h Sun Jul 21 19:54:14 2013
@@ -65,6 +65,7 @@
QMap<QString,QString> ReplacedFonts;
QMap<uint,QString> DoVorl;
uint VorlC;
+ QList<PDFPresentationData> EffVal;
};
extern "C" PLUGIN_API int scribus13format_getPluginAPIVersion();
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&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 Sun Jul 21 19:54:14 2013
@@ -1784,6 +1784,14 @@
if (m_Doc->Layers.count() == 0)
m_Doc->Layers.newLayer( QObject::tr("Background") );
+ if (!EffVal.isEmpty())
+ {
+ for (int pdoE = 0; pdoE < EffVal.count(); ++pdoE)
+ {
+ if (pdoE < m_Doc->Pages->count())
+ m_Doc->Pages->at(pdoE)->PresentVals = EffVal[pdoE];
+ }
+ }
if (groupStackP.count() > 0)
{
@@ -3130,7 +3138,7 @@
ef.Dm = attrs.valueAsInt("Dm");
ef.M = attrs.valueAsInt("M");
ef.Di = attrs.valueAsInt("Di");
- doc->pdfOptions().PresentVals.append(ef);
+ EffVal.append(ef);
}
}
return !reader.hasError();
@@ -3534,6 +3542,14 @@
newPage->guides.addHorizontals(newPage->guides.getAutoHorizontals(newPage), GuideManagerCore::Auto);
newPage->guides.addVerticals(newPage->guides.getAutoVerticals(newPage), GuideManagerCore::Auto);
+ struct PDFPresentationData ef;
+ ef.pageEffectDuration = attrs.valueAsInt("pageEffectDuration", 1);
+ ef.pageViewDuration = attrs.valueAsInt("pageViewDuration", 1);
+ ef.effectType = attrs.valueAsInt("effectType", 0);
+ ef.Dm = attrs.valueAsInt("Dm", 0);
+ ef.M = attrs.valueAsInt("M", 0);
+ ef.Di = attrs.valueAsInt("Di", 0);
+ newPage->PresentVals = ef;
return true;
}
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h Sun Jul 21 19:54:14 2013
@@ -147,6 +147,7 @@
NumerationRange NSrange;
};
QList<NoteFrameData> notesFramesData;
+ QList<PDFPresentationData> EffVal;
void updateNames2Ptr(); //after document load items pointers should be updated in markeredItemList
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&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 Sun Jul 21 19:54:14 2013
@@ -1130,16 +1130,6 @@
docu.writeEmptyElement("Subset");
docu.writeAttribute("Name", m_Doc->pdfOptions().SubsetList[pdoS]);
}
- for (int pdoE = 0; pdoE < m_Doc->pdfOptions().PresentVals.count(); ++pdoE)
- {
- docu.writeEmptyElement("Effekte");
- docu.writeAttribute("pageEffectDuration", m_Doc->pdfOptions().PresentVals[pdoE].pageEffectDuration);
- docu.writeAttribute("pageViewDuration", m_Doc->pdfOptions().PresentVals[pdoE].pageViewDuration);
- docu.writeAttribute("effectType", m_Doc->pdfOptions().PresentVals[pdoE].effectType);
- docu.writeAttribute("Dm", m_Doc->pdfOptions().PresentVals[pdoE].Dm);
- docu.writeAttribute("M", m_Doc->pdfOptions().PresentVals[pdoE].M);
- docu.writeAttribute("Di", m_Doc->pdfOptions().PresentVals[pdoE].Di);
- }
QMap<QString,LPIData>::Iterator itlp;
for (itlp = m_Doc->pdfOptions().LPISettings.begin(); itlp != m_Doc->pdfOptions().LPISettings.end(); ++itlp)
{
@@ -1505,6 +1495,12 @@
docu.writeAttribute("AGhorizontalAutoRefer", page->guides.horizontalAutoRefer());
docu.writeAttribute("AGverticalAutoRefer", page->guides.verticalAutoRefer());
docu.writeAttribute("AGSelection", GuideManagerIO::writeSelection(page));
+ docu.writeAttribute("pageEffectDuration", page->PresentVals.pageEffectDuration);
+ docu.writeAttribute("pageViewDuration", page->PresentVals.pageViewDuration);
+ docu.writeAttribute("effectType", page->PresentVals.effectType);
+ docu.writeAttribute("Dm", page->PresentVals.Dm);
+ docu.writeAttribute("M", page->PresentVals.M);
+ docu.writeAttribute("Di", page->PresentVals.Di);
docu.writeEndElement();
}
}
Modified: trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&path=/trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp Sun Jul 21 19:54:14 2013
@@ -657,7 +657,7 @@
}
}
m_Doc->setPageSize("Custom");
- m_Doc->pdfOptions().PresentVals.clear();
+ // m_Doc->pdfOptions().PresentVals.clear();
for (uint ap = 0; ap < pageNs.size(); ++ap)
{
int pp = pageNs[ap];
@@ -738,7 +738,7 @@
{
m_Doc->pdfOptions().PresentMode = true;
PageTransition *pgTrans = new PageTransition(transi);
- ef.pageViewDuration = pdfDoc->getPage(pp + 1)->getDuration();
+ ef.pageViewDuration = pdfDoc->getPage(pp)->getDuration();
ef.pageEffectDuration = pgTrans->getDuration();
ef.Dm = pgTrans->getAlignment() == transitionHorizontal ? 0 : 1;
ef.M = pgTrans->getDirection() == transitionInward ? 0 : 1;
@@ -778,7 +778,7 @@
ef.effectType = 10;
delete pgTrans;
}
- m_Doc->pdfOptions().PresentVals.append(ef);
+ m_Doc->currentPage()->PresentVals = ef;
trans.free();
transi->free();
}
Modified: trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&path=/trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp Sun Jul 21 19:54:14 2013
@@ -401,10 +401,10 @@
PyErr_SetString(PyExc_SystemError, "Can not initialize 'effval' attribute");
return -1;
}
- int num2 = ScCore->primaryMainWindow()->doc->pdfOptions().PresentVals.count();
- for (i = 0; i<num2; ++i) {
+ for (i = 0; i < num; ++i)
+ {
PyObject *tmp;
- PDFPresentationData t = ScCore->primaryMainWindow()->doc->pdfOptions().PresentVals[i];
+ PDFPresentationData t = ScCore->primaryMainWindow()->doc->Pages->at(i)->PresentVals;
tmp = Py_BuildValue(const_cast<char*>("[iiiiii]"), t.pageEffectDuration, t.pageViewDuration, t.effectType, t.Dm, t.M, t.Di );
if (tmp)
PyList_SetItem(effval, i, tmp);
@@ -1087,12 +1087,12 @@
t.Dm = PyInt_AsLong(PyList_GetItem(ti, 3));
t.M = PyInt_AsLong(PyList_GetItem(ti, 4));
t.Di = PyInt_AsLong(PyList_GetItem(ti, 5));
- PresentVals.append(t);
+ // PresentVals.append(t);
} // if ti=NULL
}
- ScCore->primaryMainWindow()->doc->pdfOptions().PresentVals = PresentVals;
+// ScCore->primaryMainWindow()->doc->pdfOptions().PresentVals = PresentVals;
// apply lpival
int n2 = PyList_Size(self->lpival);
for (int i=0; i<n2; ++i){
Modified: trunk/Scribus/scribus/prefsmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&path=/trunk/Scribus/scribus/prefsmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.cpp (original)
+++ trunk/Scribus/scribus/prefsmanager.cpp Sun Jul 21 19:54:14 2013
@@ -445,7 +445,6 @@
appPrefs.pdfPrefs.RotateDeg = 0;
appPrefs.pdfPrefs.PresentMode = false;
appPrefs.pdfPrefs.fileName = "";
- appPrefs.pdfPrefs.PresentVals.clear();
appPrefs.pdfPrefs.isGrayscale = false;
appPrefs.pdfPrefs.UseRGB = true;
appPrefs.pdfPrefs.UseProfiles = false;
Modified: trunk/Scribus/scribus/scpage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&path=/trunk/Scribus/scribus/scpage.cpp
==============================================================================
--- trunk/Scribus/scribus/scpage.cpp (original)
+++ trunk/Scribus/scribus/scpage.cpp Sun Jul 21 19:54:14 2013
@@ -54,6 +54,12 @@
{
guides.setPage(this);
marginPreset = 0;
+ PresentVals.pageEffectDuration = 1;
+ PresentVals.pageViewDuration = 1;
+ PresentVals.effectType = 0;
+ PresentVals.Dm = 0;
+ PresentVals.M = 0;
+ PresentVals.Di = 0;
}
ScPage::~ScPage()
Modified: trunk/Scribus/scribus/scpage.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&path=/trunk/Scribus/scribus/scpage.h
==============================================================================
--- trunk/Scribus/scribus/scpage.h (original)
+++ trunk/Scribus/scribus/scpage.h Sun Jul 21 19:54:14 2013
@@ -97,6 +97,7 @@
mutable QList<PageItem*> FromMaster;
//! \brief Guides lists and basic operations
GuideManagerCore guides;
+ PDFPresentationData PresentVals;
protected:
UndoManager * const undoManager;
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Sun Jul 21 19:54:14 2013
@@ -8466,7 +8466,7 @@
doc->pdfOptions().SubsetList = tmpEm;
}
MarginStruct optBleeds(doc->pdfOptions().bleeds);
- PDFExportDialog dia(this, doc->DocName, ReallyUsed, view, doc->pdfOptions(), doc->pdfOptions().PresentVals, ScCore->PDFXProfiles, prefsManager->appPrefs.fontPrefs.AvailFonts, ScCore->PrinterProfiles);
+ PDFExportDialog dia(this, doc->DocName, ReallyUsed, view, doc->pdfOptions(), ScCore->PDFXProfiles, prefsManager->appPrefs.fontPrefs.AvailFonts, ScCore->PrinterProfiles);
if (dia.exec())
{
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
Modified: trunk/Scribus/scribus/ui/pdfopts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&path=/trunk/Scribus/scribus/ui/pdfopts.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pdfopts.cpp (original)
+++ trunk/Scribus/scribus/ui/pdfopts.cpp Sun Jul 21 19:54:14 2013
@@ -44,12 +44,10 @@
PDFExportDialog::PDFExportDialog( QWidget* parent, const QString & docFileName,
const QMap<QString, int > & DocFonts,
ScribusView *currView, PDFOptions & pdfOptions,
- const QList<PDFPresentationData> & Eff,
const ProfilesL & PDFXProfiles, const SCFonts &AllFonts,
const ProfilesL & printerProfiles)
: QDialog( parent ),
m_doc(currView->Doc),
- m_presEffects(Eff),
m_opts(pdfOptions),
m_unitRatio(currView->Doc->unitRatio()),
m_cmsDescriptor(""),
@@ -109,7 +107,7 @@
PDFExportLayout->addWidget( Name );
Options = new TabPDFOptions( this, pdfOptions, AllFonts, PDFXProfiles, DocFonts,
- Eff, currView->Doc->unitIndex(), currView->Doc->pageHeight(),
+ currView->Doc->unitIndex(), currView->Doc->pageHeight(),
currView->Doc->pageWidth(), currView->Doc, true );
PDFExportLayout->addWidget( Options );
Layout7 = new QHBoxLayout;
@@ -257,7 +255,13 @@
m_opts.pageRangeSelection = Options->AllPages->isChecked() ? 0 : 1;
m_opts.pageRangeString = Options->PageNr->text();
m_opts.PresentMode = Options->CheckBox10->isChecked();
- m_opts.PresentVals = m_presEffects;
+ if (m_opts.PresentMode)
+ {
+ for (int pg = 0; pg < m_doc->Pages->count(); ++pg)
+ {
+ m_doc->Pages->at(pg)->PresentVals = m_presEffects[pg];
+ }
+ }
m_opts.Articles = Options->Article->isChecked();
m_opts.Encrypt = Options->Encry->isChecked();
m_opts.UseLPI = Options->UseLPI->isChecked();
Modified: trunk/Scribus/scribus/ui/pdfopts.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&path=/trunk/Scribus/scribus/ui/pdfopts.h
==============================================================================
--- trunk/Scribus/scribus/ui/pdfopts.h (original)
+++ trunk/Scribus/scribus/ui/pdfopts.h Sun Jul 21 19:54:14 2013
@@ -45,7 +45,6 @@
PDFExportDialog( QWidget* parent, const QString & docFileName,
const QMap<QString, int > & DocFonts,
ScribusView * currView, PDFOptions & pdfOptions,
- const QList<PDFPresentationData> & Eff,
const ProfilesL & PDFXProfiles, const SCFonts & AllFonts,
const ProfilesL & printerProfiles);
~PDFExportDialog() {};
Modified: trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&path=/trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_pdfexport.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_pdfexport.cpp Sun Jul 21 19:54:14 2013
@@ -349,37 +349,10 @@
showPagePreviewsCheckBox->setChecked(false);
effectsPageListWidget->clear();
QString tmp;
- struct PDFPresentationData ef;
- if (EffVal.count() != 0)
- {
- for (int pg2 = 0; pg2 < m_doc->Pages->count(); ++pg2)
- {
- effectsPageListWidget->addItem( tr("Page")+" "+tmp.setNum(pg2+1));
- if (EffVal.count()-1 < pg2)
- {
- ef.pageEffectDuration = 1;
- ef.pageViewDuration = 1;
- ef.effectType = 0;
- ef.Dm = 0;
- ef.M = 0;
- ef.Di = 0;
- EffVal.append(ef);
- }
- }
- }
- else
- {
- for (int pg = 0; pg < m_doc->Pages->count(); ++pg)
- {
- effectsPageListWidget->addItem( tr("Page")+" "+tmp.setNum(pg+1));
- ef.pageEffectDuration = 1;
- ef.pageViewDuration = 1;
- ef.effectType = 0;
- ef.Dm = 0;
- ef.M = 0;
- ef.Di = 0;
- EffVal.append(ef);
- }
+ for (int pg = 0; pg < m_doc->Pages->count(); ++pg)
+ {
+ effectsPageListWidget->addItem( tr("Page")+" "+tmp.setNum(pg+1));
+ EffVal.append(m_doc->Pages->at(pg)->PresentVals);
}
displayDurationSpinBox->setValue(EffVal[0].pageViewDuration);
effectDurationSpinBox->setValue(EffVal[0].pageEffectDuration);
Modified: trunk/Scribus/scribus/ui/tabpdfoptions.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&path=/trunk/Scribus/scribus/ui/tabpdfoptions.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/tabpdfoptions.cpp (original)
+++ trunk/Scribus/scribus/ui/tabpdfoptions.cpp Sun Jul 21 19:54:14 2013
@@ -48,8 +48,7 @@
TabPDFOptions::TabPDFOptions( QWidget* parent, PDFOptions & Optionen,
const SCFonts &AllFonts,
const ProfilesL & PDFXProfiles,
- const QMap<QString, int> & DocFonts,
- const QList<PDFPresentationData> & Eff,
+ const QMap<QString, int> & DocFonts,
int unitIndex, double PageH, double PageB,
ScribusDoc * mdoc, bool exporting )
: QTabWidget( parent ),
@@ -110,7 +109,6 @@
// End GUI member pointers
// Protected non-gui members
PgSel(0),
- EffVal(Eff),
// Protected GUI member pointers
actionCombo(0),
AllPages(0),
@@ -892,7 +890,7 @@
BleedLeft->setMinimum(0);
BleedLeft->setMaximum(3000*unitRatio);
- restoreDefaults(Optionen, AllFonts, PDFXProfiles, DocFonts, Eff, unitIndex, PageH, PageB, m_Doc, pdfExport);
+ restoreDefaults(Optionen, AllFonts, PDFXProfiles, DocFonts, unitIndex, PageH, PageB, m_Doc, pdfExport);
if (m_Doc != 0 && exporting)
{
@@ -1018,7 +1016,6 @@
const SCFonts &AllFonts,
const ProfilesL & PDFXProfiles,
const QMap<QString, int> & DocFonts,
- const QList<PDFPresentationData> & Eff,
int unitIndex, double PageH, double PageB,
ScribusDoc * mdoc, bool exporting)
{
@@ -1201,37 +1198,10 @@
PagePrev->setChecked(false);
Pages->clear();
QString tmp;
- struct PDFPresentationData ef;
- if (EffVal.count() != 0)
- {
- for (int pg2 = 0; pg2 < m_Doc->Pages->count(); ++pg2)
- {
- Pages->addItem( tr("Page")+" "+tmp.setNum(pg2+1));
- if (EffVal.count()-1 < pg2)
- {
- ef.pageEffectDuration = 1;
- ef.pageViewDuration = 1;
- ef.effectType = 0;
- ef.Dm = 0;
- ef.M = 0;
- ef.Di = 0;
- EffVal.append(ef);
- }
- }
- }
- else
- {
- for (int pg = 0; pg < m_Doc->Pages->count(); ++pg)
- {
- Pages->addItem( tr("Page")+" "+tmp.setNum(pg+1));
- ef.pageEffectDuration = 1;
- ef.pageViewDuration = 1;
- ef.effectType = 0;
- ef.Dm = 0;
- ef.M = 0;
- ef.Di = 0;
- EffVal.append(ef);
- }
+ for (int pg = 0; pg < m_Doc->Pages->count(); ++pg)
+ {
+ Pages->addItem( tr("Page")+" "+tmp.setNum(pg+1));
+ EffVal.append(m_Doc->Pages->at(pg)->PresentVals);
}
PageTime->setValue(EffVal[0].pageViewDuration);
EffectTime->setValue(EffVal[0].pageEffectDuration);
Modified: trunk/Scribus/scribus/ui/tabpdfoptions.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&path=/trunk/Scribus/scribus/ui/tabpdfoptions.h
==============================================================================
--- trunk/Scribus/scribus/ui/tabpdfoptions.h (original)
+++ trunk/Scribus/scribus/ui/tabpdfoptions.h Sun Jul 21 19:54:14 2013
@@ -38,20 +38,18 @@
Q_OBJECT
public:
- TabPDFOptions( QWidget* parent, PDFOptions & Optionen,
- const SCFonts &AllFonts,
- const ProfilesL & PDFXProfiles,
- const QMap<QString, int> & DocFonts,
- const QList<PDFPresentationData> & Eff,
- int unitIndex, double PageH, double PageB,
- ScribusDoc *mdoc = 0, bool exporting = false);
+ TabPDFOptions(QWidget* parent, PDFOptions & Optionen,
+ const SCFonts &AllFonts,
+ const ProfilesL & PDFXProfiles,
+ const QMap<QString, int> & DocFonts,
+ int unitIndex, double PageH, double PageB,
+ ScribusDoc *mdoc = 0, bool exporting = false);
~TabPDFOptions() {};
void restoreDefaults(PDFOptions & Optionen,
const SCFonts &AllFonts,
const ProfilesL & PDFXProfiles,
const QMap<QString, int> & DocFonts,
- const QList<PDFPresentationData> & Eff,
int unitIndex, double PageH, double PageB,
ScribusDoc *mdoc, bool exporting);
Modified: trunk/Scribus/scribus/util_formats.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18394&path=/trunk/Scribus/scribus/util_formats.cpp
==============================================================================
--- trunk/Scribus/scribus/util_formats.cpp (original)
+++ trunk/Scribus/scribus/util_formats.cpp Sun Jul 21 19:54:14 2013
@@ -37,7 +37,7 @@
#ifdef GMAGICK_FOUND
m_fmts.insert(FormatsManager::GMAGICK, QStringList() << "xbm" << "tga" << "ptif" << "ppm" << "pnm" << "pgm" << "pcds" << "pcd" << "pbm" << "mng" << "ico" << "gif" << "fax" << "dpx" << "bmp" << "xcf");
#endif
- m_fmts.insert(FormatsManager::UNICONV, QStringList() << "cdr" << "cdt" << "ccx" << "cmx" << "aff" << "sk" << "sk1" << "plt" << "dxf" << "dst" << "pes" << "exp" << "pcs");
+ m_fmts.insert(FormatsManager::UNICONV, QStringList() << "cdt" << "ccx" << "cmx" << "aff" << "sk" << "sk1" << "plt" << "dxf" << "dst" << "pes" << "exp" << "pcs");
m_fmts.insert(FormatsManager::PCT, QStringList() << "pct" << "pic" << "pict");
m_fmtNames[FormatsManager::EPS] = QObject::tr("Encapsulated PostScript \"*.eps\"");
More information about the scribus-commit
mailing list