r17156 by fschmid - Fixed Bug 2221: "scribus crash with signal 6 or complete freeze while trying to import complex svg files"
scribus-commit
scribus-commit at lists.scribus.net
Fri Dec 30 20:56:07 UTC 2011
Author: fschmid
Date: Fri Dec 30 20:56:07 2011
New Revision: 17156
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17156
Log:
Fixed Bug 2221: "scribus crash with signal 6 or complete freeze while trying to import complex svg files"
Modified:
trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
trunk/Scribus/scribus/scribusdoc.cpp
Modified: trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17156&path=/trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp Fri Dec 30 20:56:07 2011
@@ -669,9 +669,12 @@
item->OwnPage = m_Doc->OnPage(item);
if (e.isElement())
{
- QString nodeId = e.toElement().attribute("id");
- if( !nodeId.isEmpty() )
- item->setItemName(" "+nodeId);
+ if (!(importerFlags & LoadSavePlugin::lfCreateDoc))
+ {
+ QString nodeId = e.toElement().attribute("id");
+ if( !nodeId.isEmpty() )
+ item->setItemName(" "+nodeId);
+ }
}
item->setFillTransparency( 1 - gc->FillOpacity * gc->Opacity );
item->setLineTransparency( 1 - gc->StrokeOpacity * gc->Opacity );
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17156&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Fri Dec 30 20:56:07 2011
@@ -5551,19 +5551,18 @@
for (uint i = 0; i < docItemCount; ++i)
{
PageItem *currItem = Items->at(i);
+ if (checkItemName == currItem->itemName())
+ return true;
if (currItem->isGroup())
+ {
allItems = currItem->asGroupFrame()->getItemList();
- else
- allItems.append(currItem);
- for (int ii = 0; ii < allItems.count(); ii++)
- {
- if (checkItemName == allItems.at(ii)->itemName())
- {
- found = true;
- break;
- }
-
- }
+ for (int ii = 0; ii < allItems.count(); ii++)
+ {
+ if (checkItemName == allItems.at(ii)->itemName())
+ return true;
+ }
+ }
+ allItems.clear();
}
return found;
}
More information about the scribus-commit
mailing list