diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-10-07 15:32:17 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-10-07 15:32:17 +0200 |
commit | 96814d2469f476790999634a1b7a9cd75447bef7 (patch) | |
tree | 02a814acc5ea0de891d2fe9323fe8030cc348aaf | |
parent | 375b99cad4a79d26a6cbcd0f71bc12b312d95818 (diff) |
Minor performance improvement of previous patch
Change-Id: Ia6c9d4ab15a81c6afd051f24e50983bc2af6d019
-rw-r--r-- | svtools/source/svhtml/htmlout.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx index f88548817cec..5413e91da00f 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(); |