diff options
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/inc/xmltabi.hxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/xmltabi.cxx | 11 |
2 files changed, 5 insertions, 10 deletions
diff --git a/xmloff/inc/xmltabi.hxx b/xmloff/inc/xmltabi.hxx index 81cc60e3d76a..c2e66f1a050d 100644 --- a/xmloff/inc/xmltabi.hxx +++ b/xmloff/inc/xmltabi.hxx @@ -26,12 +26,10 @@ class SvXMLImport; class SvxXMLTabStopContext_Impl; -typedef std::vector<rtl::Reference<SvxXMLTabStopContext_Impl>> SvxXMLTabStopArray_Impl; - class SvxXMLTabStopImportContext final : public XMLElementPropertyContext { private: - std::unique_ptr<SvxXMLTabStopArray_Impl> mpTabStops; + std::vector<rtl::Reference<SvxXMLTabStopContext_Impl>> maTabStops; public: SvxXMLTabStopImportContext(SvXMLImport& rImport, sal_Int32 nElement, 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 ) |