r17964 by jghali - #11274 : assert failure when loading document
scribus-commit
scribus-commit at lists.scribus.net
Mon Dec 17 13:11:19 UTC 2012
Author: jghali
Date: Mon Dec 17 13:11:19 2012
New Revision: 17964
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17964
Log:
#11274 : assert failure when loading document
Modified:
branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
branches/Version14x/Scribus/scribus/scribus.cpp
branches/Version14x/Scribus/scribus/scribusdoc.cpp
Modified: branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17964&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 Mon Dec 17 13:11:19 2012
@@ -1244,7 +1244,8 @@
/*m_Doc->GroupCounter = 0;*/
Neu = PasteItem(&pite, m_Doc, fileDir);
Neu->setRedrawBounding();
- Neu->OwnPage = pite.attribute("OwnPage").toInt();
+ // #11274 : OwnPage is not meaningful for pattern items
+ Neu->OwnPage = -1 /*pite.attribute("OwnPage").toInt()*/;
Neu->OnMasterPage = "";
/*m_Doc->GroupCounter = docGc;*/
tmpf = pite.attribute("IFONT", m_Doc->toolSettings.defFont);
@@ -3239,7 +3240,8 @@
/*m_Doc->GroupCounter = 0;*/
Neu = PasteItem(&pite, m_Doc, fileDir);
Neu->setRedrawBounding();
- Neu->OwnPage = pite.attribute("OwnPage").toInt();
+ // #11274 : OwnPage is not meaningful for pattern items
+ Neu->OwnPage = -1 /*pite.attribute("OwnPage").toInt()*/;
Neu->OnMasterPage = "";
Neu->LayerNr = layerTrans.value(Neu->LayerNr, Neu->LayerNr);
/*m_Doc->GroupCounter = docGc;*/
Modified: branches/Version14x/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17964&path=/branches/Version14x/Scribus/scribus/scribus.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scribus.cpp (original)
+++ branches/Version14x/Scribus/scribus/scribus.cpp Mon Dec 17 13:11:19 2012
@@ -9726,6 +9726,7 @@
{
PageItem* paItem = doc->Items->takeAt(ac);
paItem->setItemName(patternName+QString("_%1").arg(as-ac));
+ paItem->OwnPage = -1; // #11274 : OwnPage is not meaningful for pattern items
pat.items.append(paItem);
}
doc->addPattern(patternName, pat);
Modified: branches/Version14x/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17964&path=/branches/Version14x/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scribusdoc.cpp (original)
+++ branches/Version14x/Scribus/scribus/scribusdoc.cpp Mon Dec 17 13:11:19 2012
@@ -4488,6 +4488,19 @@
currItem->OwnPage = -1;
}
+ // #11274: Scribus crash when opening .sla document
+ // OwnPage is not meaningful for pattern items
+ QMap<QString, ScPattern>::iterator patternIt;
+ for (patternIt = docPatterns.begin(); patternIt != docPatterns.end(); ++patternIt)
+ {
+ QList<PageItem*> &patternItems(patternIt->items);
+ for (int i = 0; i < patternItems.count(); ++i)
+ {
+ currItem = patternItems.at(i);
+ currItem->OwnPage = -1;
+ }
+ }
+
// #11097 : we have a bug if an object inside a group fall outside masterpage
QMap<int, PageItem*> groupControls;
for (int i = 0; i < MasterItems.count(); ++i)
More information about the scribus-commit
mailing list