loplugin:useuniqueptr in ScAccessibleDocument
Change-Id: I199b5f3bd0d8555dc01d6f51208ebe4526a32f9a Reviewed-on: https://gerrit.libreoffice.org/56559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -1417,7 +1417,7 @@ void ScAccessibleDocument::PreInit()
|
||||
void ScAccessibleDocument::Init()
|
||||
{
|
||||
if(!mpChildrenShapes)
|
||||
mpChildrenShapes = new ScChildrenShapes(this, mpViewShell, meSplitPos);
|
||||
mpChildrenShapes.reset( new ScChildrenShapes(this, mpViewShell, meSplitPos) );
|
||||
}
|
||||
|
||||
ScAccessibleDocument::~ScAccessibleDocument()
|
||||
@@ -1443,8 +1443,7 @@ void SAL_CALL ScAccessibleDocument::disposing()
|
||||
mpViewShell->RemoveAccessibilityObject(*this);
|
||||
mpViewShell = nullptr;
|
||||
}
|
||||
if (mpChildrenShapes)
|
||||
DELETEZ(mpChildrenShapes);
|
||||
mpChildrenShapes.reset();
|
||||
|
||||
ScAccessibleDocumentBase::disposing();
|
||||
}
|
||||
@@ -1539,9 +1538,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
|
||||
|
||||
// Shapes / form controls after reload not accessible, rebuild the
|
||||
// mpChildrenShapes variable.
|
||||
if (mpChildrenShapes)
|
||||
DELETEZ(mpChildrenShapes);
|
||||
mpChildrenShapes = new ScChildrenShapes( this, mpViewShell, meSplitPos );
|
||||
mpChildrenShapes.reset( new ScChildrenShapes( this, mpViewShell, meSplitPos ) );
|
||||
|
||||
AccessibleEventObject aEvent;
|
||||
aEvent.EventId = AccessibleEventId::INVALIDATE_ALL_CHILDREN;
|
||||
|
@@ -229,7 +229,7 @@ private:
|
||||
ScTabViewShell* mpViewShell;
|
||||
ScSplitPos meSplitPos;
|
||||
rtl::Reference<ScAccessibleSpreadsheet> mpAccessibleSpreadsheet;
|
||||
ScChildrenShapes* mpChildrenShapes;
|
||||
std::unique_ptr<ScChildrenShapes> mpChildrenShapes;
|
||||
ScAccessibleEditObject* mpTempAccEdit;
|
||||
css::uno::Reference<css::accessibility::XAccessible> mxTempAcc;
|
||||
tools::Rectangle maVisArea;
|
||||
|
Reference in New Issue
Block a user