diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-27 10:18:30 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-28 08:27:11 +0200 |
commit | 291f125e84e9a375442191e22325acbf88ed88dc (patch) | |
tree | ff4e52dd1a5ebb4e5566a927e4abef7fd8d04366 /sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx | |
parent | 681b3facd3ddb7ab4577c48e232fb29a269d0d40 (diff) |
loplugin:useuniqueptr in ScAccessiblePageHeaderArea
Change-Id: Ic32996b3aaf415109c1fdc336db138ec12159ce2
Reviewed-on: https://gerrit.libreoffice.org/56545
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx')
-rw-r--r-- | sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx index 69538abbf141..c1e3c919ea29 100644 --- a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx +++ b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx @@ -80,11 +80,8 @@ void SAL_CALL ScAccessiblePageHeaderArea::disposing() mpViewShell->RemoveAccessibilityObject(*this); mpViewShell = nullptr; } - if (mpTextHelper) - DELETEZ(mpTextHelper); - if (mpEditObj) - DELETEZ(mpEditObj); - + mpTextHelper.reset(); + mpEditObj.reset(); ScAccessibleContextBase::disposing(); } @@ -281,10 +278,10 @@ void ScAccessiblePageHeaderArea::CreateTextHelper() { if (!mpTextHelper) { - mpTextHelper = new ::accessibility::AccessibleTextHelper( + mpTextHelper.reset( new ::accessibility::AccessibleTextHelper( o3tl::make_unique<ScAccessibilityEditSource>( o3tl::make_unique<ScAccessibleHeaderTextData>( - mpViewShell, mpEditObj, mbHeader, meAdjust))); + mpViewShell, mpEditObj.get(), mbHeader, meAdjust))) ); mpTextHelper->SetEventSource(this); } } |