diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-20 09:53:56 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-21 08:35:43 +0200 |
commit | b1da360e9230f5a1d1d5e03bd8f83f65e7e14edc (patch) | |
tree | 8b4662f524eb20fcdde8615f57f3e01aa0bd19b0 /xmloff | |
parent | 06765e45cbf83a865cabb3ce6c418f497e87e099 (diff) |
loplugin:useuniqueptr in XMLTextFieldExport
Change-Id: Ib525cc596429f61740f567445296dcf71c19acf2
Reviewed-on: https://gerrit.libreoffice.org/59350
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/inc/txtflde.hxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/txtflde.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 3 |
3 files changed, 5 insertions, 4 deletions
diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx index 909da05499ca..16f6c799ed06 100644 --- a/xmloff/inc/txtflde.hxx +++ b/xmloff/inc/txtflde.hxx @@ -161,7 +161,7 @@ public: XMLTextFieldExport( SvXMLExport& rExp, /// XMLPropertyState for the combined characters field - XMLPropertyState* pCombinedCharState ); + std::unique_ptr<XMLPropertyState> pCombinedCharState ); ~XMLTextFieldExport(); /// Export this field and the surrounding span element with the formatting. diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index f65f26943a62..55a4368eadc1 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -273,7 +273,7 @@ inline Sequence<OUString> const GetStringSequenceProperty( XMLTextFieldExport::XMLTextFieldExport( SvXMLExport& rExp, - XMLPropertyState* pCombinedCharState) + std::unique_ptr<XMLPropertyState> pCombinedCharState) : rExport(rExp), sServicePrefix("com.sun.star.text.textfield."), sFieldMasterPrefix("com.sun.star.text.FieldMaster."), @@ -346,7 +346,7 @@ XMLTextFieldExport::XMLTextFieldExport( SvXMLExport& rExp, sPropertyHelp("Help"), sPropertyTooltip("Tooltip"), sPropertyTextRange("TextRange"), - pCombinedCharactersPropertyState(pCombinedCharState) + pCombinedCharactersPropertyState(std::move(pCombinedCharState)) { SetExportOnlyUsedFieldDeclarations(); } diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 1f06a8eec257..93d5fe16424c 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -20,6 +20,7 @@ #include <sal/config.h> #include <o3tl/any.hxx> +#include <o3tl/make_unique.hxx> #include <xmloff/unointerfacetouniqueidentifiermapper.hxx> #include <tools/debug.hxx> #include <rtl/ustrbuf.hxx> @@ -1312,7 +1313,7 @@ XMLTextParagraphExport::XMLTextParagraphExport( sal_Int32 nIndex = xTextPropMapper->getPropertySetMapper()->FindEntryIndex( "", XML_NAMESPACE_STYLE, GetXMLToken(XML_TEXT_COMBINE)); - pFieldExport.reset( new XMLTextFieldExport( rExp, new XMLPropertyState( nIndex, uno::makeAny(true) ) ) ); + pFieldExport.reset( new XMLTextFieldExport( rExp, o3tl::make_unique<XMLPropertyState>( nIndex, uno::makeAny(true) ) ) ); PushNewTextListsHelper(); } |