[Libreoffice-commits] core.git: sw/source

Matteo Casalin matteo.casalin at yahoo.com
Thu Sep 19 06:05:38 PDT 2013


 sw/source/filter/ww8/writerwordglue.cxx |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 1bda6fd3c46cb6d82490839830b34327af3b6fdd
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date:   Wed Sep 11 01:09:17 2013 +0200

    Too many parentheses, for a wrong check
    
    Change-Id: I4559fd778ac4d08736a9824afb998803377f1042
    Reviewed-on: https://gerrit.libreoffice.org/5964
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index 34e64a6..c8bc889 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -799,13 +799,17 @@ namespace sw
             for (sal_Int32 nI = 0; nI < nLen; ++nI)
             {
                 if (rParams[nI] == '\\')
-                    nI++;
+                    ++nI;
                 else if (rParams[nI] == '\"')
                 {
                     ++nI;
-                    //While not at the end and not at an unescaped end quote
-                    while ((nI < nLen) && (!(rParams[nI] == '\"') && (rParams[nI-1] != '\\')))
+                    // While not at the end and not at an unescaped end quote
+                    while (nI < nLen)
+                    {
+                        if (rParams[nI] == '\"' && rParams[nI-1] != '\\')
+                            break;
                         ++nI;
+                    }
                 }
                 else //normal unquoted section
                 {


More information about the Libreoffice-commits mailing list