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>
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user