diff options
author | Jeffrey Stedfast <jeff@xamarin.com> | 2014-07-26 15:56:45 -0400 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2014-07-26 20:11:19 +0000 |
commit | 84aa4d1ff29004b0aa28068b7beb21f7ebfdb239 (patch) | |
tree | bd51fd73ed13ea3e455baf18d11c309a8eff4e06 /writerfilter/source/ooxml/OOXMLFactory.cxx | |
parent | b3d434a9701daab054981c891c645eefe1685b51 (diff) |
fdo#80908 - avoid lots of alloc/free of common integer values.
Change-Id: Ie170d44af062ec8c8b412b7de271e96a106971aa
Reviewed-on: https://gerrit.libreoffice.org/10559
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'writerfilter/source/ooxml/OOXMLFactory.cxx')
-rw-r--r-- | writerfilter/source/ooxml/OOXMLFactory.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx b/writerfilter/source/ooxml/OOXMLFactory.cxx index 7546096a588b..2e739300b538 100644 --- a/writerfilter/source/ooxml/OOXMLFactory.cxx +++ b/writerfilter/source/ooxml/OOXMLFactory.cxx @@ -166,7 +166,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler, { sal_Int32 nValue; pAttribs->getAsInteger(nToken,nValue); - OOXMLValue::Pointer_t xValue(new OOXMLIntegerValue(nValue)); + OOXMLValue::Pointer_t xValue = OOXMLIntegerValue::Create(nValue); pHandler->newProperty(nId, xValue); pFactory->attributeAction(pHandler, nToken, xValue); } @@ -198,7 +198,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler, { OUString aValue(Attribs->getValue(nToken)); sal_uInt32 nValue = (*pListValueMap)[aValue]; - OOXMLValue::Pointer_t xValue(new OOXMLIntegerValue(nValue)); + OOXMLValue::Pointer_t xValue = OOXMLIntegerValue::Create(nValue); pHandler->newProperty(nId, xValue); pFactory->attributeAction(pHandler, nToken, xValue); } |