summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2023-05-08 14:25:28 +0200
committerAndras Timar <andras.timar@collabora.com>2023-05-13 20:05:33 +0200
commita7741db7a30f7d734fffe016d98d9170de82d8b8 (patch)
treebcd0bc1c4bcdfb862f923b3325dd1c67a5081e61 /oox
parent2ef63bae02a26ae29f02ee2f730229c07d6422fd (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 Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151561 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/helper/attributelist.cxx3
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();