diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-27 11:30:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-28 08:33:00 +0200 |
commit | f35ddce379cd6988af0b33abdff7ff343bd94049 (patch) | |
tree | 57a67a0bd61e7e5180b22e2603a292eaa9bb6e6e /sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx | |
parent | b1b490ee356cf542e47065eb6795ed0b5e2f531b (diff) |
loplugin:useuniqueptr in ScAccessibleDocumentPagePreview
Change-Id: I0b90d59e627691c6c187f34591992301102afcfe
Reviewed-on: https://gerrit.libreoffice.org/56556
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx')
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx index 96c0d8baed44..2c40ae3a7e06 100644 --- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx @@ -1189,11 +1189,9 @@ void SAL_CALL ScAccessibleDocumentPagePreview::disposing() // no need to Dispose the AccessibleTextHelper, // as long as mpNotesChildren are destructed here - if (mpNotesChildren) - DELETEZ(mpNotesChildren); + mpNotesChildren.reset(); - if (mpShapeChildren) - DELETEZ(mpShapeChildren); + mpShapeChildren.reset(); ScAccessibleDocumentBase::disposing(); } @@ -1541,7 +1539,7 @@ ScNotesChildren* ScAccessibleDocumentPagePreview::GetNotesChildren() { if (!mpNotesChildren && mpViewShell) { - mpNotesChildren = new ScNotesChildren(mpViewShell, this); + mpNotesChildren.reset( new ScNotesChildren(mpViewShell, this) ); const ScPreviewLocationData& rData = mpViewShell->GetLocationData(); ScPagePreviewCountData aCount( rData, mpViewShell->GetWindow(), GetNotesChildren(), GetShapeChildren() ); @@ -1549,18 +1547,18 @@ ScNotesChildren* ScAccessibleDocumentPagePreview::GetNotesChildren() //! order is background shapes, header, table or notes, footer, foreground shapes, controls mpNotesChildren->Init(aCount.aVisRect, aCount.nBackShapes + aCount.nHeaders); } - return mpNotesChildren; + return mpNotesChildren.get(); } ScShapeChildren* ScAccessibleDocumentPagePreview::GetShapeChildren() { if (!mpShapeChildren && mpViewShell) { - mpShapeChildren = new ScShapeChildren(mpViewShell, this); + mpShapeChildren.reset( new ScShapeChildren(mpViewShell, this) ); mpShapeChildren->Init(); } - return mpShapeChildren; + return mpShapeChildren.get(); } OUString ScAccessibleDocumentPagePreview::getAccessibleName() |