diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-17 17:23:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-26 08:10:15 +0100 |
commit | 674b67ab7d92097089000fcd70c7abd84e180220 (patch) | |
tree | 9d1a0c39869e065f609e0b32aa93d93037f34d81 /xmloff | |
parent | 1a0b01f2238e30a58a2bb4a4054b7726887fe15d (diff) |
loplugin:useuniqueptr in XMLTextParagraphExport
Change-Id: I20a45d5d3914c75b01b55339169d495b294fe7fd
Reviewed-on: https://gerrit.libreoffice.org/48514
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 4a94221a9460..656c33a6cbb2 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -992,7 +992,7 @@ void XMLTextParagraphExport::exportListChange( GetExport().StartElement(aElem, false); if(!pListElements) - pListElements = new std::vector<OUString>; + pListElements.reset( new std::vector<OUString> ); pListElements->push_back(aElem); mpTextListsHelper->PushListOnStack( sListId, @@ -1298,12 +1298,12 @@ XMLTextParagraphExport::XMLTextParagraphExport( xFramePropMapper = new XMLTextExportPropertySetMapper( xPropMapper, GetExport() ); - pSectionExport = new XMLSectionExport( rExp, *this ); - pIndexMarkExport = new XMLIndexMarkExport( rExp ); + pSectionExport.reset( new XMLSectionExport( rExp, *this ) ); + pIndexMarkExport.reset( new XMLIndexMarkExport( rExp ) ); if( ! IsBlockMode() && Reference<XRedlinesSupplier>( GetExport().GetModel(), UNO_QUERY ).is()) - pRedlineExport = new XMLRedlineExport( rExp ); + pRedlineExport.reset( new XMLRedlineExport( rExp ) ); // The text field helper needs a pre-constructed XMLPropertyState // to export the combined characters field. We construct that @@ -1313,17 +1313,17 @@ XMLTextParagraphExport::XMLTextParagraphExport( sal_Int32 nIndex = xTextPropMapper->getPropertySetMapper()->FindEntryIndex( "", XML_NAMESPACE_STYLE, GetXMLToken(XML_TEXT_COMBINE)); - pFieldExport = new XMLTextFieldExport( rExp, new XMLPropertyState( nIndex, uno::makeAny(true) ) ); + pFieldExport.reset( new XMLTextFieldExport( rExp, new XMLPropertyState( nIndex, uno::makeAny(true) ) ) ); PushNewTextListsHelper(); } XMLTextParagraphExport::~XMLTextParagraphExport() { - delete pRedlineExport; - delete pIndexMarkExport; - delete pSectionExport; - delete pFieldExport; - delete pListElements; + pRedlineExport.reset(); + pIndexMarkExport.reset(); + pSectionExport.reset(); + pFieldExport.reset(); + pListElements.reset(); #ifdef DBG_UTIL txtparae_bContainsIllegalCharacters = false; #endif |