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 /sw/source/filter/xml | |
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 'sw/source/filter/xml')
-rw-r--r-- | sw/source/filter/xml/xmltbli.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index be694b483d00..263fe55c188c 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -397,7 +397,7 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl( case XML_ELEMENT(OFFICE, XML_VALUE): { double fTmp; - if (::sax::Converter::convertDouble(fTmp, aIter.toString())) + if (::sax::Converter::convertDouble(fTmp, aIter.toView())) { m_fValue = fTmp; m_bHasValue = true; @@ -506,7 +506,7 @@ css::uno::Reference<css::xml::sax::XFastContextHandler> SwXMLTableCellContext_Im { if( aIter.getToken() == XML_ELEMENT(TABLE, XML_IS_SUB_TABLE) ) { - if ( IsXMLToken( aIter.toString(), XML_TRUE ) ) + if ( IsXMLToken( aIter, XML_TRUE ) ) bSubTable = true; } else @@ -925,25 +925,24 @@ void SwXMLDDETableContext_Impl::startFastElement( { for( auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ) ) { - OUString aValue = aIter.toString(); switch (aIter.getToken()) { case XML_ELEMENT(OFFICE, XML_DDE_APPLICATION): - sDDEApplication = aValue; + sDDEApplication = aIter.toString(); break; case XML_ELEMENT(OFFICE, XML_DDE_TOPIC): - sDDETopic = aValue; + sDDETopic = aIter.toString(); break; case XML_ELEMENT(OFFICE, XML_DDE_ITEM): - sDDEItem = aValue; + sDDEItem = aIter.toString(); break; case XML_ELEMENT(OFFICE, XML_NAME): - sConnectionName = aValue; + sConnectionName = aIter.toString(); break; case XML_ELEMENT(OFFICE, XML_AUTOMATIC_UPDATE): { bool bTmp(false); - if (::sax::Converter::convertBool(bTmp, aValue)) + if (::sax::Converter::convertBool(bTmp, aIter.toView())) { bIsAutomaticUpdate = bTmp; } |