diff options
author | Noel <noelgrandin@gmail.com> | 2020-12-15 09:38:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-12-15 10:50:28 +0100 |
commit | a79e6a7cf1ce3be46e4339a54b013ddaa534dd39 (patch) | |
tree | 3de6cf2d804dfe0e929f999103fa1c2c01b9ec53 /xmloff/source/draw/XMLNumberStyles.cxx | |
parent | 15e4427e8fb56a143caa28b8a3120f3761fc77a5 (diff) |
use views to parse rather than allocating OUString
Change-Id: If0a848c64ce8077d1681661873629c83307cf8b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107736
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/draw/XMLNumberStyles.cxx')
-rw-r--r-- | xmloff/source/draw/XMLNumberStyles.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx index db2f93e8b607..3d4407d8a5df 100644 --- a/xmloff/source/draw/XMLNumberStyles.cxx +++ b/xmloff/source/draw/XMLNumberStyles.cxx @@ -531,18 +531,16 @@ SdXMLNumberFormatMemberImportContext::SdXMLNumberFormatMemberImportContext( for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList )) { - OUString sValue = aIter.toString(); - switch (aIter.getToken()) { case XML_ELEMENT(NUMBER, XML_DECIMAL_PLACES): - mbDecimal02 = IsXMLToken( sValue, XML_2 ); + mbDecimal02 = IsXMLToken( aIter, XML_2 ); break; case XML_ELEMENT(NUMBER, XML_STYLE): - mbLong = IsXMLToken( sValue, XML_LONG ); + mbLong = IsXMLToken( aIter, XML_LONG ); break; case XML_ELEMENT(NUMBER, XML_TEXTUAL): - mbTextual = IsXMLToken( sValue, XML_TRUE ); + mbTextual = IsXMLToken( aIter, XML_TRUE ); break; default: XMLOFF_WARN_UNKNOWN("xmloff", aIter); @@ -591,9 +589,8 @@ SdXMLNumberFormatImportContext::SdXMLNumberFormatImportContext( SdXMLImport& rIm for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList )) { - OUString sValue = aIter.toString(); if( aIter.getToken() == XML_ELEMENT(NUMBER, XML_AUTOMATIC_ORDER) ) - mbAutomatic = IsXMLToken( sValue, XML_TRUE ); + mbAutomatic = IsXMLToken( aIter, XML_TRUE ); else XMLOFF_WARN_UNKNOWN("xmloff", aIter); } |