Not necessary to assign bool to false for changing just 2 lines after
authorMontel Laurent <kdeqt@yahoo.fr>
Fri, 30 Nov 2012 14:09:02 +0000 (15:09 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 30 Nov 2012 22:56:02 +0000 (23:56 +0100)
Change-Id: I4ed9a07e3dc2cac9d82b3070a2dd22cca2d80f3d
Reviewed-by: David Faure <david.faure@kdab.com>
src/gui/text/qtextodfwriter.cpp

index 8f6025f..aefa235 100644 (file)
@@ -303,9 +303,8 @@ void QTextOdfWriter::writeBlock(QXmlStreamWriter &writer, const QTextBlock &bloc
         int precedingSpaces = 0;
         int exportedIndex = 0;
         for (int i=0; i <= fragmentText.count(); ++i) {
-            bool isSpace = false;
-                QChar character = fragmentText[i];
-                isSpace = character.unicode() == ' ';
+            QChar character = fragmentText[i];
+            bool isSpace = character.unicode() == ' ';
 
             // find more than one space. -> <text:s text:c="2" />
             if (!isSpace && escapeNextSpace && precedingSpaces > 1) {