Kaydet (Commit) 1156f2ed authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in ScAccessiblePreviewHeaderCell

Change-Id: Id1ccd3657ffb0a5ae4762ea6ce25f8ce2c77db92
Reviewed-on: https://gerrit.libreoffice.org/56548
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 291f125e
......@@ -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 );
}
}
......
......@@ -119,7 +119,7 @@ private:
ScAddress maCellPos;
bool mbColumnHeader;
bool mbRowHeader;
mutable ScPreviewTableInfo* mpTableInfo;
mutable std::unique_ptr<ScPreviewTableInfo> mpTableInfo;
bool IsDefunc(
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