loplugin:useuniqueptr in ScAccessibleNoteTextData

Change-Id: I38101b3046c4354f48b6c9d34a016351659e9795
Reviewed-on: https://gerrit.libreoffice.org/56551
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2018-06-27 10:30:17 +02:00
parent 00505cad5e
commit e528b7fd3a
2 changed files with 5 additions and 5 deletions

View File

@@ -1439,7 +1439,7 @@ ScAccessibleNoteTextData::~ScAccessibleNoteTextData()
if (mpEditEngine)
mpEditEngine->SetNotifyHdl(Link<EENotify&,void>());
mpEditEngine.reset();
delete mpForwarder;
mpForwarder.reset();
}
ScAccessibleTextData* ScAccessibleNoteTextData::Clone() const
@@ -1478,11 +1478,11 @@ SvxTextForwarder* ScAccessibleNoteTextData::GetTextForwarder()
mpEditEngine->SetRefDevice(mpDocSh->GetRefDevice());
else
mpEditEngine->SetRefMapMode(MapMode(MapUnit::Map100thMM));
mpForwarder = new SvxEditEngineForwarder(*mpEditEngine);
mpForwarder.reset( new SvxEditEngineForwarder(*mpEditEngine) );
}
if (mbDataValid)
return mpForwarder;
return mpForwarder.get();
if (!msText.isEmpty())
{
@@ -1506,7 +1506,7 @@ SvxTextForwarder* ScAccessibleNoteTextData::GetTextForwarder()
mpEditEngine->SetNotifyHdl( LINK(this, ScAccessibleNoteTextData, NotifyHdl) );
return mpForwarder;
return mpForwarder.get();
}
SvxViewForwarder* ScAccessibleNoteTextData::GetViewForwarder()

View File

@@ -245,7 +245,7 @@ private:
ScPreviewViewForwarder* mpViewForwarder;
ScPreviewShell* mpViewShell;
std::unique_ptr<ScEditEngineDefaulter> mpEditEngine;
SvxEditEngineForwarder* mpForwarder;
std::unique_ptr<SvxEditEngineForwarder> mpForwarder;
ScDocShell* mpDocSh;
OUString msText;
ScAddress maCellPos;