diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-27 10:22:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-28 08:27:25 +0200 |
commit | 1156f2ed90ddea4036f08155a83248cc4eab7f27 (patch) | |
tree | aae6b3c3060f89b26045c26e920fdb779556e175 /sc/source/ui/Accessibility | |
parent | 291f125e84e9a375442191e22325acbf88ed88dc (diff) |
loplugin:useuniqueptr in ScAccessiblePreviewHeaderCell
Change-Id: Id1ccd3657ffb0a5ae4762ea6ce25f8ce2c77db92
Reviewed-on: https://gerrit.libreoffice.org/56548
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/Accessibility')
-rw-r--r-- | sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx index b909933d2f39..e1a8d942edff 100644 --- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx +++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx @@ -87,8 +87,7 @@ void SAL_CALL ScAccessiblePreviewHeaderCell::disposing() mpViewShell = nullptr; } - if (mpTableInfo) - DELETEZ (mpTableInfo); + mpTableInfo.reset(); ScAccessibleContextBase::disposing(); } @@ -107,7 +106,7 @@ void ScAccessiblePreviewHeaderCell::Notify( SfxBroadcaster& rBC, const SfxHint& { // column / row layout may change with any document change, // so it must be invalidated - DELETEZ( mpTableInfo ); + mpTableInfo.reset(); } ScAccessibleContextBase::Notify(rBC, rHint); @@ -404,7 +403,7 @@ void ScAccessiblePreviewHeaderCell::FillTableInfo() const aOutputSize = pWindow->GetOutputSizePixel(); tools::Rectangle aVisRect( Point(), aOutputSize ); - mpTableInfo = new ScPreviewTableInfo; + mpTableInfo.reset( new ScPreviewTableInfo ); mpViewShell->GetLocationData().GetTableInfo( aVisRect, *mpTableInfo ); } } |