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

Stephan Bergmann sbergman at redhat.com
Fri Oct 7 13:34:47 UTC 2016


 svtools/source/svhtml/htmlout.cxx |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 96814d2469f476790999634a1b7a9cd75447bef7
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Oct 7 15:32:17 2016 +0200

    Minor performance improvement of previous patch
    
    Change-Id: Ia6c9d4ab15a81c6afd051f24e50983bc2af6d019

diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx
index f885488..5413e91 100644
--- a/svtools/source/svhtml/htmlout.cxx
+++ b/svtools/source/svhtml/htmlout.cxx
@@ -482,10 +482,12 @@ static OString lcl_ConvertCharToHTML( sal_uInt32 c,
             aDest.append('&').append('#').append(static_cast<sal_Int32>(c))
                     // Unicode code points guaranteed to fit into sal_Int32
                  .append(';');
-            OUString cs(&c, 1);
-            if( pNonConvertableChars &&
-                -1 == pNonConvertableChars->indexOf( cs ) )
-                (*pNonConvertableChars) += cs;
+            if( pNonConvertableChars )
+            {
+                OUString cs(&c, 1);
+                if( -1 == pNonConvertableChars->indexOf( cs ) )
+                    (*pNonConvertableChars) += cs;
+            }
         }
     }
     return aDest.makeStringAndClear();


More information about the Libreoffice-commits mailing list