diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-30 13:54:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-03 08:27:48 +0200 |
commit | 6be7e2e9dd8027d284f1b00ef6e3b4654eec7d79 (patch) | |
tree | d43e18e7ef12d29089f9eb34bbe95a78245261cc /basctl | |
parent | dff829e863fd05bedd5bcb713cd80c10fa582932 (diff) |
pass SdrUndoAction around by std::unique_ptr
convert the LINK we use here to std::function, since LINK
does not currently handle std::unique_ptr
Change-Id: I9df80352e612445e5f5ca513d7d4196d65589778
Reviewed-on: https://gerrit.libreoffice.org/59804
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/baside3.cxx | 6 | ||||
-rw-r--r-- | basctl/source/inc/baside3.hxx | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 91e1d4972539..dfa698a4a345 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -83,7 +83,7 @@ DialogWindow::DialogWindow(DialogWindowLayout* pParent, ScriptDocument const& rD InitSettings(); m_pEditor->GetModel().SetNotifyUndoActionHdl( - LINK(this, DialogWindow, NotifyUndoActionHdl) + &DialogWindow::NotifyUndoActionHdl ); SetHelpId( HID_BASICIDE_DIALOGWINDOW ); @@ -217,13 +217,11 @@ void DialogWindow::Command( const CommandEvent& rCEvt ) } -IMPL_STATIC_LINK( - DialogWindow, NotifyUndoActionHdl, SdrUndoAction *, pUndoAction, void ) +void DialogWindow::NotifyUndoActionHdl( std::unique_ptr<SdrUndoAction> ) { // #i120515# pUndoAction needs to be deleted, this hand over is an ownership // change. As long as it does not get added to the undo manager, it needs at // least to be deleted. - delete pUndoAction; } void DialogWindow::DoInit() diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx index 6d332ca90c65..0277d9cba92e 100644 --- a/basctl/source/inc/baside3.hxx +++ b/basctl/source/inc/baside3.hxx @@ -72,7 +72,7 @@ protected: virtual void Command( const CommandEvent& rCEvt ) override; virtual void LoseFocus() override; - DECL_STATIC_LINK( DialogWindow, NotifyUndoActionHdl, SdrUndoAction *, void ); + static void NotifyUndoActionHdl( std::unique_ptr<SdrUndoAction> ); virtual void DoInit() override; virtual void DoScroll( ScrollBar* pCurScrollBar ) override; virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; |