diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-27 10:21:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-28 09:51:17 +0200 |
commit | 1113f93db393fab7d38fd1e98ee52fa8f564e545 (patch) | |
tree | de31a996508963dd63442bc5f42ed11a449658ba /sc/source/ui | |
parent | f4dafe050abe42a36ed56576c23539eb808db5ba (diff) |
loplugin:useuniqueptr in ScAccessiblePreviewTable
Change-Id: I75b37dab51f3510f6e7155c191a85af99b0d350f
Reviewed-on: https://gerrit.libreoffice.org/56547
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/Accessibility/AccessiblePreviewTable.cxx | 7 | ||||
-rw-r--r-- | sc/source/ui/inc/AccessiblePreviewTable.hxx | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx index 5431a1bc0a3a..2d211c748dfb 100644 --- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx +++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx @@ -76,8 +76,7 @@ void SAL_CALL ScAccessiblePreviewTable::disposing() mpViewShell = nullptr; } - if (mpTableInfo) - DELETEZ (mpTableInfo); + mpTableInfo.reset(); ScAccessibleContextBase::disposing(); } @@ -91,7 +90,7 @@ void ScAccessiblePreviewTable::Notify( SfxBroadcaster& rBC, const SfxHint& rHint { // column / row layout may change with any document change, // so it must be invalidated - DELETEZ( mpTableInfo ); + mpTableInfo.reset(); } else if (nId == SfxHintId::ScAccVisAreaChanged) { @@ -637,7 +636,7 @@ void ScAccessiblePreviewTable::FillTableInfo() const aOutputSize = pWindow->GetOutputSizePixel(); tools::Rectangle aVisRect( Point(), aOutputSize ); - mpTableInfo = new ScPreviewTableInfo; + mpTableInfo.reset( new ScPreviewTableInfo ); mpViewShell->GetLocationData().GetTableInfo( aVisRect, *mpTableInfo ); } } diff --git a/sc/source/ui/inc/AccessiblePreviewTable.hxx b/sc/source/ui/inc/AccessiblePreviewTable.hxx index fc73b744e4c0..54d7b92f8190 100644 --- a/sc/source/ui/inc/AccessiblePreviewTable.hxx +++ b/sc/source/ui/inc/AccessiblePreviewTable.hxx @@ -124,7 +124,7 @@ protected: private: ScPreviewShell* mpViewShell; sal_Int32 mnIndex; - mutable ScPreviewTableInfo* mpTableInfo; + mutable std::unique_ptr<ScPreviewTableInfo> mpTableInfo; bool IsDefunc( const css::uno::Reference<css::accessibility::XAccessibleStateSet>& rxParentStates); |