Fix leak in ElementsDockingWindow (starmath)

Change-Id: I56dee98c5de60227da4ea04c4d899ce86debf42e
Reviewed-on: https://gerrit.libreoffice.org/43219
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
Julien Nabet
2017-10-07 09:41:11 +02:00
parent 65a82fd7c0
commit 053b7367ea

View File

@@ -768,9 +768,10 @@ IMPL_LINK(SmElementsDockingWindow, SelectClickHandler, SmElement&, rElement, voi
if (pViewSh)
{
std::unique_ptr<SfxStringItem> pInsertCommand = o3tl::make_unique<SfxStringItem>(SID_INSERTCOMMANDTEXT, rElement.getText());
pViewSh->GetViewFrame()->GetDispatcher()->ExecuteList(
SID_INSERTCOMMANDTEXT, SfxCallMode::RECORD,
{ new SfxStringItem(SID_INSERTCOMMANDTEXT, rElement.getText()) });
{ pInsertCommand.get() });
}
}