diff options
-rw-r--r-- | scribus/plugins/gettext/sxwim/contentreader.cpp | 13 | ||||
-rw-r--r-- | scribus/plugins/gettext/sxwim/contentreader.h | 1 |
2 files changed, 5 insertions, 9 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]; diff --git a/scribus/plugins/gettext/sxwim/contentreader.h b/scribus/plugins/gettext/sxwim/contentreader.h index c8b7e71..5acb61d 100644 --- a/scribus/plugins/gettext/sxwim/contentreader.h +++ b/scribus/plugins/gettext/sxwim/contentreader.h @@ -63,7 +63,6 @@ private: bool inList; bool inNote; bool inNoteBody; - bool isOrdered; bool inSpan; int append; int listLevel; |