summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-14 14:36:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-17 07:23:22 +0200
commitdb3860062ebf4109f48139c2556ff4041aff5d6e (patch)
treeb6ab4df909c8922e48a9c4eefa9a8f0f6a47c41f /xmloff
parent846f557fd591626931a9dadb38180786e090104c (diff)
extend loplugin useuniqueptr to OUString pointers
Change-Id: Ieb5bab3895e1edaff497c4a1a88303ccac097edc Reviewed-on: https://gerrit.libreoffice.org/39948 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/inc/MultiPropertySetHelper.hxx2
-rw-r--r--xmloff/source/style/MultiPropertySetHelper.cxx4
2 files changed, 2 insertions, 4 deletions
diff --git a/xmloff/inc/MultiPropertySetHelper.hxx b/xmloff/inc/MultiPropertySetHelper.hxx
index 7218c89a9617..8b77b8d0623e 100644
--- a/xmloff/inc/MultiPropertySetHelper.hxx
+++ b/xmloff/inc/MultiPropertySetHelper.hxx
@@ -55,7 +55,7 @@ namespace com { namespace sun { namespace star {
class MultiPropertySetHelper
{
/// names of all properties
- OUString* pPropertyNames;
+ std::unique_ptr<OUString[]> pPropertyNames;
/// length of pPropertyNames array
sal_Int16 nLength;
diff --git a/xmloff/source/style/MultiPropertySetHelper.cxx b/xmloff/source/style/MultiPropertySetHelper.cxx
index 498491199c8a..0fe5099192bb 100644
--- a/xmloff/source/style/MultiPropertySetHelper.cxx
+++ b/xmloff/source/style/MultiPropertySetHelper.cxx
@@ -46,7 +46,7 @@ MultiPropertySetHelper::MultiPropertySetHelper(
nLength++;
// allocate array and create strings
- pPropertyNames = new OUString[nLength];
+ pPropertyNames.reset( new OUString[nLength] );
for( sal_Int16 i = 0; i < nLength; i++ )
pPropertyNames[i] = OUString::createFromAscii( pNames[i] );
}
@@ -55,8 +55,6 @@ MultiPropertySetHelper::MultiPropertySetHelper(
MultiPropertySetHelper::~MultiPropertySetHelper()
{
pValues = nullptr; // memory 'owned' by aValues
-
- delete[] pPropertyNames;
}