From 58f894c86505c95f3924fa5e6d0c9523e062430e Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Thu, 9 Mar 2017 15:22:57 +0100 Subject: add ScCaptionPtr::insertToDrawPage() Change-Id: I1266b55c2558d306b20b0f2d9fba07b0bc46544e --- sc/inc/postit.hxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'sc/inc') diff --git a/sc/inc/postit.hxx b/sc/inc/postit.hxx index e198870479f6..7266109200c0 100644 --- a/sc/inc/postit.hxx +++ b/sc/inc/postit.hxx @@ -31,6 +31,7 @@ class EditTextObject; class OutlinerParaObject; class SdrCaptionObj; class SdrPage; + class SfxItemSet; class ScDocument; class Rectangle; @@ -58,6 +59,10 @@ public: // Does not default to nullptr to make it visually obvious where such is used. void reset( SdrCaptionObj* p ); + /** Insert to draw page. The caption object is owned by the draw page then. + */ + void insertToDrawPage( SdrPage& rDrawPage ); + /** Release all management of the SdrCaptionObj* in all instances of this list and dissolve. The SdrCaptionObj pointer returned is ready to be managed elsewhere. @@ -77,8 +82,12 @@ private: struct Head { - ScCaptionPtr* mpFirst; ///< first in list - oslInterlockedCount mnRefs; ///< use count + ScCaptionPtr* mpFirst; ///< first in list + oslInterlockedCount mnRefs; ///< use count + bool mbInDrawPage; ///< caption object is owned by draw page + + Head() = delete; + explicit Head( ScCaptionPtr* ); }; Head* mpHead; ///< points to the "master" entry -- cgit