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

Bjoern Michaelsen bjoern.michaelsen at canonical.com
Thu Nov 20 10:19:38 PST 2014


 sw/source/filter/html/htmlflywriter.cxx |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 6759ca10dcf5414f02439d0a544ed50433bb477e
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Wed Nov 19 22:12:16 2014 +0100

    refactor assignment out of complex expression
    
    Change-Id: I20dedb69e562869dba90db15e9902e714680bf03
    Reviewed-on: https://gerrit.libreoffice.org/12994
    Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
    Tested-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>

diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index 65b5fad..92608b6 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -1842,9 +1842,12 @@ void SwHTMLWriter::AddLinkTarget( const OUString& rURL )
             bFound = true;
             break;
         case '%':
-            bFound = (rURL.getLength() - nPos) >=3 &&
-                     rURL[ nPos+1 ] == '7' &&
-                     ((c =rURL[ nPos+2 ]) == 'C' || c == 'c');
+            bFound = (rURL.getLength() - nPos) >=3 && rURL[ nPos+1 ] == '7';
+            if(bFound)
+            {
+                c = rURL[ nPos+2 ];
+                bFound = (c == 'C' || c == 'c');
+            }
             if( bFound )
                 bEncoded = true;
         }


More information about the Libreoffice-commits mailing list