summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-31 08:06:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-31 08:26:34 +0100
commitf3916075d7c454abfe93e8b487b2f518f80d526c (patch)
tree73a127f39a6d0291969795272c3eefa8215ff96e /sc/source
parent01a8d79fd76f7e523169c56a22be8ff84d8cd76a (diff)
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.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/filter/xml/xmlconti.cxx12
-rw-r--r--sc/source/filter/xml/xmlconti.hxx3
2 files changed, 3 insertions, 12 deletions
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