summaryrefslogtreecommitdiff
path: root/xmloff/source/style
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-02-28 14:24:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-02-28 19:09:01 +0000
commitd01769af5f79988ae4263586b623df501b37ed26 (patch)
tree9cd4d6910c67a052d187f3f53ab810b0bbd8b687 /xmloff/source/style
parent68f33bcc41cd3895e91578e9e2990a919748cc2b (diff)
no need to allocate tabstops vector separately
an empty vector is only 2 words big Change-Id: Ib8309d0819c88fe6a4f7cd322c37dd52190bd060 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147971 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/style')
-rw-r--r--xmloff/source/style/xmltabi.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/xmloff/source/style/xmltabi.cxx b/xmloff/source/style/xmltabi.cxx
index 601c3f5fd191..e6d33b114936 100644
--- a/xmloff/source/style/xmltabi.cxx
+++ b/xmloff/source/style/xmltabi.cxx
@@ -136,10 +136,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SvxXMLTabStopImportCon
new SvxXMLTabStopContext_Impl( GetImport(), nElement, xAttrList )};
// add new tabstop to array of tabstops
- if( !mpTabStops )
- mpTabStops = std::make_unique<SvxXMLTabStopArray_Impl>();
-
- mpTabStops->push_back( xTabStopContext );
+ maTabStops.push_back( xTabStopContext );
return xTabStopContext;
}
@@ -151,17 +148,17 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SvxXMLTabStopImportCon
void SvxXMLTabStopImportContext::endFastElement(sal_Int32 nElement)
{
- sal_uInt16 nCount = mpTabStops ? mpTabStops->size() : 0;
+ sal_uInt16 nCount = maTabStops.size();
uno::Sequence< style::TabStop> aSeq( nCount );
- if( mpTabStops )
+ if( nCount )
{
sal_uInt16 nNewCount = 0;
style::TabStop* pTabStops = aSeq.getArray();
for( sal_uInt16 i=0; i < nCount; i++ )
{
- SvxXMLTabStopContext_Impl *pTabStopContext = (*mpTabStops)[i].get();
+ SvxXMLTabStopContext_Impl *pTabStopContext = maTabStops[i].get();
const style::TabStop& rTabStop = pTabStopContext->getTabStop();
bool bDflt = style::TabAlign_DEFAULT == rTabStop.Alignment;
if( !bDflt || 0==i )