summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-30 13:54:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-09-03 08:27:48 +0200
commit6be7e2e9dd8027d284f1b00ef6e3b4654eec7d79 (patch)
treed43e18e7ef12d29089f9eb34bbe95a78245261cc /include
parentdff829e863fd05bedd5bcb713cd80c10fa582932 (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 'include')
-rw-r--r--include/svx/svdmodel.hxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index cfe5ffdd6fb6..a09682fa93a5 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -20,6 +20,7 @@
#ifndef INCLUDED_SVX_SVDMODEL_HXX
#define INCLUDED_SVX_SVDMODEL_HXX
+#include <functional>
#include <memory>
#include <com/sun/star/uno/Sequence.hxx>
#include <cppuhelper/weakref.hxx>
@@ -183,7 +184,7 @@ private:
protected:
std::vector<SdrPage*> maMaPag; // master pages
std::vector<SdrPage*> maPages;
- Link<SdrUndoAction*,void> aUndoLink; // link to a NotifyUndo-Handler
+ std::function<void(std::unique_ptr<SdrUndoAction>)> aUndoLink; // link to a NotifyUndo-Handler
Size aMaxObjSize; // e.g. for auto-growing text
Fraction aObjUnit; // description of the coordinate units for ClipBoard, Drag&Drop, ...
MapUnit eObjUnit; // see above
@@ -522,7 +523,7 @@ public:
// void NotifyUndoActionHdl(SfxUndoAction* pUndoAction);
// When calling the handler ownership is transferred;
// The UndoAction belongs to the Handler, not the SdrModel.
- void SetNotifyUndoActionHdl(const Link<SdrUndoAction*,void>& rLink) { aUndoLink=rLink; }
+ void SetNotifyUndoActionHdl(const std::function<void(std::unique_ptr<SdrUndoAction>)>& rLink) { aUndoLink=rLink; }
/** application can set its own undo manager, BegUndo, EndUndo and AddUndoAction
calls are routed to this interface if given */