Kaydet (Commit) 1113f93d authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in ScAccessiblePreviewTable

Change-Id: I75b37dab51f3510f6e7155c191a85af99b0d350f
Reviewed-on: https://gerrit.libreoffice.org/56547
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst f4dafe05
...@@ -76,8 +76,7 @@ void SAL_CALL ScAccessiblePreviewTable::disposing() ...@@ -76,8 +76,7 @@ void SAL_CALL ScAccessiblePreviewTable::disposing()
mpViewShell = nullptr; mpViewShell = nullptr;
} }
if (mpTableInfo) mpTableInfo.reset();
DELETEZ (mpTableInfo);
ScAccessibleContextBase::disposing(); ScAccessibleContextBase::disposing();
} }
...@@ -91,7 +90,7 @@ void ScAccessiblePreviewTable::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ...@@ -91,7 +90,7 @@ void ScAccessiblePreviewTable::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
{ {
// column / row layout may change with any document change, // column / row layout may change with any document change,
// so it must be invalidated // so it must be invalidated
DELETEZ( mpTableInfo ); mpTableInfo.reset();
} }
else if (nId == SfxHintId::ScAccVisAreaChanged) else if (nId == SfxHintId::ScAccVisAreaChanged)
{ {
...@@ -637,7 +636,7 @@ void ScAccessiblePreviewTable::FillTableInfo() const ...@@ -637,7 +636,7 @@ void ScAccessiblePreviewTable::FillTableInfo() const
aOutputSize = pWindow->GetOutputSizePixel(); aOutputSize = pWindow->GetOutputSizePixel();
tools::Rectangle aVisRect( Point(), aOutputSize ); tools::Rectangle aVisRect( Point(), aOutputSize );
mpTableInfo = new ScPreviewTableInfo; mpTableInfo.reset( new ScPreviewTableInfo );
mpViewShell->GetLocationData().GetTableInfo( aVisRect, *mpTableInfo ); mpViewShell->GetLocationData().GetTableInfo( aVisRect, *mpTableInfo );
} }
} }
......
...@@ -124,7 +124,7 @@ protected: ...@@ -124,7 +124,7 @@ protected:
private: private:
ScPreviewShell* mpViewShell; ScPreviewShell* mpViewShell;
sal_Int32 mnIndex; sal_Int32 mnIndex;
mutable ScPreviewTableInfo* mpTableInfo; mutable std::unique_ptr<ScPreviewTableInfo> mpTableInfo;
bool IsDefunc( bool IsDefunc(
const css::uno::Reference<css::accessibility::XAccessibleStateSet>& rxParentStates); const css::uno::Reference<css::accessibility::XAccessibleStateSet>& rxParentStates);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment