From 84aa4d1ff29004b0aa28068b7beb21f7ebfdb239 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Sat, 26 Jul 2014 15:56:45 -0400 Subject: 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 Tested-by: Michael Meeks --- writerfilter/source/ooxml/OOXMLFactory.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'writerfilter/source/ooxml/OOXMLFactory.cxx') 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); } -- cgit