summaryrefslogtreecommitdiff
path: root/xmloff/source/text/XMLTextShapeImportHelper.cxx
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-12-15 09:38:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-12-15 10:50:28 +0100
commita79e6a7cf1ce3be46e4339a54b013ddaa534dd39 (patch)
tree3de6cf2d804dfe0e929f999103fa1c2c01b9ec53 /xmloff/source/text/XMLTextShapeImportHelper.cxx
parent15e4427e8fb56a143caa28b8a3120f3761fc77a5 (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/text/XMLTextShapeImportHelper.cxx')
-rw-r--r--xmloff/source/text/XMLTextShapeImportHelper.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/xmloff/source/text/XMLTextShapeImportHelper.cxx b/xmloff/source/text/XMLTextShapeImportHelper.cxx
index 3c64ffd58e0a..74f8a7a49b26 100644
--- a/xmloff/source/text/XMLTextShapeImportHelper.cxx
+++ b/xmloff/source/text/XMLTextShapeImportHelper.cxx
@@ -88,14 +88,13 @@ void XMLTextShapeImportHelper::addShape(
for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
{
- const OUString sValue = aIter.toString();
switch( aIter.getToken() )
{
case XML_ELEMENT(TEXT, XML_ANCHOR_TYPE):
{
TextContentAnchorType eNew;
// OD 2004-06-01 #i26791# - allow all anchor types
- if ( XMLAnchorTypePropHdl::convert( sValue, eNew ) )
+ if ( XMLAnchorTypePropHdl::convert( aIter.toString(), eNew ) )
{
eAnchorType = eNew;
}
@@ -104,13 +103,13 @@ void XMLTextShapeImportHelper::addShape(
case XML_ELEMENT(TEXT, XML_ANCHOR_PAGE_NUMBER):
{
sal_Int32 nTmp;
- if (::sax::Converter::convertNumber(nTmp, sValue, 1, SHRT_MAX))
+ if (::sax::Converter::convertNumber(nTmp, aIter.toView(), 1, SHRT_MAX))
nPage = static_cast<sal_Int16>(nTmp);
}
break;
case XML_ELEMENT(SVG, XML_Y):
case XML_ELEMENT(SVG_COMPAT, XML_Y):
- rImport.GetMM100UnitConverter().convertMeasureToCore( nY, sValue );
+ rImport.GetMM100UnitConverter().convertMeasureToCore( nY, aIter.toString() );
break;
}
}