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

loplugin:useuniqueptr in AccessibleCell

Change-Id: I8502e7695ad9d28d57d1cb5c7f01c7bacd4a69aa
Reviewed-on: https://gerrit.libreoffice.org/55517Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst ee28d75d
......@@ -83,7 +83,7 @@ void AccessibleCell::Init()
{
// non-empty text -> use full-fledged edit source right away
mpText = new AccessibleTextHelper( o3tl::make_unique<SvxTextEditSource>(mxCell->GetObject(), mxCell.get(), *pView, *pWindow) );
mpText.reset( new AccessibleTextHelper( o3tl::make_unique<SvxTextEditSource>(mxCell->GetObject(), mxCell.get(), *pView, *pWindow) ) );
if( mxCell.is() && mxCell.get()->IsActiveCell() )
mpText->SetFocus();
mpText->SetEventSource(this);
......@@ -520,8 +520,7 @@ void AccessibleCell::disposing()
if (mpText != nullptr)
{
mpText->Dispose();
delete mpText;
mpText = nullptr;
mpText.reset();
}
// Cleanup. Remove references to objects to allow them to be
......
......@@ -119,7 +119,7 @@ protected:
sal_Int32 mnIndexInParent;
/// The accessible text engine. May be NULL if it can not be created.
AccessibleTextHelper* mpText;
std::unique_ptr<AccessibleTextHelper> mpText;
sdr::table::CellRef mxCell;
......
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