sc/source/filter/xml/xmlconti.cxx | 12 +++--------- sc/source/filter/xml/xmlconti.hxx | 3 --- 2 files changed, 3 insertions(+), 12 deletions(-)
New commits: commit f3916075d7c454abfe93e8b487b2f518f80d526c Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Oct 31 08:06:46 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Oct 31 08:26:34 2019 +0100 tdf#125688 remove intermediate OUStringBuffer in ScXMLContentContext, shaves 5% off load time Change-Id: I5dee5be8e1c005dd4c34f6bc4aa12532199e47b7 Reviewed-on: https://gerrit.libreoffice.org/81817 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sc/source/filter/xml/xmlconti.cxx b/sc/source/filter/xml/xmlconti.cxx index 884b8b79a4f4..cbb451ecf599 100644 --- a/sc/source/filter/xml/xmlconti.cxx +++ b/sc/source/filter/xml/xmlconti.cxx @@ -31,7 +31,6 @@ ScXMLContentContext::ScXMLContentContext( ScXMLImport& rImport, const OUString& rLName, OUStringBuffer& sTempValue) : ScXMLImportContext( rImport, nPrfx, rLName ), - sOUText(), sValue(sTempValue) { } @@ -60,9 +59,9 @@ SvXMLImportContextRef ScXMLContentContext::CreateChildContext( sal_uInt16 nPrefi } if (nRepeat) for (sal_Int32 j = 0; j < nRepeat; ++j) - sOUText.append(' '); + sValue.append(' '); else - sOUText.append(' '); + sValue.append(' '); } return new SvXMLImportContext( GetImport(), nPrefix, rLName ); @@ -70,12 +69,7 @@ SvXMLImportContextRef ScXMLContentContext::CreateChildContext( sal_uInt16 nPrefi void ScXMLContentContext::Characters( const OUString& rChars ) { - sOUText.append(rChars); -} - -void ScXMLContentContext::EndElement() -{ - sValue.append(sOUText.toString()); + sValue.append(rChars); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/filter/xml/xmlconti.hxx b/sc/source/filter/xml/xmlconti.hxx index f7d07d10e2da..ee862c173ead 100644 --- a/sc/source/filter/xml/xmlconti.hxx +++ b/sc/source/filter/xml/xmlconti.hxx @@ -24,7 +24,6 @@ class ScXMLContentContext : public ScXMLImportContext { - OUStringBuffer sOUText; OUStringBuffer& sValue; public: @@ -40,8 +39,6 @@ public: const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList ) override; virtual void Characters( const OUString& rChars ) override; - - virtual void EndElement() override; }; #endif _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits