diff options
author | Eike Rathke <erack@redhat.com> | 2023-05-08 14:25:28 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2023-05-08 23:18:46 +0200 |
commit | c742ab96ccac05465d87e860838c92f1f370aea3 (patch) | |
tree | e402d32977df7fcd9a7c3110cd2f8ae81916dbc8 | |
parent | 2c4bfbf224aa5ced905bbe569ca56ecf5e00115f (diff) |
Do not copy decodeXString() string and analyse if there is nothing to decode
... which usually isn't.
Change-Id: I1cadc5a4c0072d5152173ad41e54e25c224e96db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151509
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
-rw-r--r-- | oox/source/helper/attributelist.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/oox/source/helper/attributelist.cxx b/oox/source/helper/attributelist.cxx index 037483cefb5a..7a973975f3d2 100644 --- a/oox/source/helper/attributelist.cxx +++ b/oox/source/helper/attributelist.cxx @@ -98,6 +98,9 @@ OUString AttributeConversion::decodeXString( const OUString& rValue ) // string shorter than one encoded character - no need to decode if( rValue.getLength() < XSTRING_ENCCHAR_LEN ) return rValue; + if (rValue.indexOf(u"_x") == -1) + return rValue; + OUStringBuffer aBuffer; const sal_Unicode* pcStr = rValue.getStr(); const sal_Unicode* pcEnd = pcStr + rValue.getLength(); |