r17729 by jghali - #10925: Crash when importing an .odt with bullet lists in it
scribus-commit
scribus-commit at lists.scribus.net
Sat Jul 21 16:43:57 UTC 2012
Author: jghali
Date: Sat Jul 21 16:43:57 2012
New Revision: 17729
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17729
Log:
#10925: Crash when importing an .odt with bullet lists in it
Modified:
branches/Version14x/Scribus/scribus/plugins/gettext/sxwim/contentreader.cpp
branches/Version14x/Scribus/scribus/plugins/gettext/sxwim/contentreader.h
Modified: branches/Version14x/Scribus/scribus/plugins/gettext/sxwim/contentreader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17729&path=/branches/Version14x/Scribus/scribus/plugins/gettext/sxwim/contentreader.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/gettext/sxwim/contentreader.cpp (original)
+++ branches/Version14x/Scribus/scribus/plugins/gettext/sxwim/contentreader.cpp Sat Jul 21 16:43:57 2012
@@ -47,7 +47,6 @@
inList = false;
inNote = false;
inNoteBody = false;
- isOrdered = false;
inSpan = false;
append = 0;
listIndex = 0;
@@ -119,19 +118,17 @@
styleNames.clear();
styleNames.push_back(QString(currentList + "_%1").arg(listLevel));
if (name == "text:ordered-list")
- {
- isOrdered = true;
isOrdered2.push_back(true);
- }
- else
- {
- isOrdered = false;
+ else
isOrdered2.push_back(false);
- }
}
else if (name == "text:list-item")
{
- if (isOrdered2[listLevel - 1])
+ bool isOrdered = false;
+ int levelIndex = listLevel - 1;
+ if (levelIndex >= 0 && levelIndex < isOrdered2.size())
+ isOrdered = isOrdered2[listLevel - 1];
+ if (isOrdered)
{
++listIndex;
++listIndex2[listLevel - 1];
Modified: branches/Version14x/Scribus/scribus/plugins/gettext/sxwim/contentreader.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17729&path=/branches/Version14x/Scribus/scribus/plugins/gettext/sxwim/contentreader.h
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/gettext/sxwim/contentreader.h (original)
+++ branches/Version14x/Scribus/scribus/plugins/gettext/sxwim/contentreader.h Sat Jul 21 16:43:57 2012
@@ -63,7 +63,6 @@
bool inList;
bool inNote;
bool inNoteBody;
- bool isOrdered;
bool inSpan;
int append;
int listLevel;
More information about the scribus-commit
mailing list