summaryrefslogtreecommitdiffstats
path: root/scribus/plugins/gettext/sxwim/contentreader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scribus/plugins/gettext/sxwim/contentreader.cpp')
-rw-r--r--scribus/plugins/gettext/sxwim/contentreader.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/scribus/plugins/gettext/sxwim/contentreader.cpp b/scribus/plugins/gettext/sxwim/contentreader.cpp
index aa0da3d..1afd591 100644
--- a/scribus/plugins/gettext/sxwim/contentreader.cpp
+++ b/scribus/plugins/gettext/sxwim/contentreader.cpp
@@ -47,7 +47,6 @@ ContentReader::ContentReader(QString documentName, StyleReader *s, gtWriter *w,
inList = false;
inNote = false;
inNoteBody = false;
- isOrdered = false;
inSpan = false;
append = 0;
listIndex = 0;
@@ -119,19 +118,17 @@ bool ContentReader::startElement(const QString&, const QString&, const QString &
styleNames.clear();
styleNames.push_back(QString(currentList + "_%1").arg(listLevel));
if (name == "text:ordered-list")
- {
- isOrdered = true;
isOrdered2.push_back(true);
- }
else
- {
- isOrdered = false;
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];