diff options
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qtextodfwriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp index 9721243454..6d23866392 100644 --- a/src/gui/text/qtextodfwriter.cpp +++ b/src/gui/text/qtextodfwriter.cpp @@ -358,7 +358,7 @@ void QTextOdfWriter::writeBlock(QXmlStreamWriter &writer, const QTextBlock &bloc int precedingSpaces = 0; int exportedIndex = 0; for (int i=0; i <= fragmentText.count(); ++i) { - QChar character = fragmentText[i]; + QChar character = (i == fragmentText.count() ? QChar() : fragmentText.at(i)); bool isSpace = character.unicode() == ' '; // find more than one space. -> <text:s text:c="2" /> |