summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2016-06-04 23:07:09 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-06 07:18:44 +0000
commitc9ff3efd2cc1a0bcf09b073972ecf21b244f9fd8 (patch)
treed708fb31792c34545958c88d586ead6f4d086f14 /unotools
parent52af06b471ed3e4627be3950330ad311b71c275b (diff)
tdf#89329: use unique_ptr for pImpl in accessiblestatesethelper
Change-Id: I768bfd5a19a2633e6d6cd37f919c20cbfc76824e Reviewed-on: https://gerrit.libreoffice.org/25905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/accessibility/accessiblestatesethelper.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/unotools/source/accessibility/accessiblestatesethelper.cxx b/unotools/source/accessibility/accessiblestatesethelper.cxx
index 1608b9743da5..aa9e8a756adf 100644
--- a/unotools/source/accessibility/accessiblestatesethelper.cxx
+++ b/unotools/source/accessibility/accessiblestatesethelper.cxx
@@ -126,31 +126,27 @@ inline void AccessibleStateSetHelperImpl::RemoveState(sal_Int16 aState)
//===== internal ============================================================
AccessibleStateSetHelper::AccessibleStateSetHelper ()
- : mpHelperImpl(nullptr)
+ : mpHelperImpl(new AccessibleStateSetHelperImpl)
{
- mpHelperImpl = new AccessibleStateSetHelperImpl();
}
AccessibleStateSetHelper::AccessibleStateSetHelper ( const sal_Int64 _nInitialStates )
- : mpHelperImpl(nullptr)
+ : mpHelperImpl(new AccessibleStateSetHelperImpl)
{
- mpHelperImpl = new AccessibleStateSetHelperImpl();
mpHelperImpl->AddStates( _nInitialStates );
}
AccessibleStateSetHelper::AccessibleStateSetHelper (const AccessibleStateSetHelper& rHelper)
: cppu::WeakImplHelper1<XAccessibleStateSet>()
- , mpHelperImpl(nullptr)
{
if (rHelper.mpHelperImpl)
- mpHelperImpl = new AccessibleStateSetHelperImpl(*rHelper.mpHelperImpl);
+ mpHelperImpl.reset(new AccessibleStateSetHelperImpl(*rHelper.mpHelperImpl));
else
- mpHelperImpl = new AccessibleStateSetHelperImpl();
+ mpHelperImpl.reset(new AccessibleStateSetHelperImpl());
}
AccessibleStateSetHelper::~AccessibleStateSetHelper()
{
- delete mpHelperImpl;
}
//===== XAccessibleStateSet ==============================================