summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewTable.cxx7
-rw-r--r--sc/source/ui/inc/AccessiblePreviewTable.hxx2
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);