From 25e92d7f7c915e26febd8c868a6531d99aac30cd Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 10 Apr 2017 10:15:59 +0200 Subject: loplugin:inlinefields in XMLTextParagraphExport Change-Id: If0e80fbe21b6d8bed55357d7fc09027fc4a37e06 Reviewed-on: https://gerrit.libreoffice.org/36373 Tested-by: Jenkins Reviewed-by: Noel Grandin --- include/xmloff/txtparae.hxx | 5 +++-- xmloff/source/text/txtparae.cxx | 11 +++++------ xmloff/source/text/txtstyle.cxx | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx index 070c392cc7bc..9f737e665b1b 100644 --- a/include/xmloff/txtparae.hxx +++ b/include/xmloff/txtparae.hxx @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -86,7 +87,7 @@ class XMLOFF_DLLPUBLIC XMLTextParagraphExport : public XMLStyleExport const ::std::unique_ptr< ::xmloff::BoundFrameSets > pBoundFrameSets; XMLTextFieldExport *pFieldExport; std::vector *pListElements; - XMLTextListAutoStylePool *pListAutoPool; + XMLTextListAutoStylePool maListAutoPool; XMLSectionExport *pSectionExport; XMLIndexMarkExport *pIndexMarkExport; @@ -587,7 +588,7 @@ private: inline const XMLTextListAutoStylePool& XMLTextParagraphExport::GetListAutoStylePool() const { - return *pListAutoPool; + return maListAutoPool; } inline void XMLTextParagraphExport::exportTextFrame( diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 62491265a464..c64d8662794a 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -531,7 +531,7 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily, } } if( bAdd ) - pListAutoPool->Add( xNumRule ); + maListAutoPool.Add( xNumRule ); } } break; @@ -637,7 +637,7 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily, } } if( bAdd ) - pListAutoPool->Add( xNumRule ); + maListAutoPool.Add( xNumRule ); } } @@ -1161,7 +1161,7 @@ XMLTextParagraphExport::XMLTextParagraphExport( pBoundFrameSets(new BoundFrameSets(GetExport().GetModel())), pFieldExport( nullptr ), pListElements( nullptr ), - pListAutoPool( new XMLTextListAutoStylePool( this->GetExport() ) ), + maListAutoPool( this->GetExport() ), pSectionExport( nullptr ), pIndexMarkExport( nullptr ), pRedlineExport( nullptr ), @@ -1320,7 +1320,6 @@ XMLTextParagraphExport::~XMLTextParagraphExport() delete pSectionExport; delete pFieldExport; delete pListElements; - delete pListAutoPool; #ifdef DBG_UTIL txtparae_bContainsIllegalCharacters = false; #endif @@ -1624,7 +1623,7 @@ bool XMLTextParagraphExport::collectTextAutoStylesOptimized( bool bIsProgress ) } } if( bAdd ) - pListAutoPool->Add( xNumRule ); + maListAutoPool.Add( xNumRule ); } } } @@ -3617,7 +3616,7 @@ void XMLTextParagraphExport::exportTextAutoStyles() GetExport().GetMM100UnitConverter(), GetExport().GetNamespaceMap() ); - pListAutoPool->exportXML(); + maListAutoPool.exportXML(); } void XMLTextParagraphExport::exportRuby( diff --git a/xmloff/source/text/txtstyle.cxx b/xmloff/source/text/txtstyle.cxx index c26c09b90266..0832876e57e8 100644 --- a/xmloff/source/text/txtstyle.cxx +++ b/xmloff/source/text/txtstyle.cxx @@ -105,7 +105,7 @@ void XMLTextParagraphExport::exportStyleAttributes( void XMLTextParagraphExport::exportNumStyles( bool bUsed ) { SvxXMLNumRuleExport aNumRuleExport( GetExport() ); - aNumRuleExport.exportStyles( bUsed, pListAutoPool, !IsBlockMode() ); + aNumRuleExport.exportStyles( bUsed, &maListAutoPool, !IsBlockMode() ); } void XMLTextParagraphExport::exportTextStyles( bool bUsed, bool bProg ) -- cgit