summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-03-09 19:50:31 +0100
committerHenry Castro <hcastro@collabora.com>2017-05-02 18:57:48 -0400
commita1b940dd78c36345452188b1cfcb0ba06511100e (patch)
tree91318f03b4963c79f4fc5a22e0e6023f2958fda2 /sc
parent40281dc243ef529a6e715fc78bd2381fd9c4f297 (diff)
probably should work like sketched
Change-Id: I5ad52c718cf53c2f3fb14a7970917e0012d01875
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/postit.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 618bbe462b9f..ee9b89e78ef7 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -683,13 +683,19 @@ void ScCaptionPtr::decRefAndDestroy()
{
if (decRef())
{
- /* FIXME: this should eventually remove the caption from drawing layer
- * foo and call SdrObject::Free(), likely with mpHead->mpCaption, see
- * ScPostIt::RemoveCaption(). Further work needed to be able to do so.
- * */
assert(mpHead->mpFirst == this); // this must be one and only one
- mpCaption = nullptr;
assert(!mpNext); // this must be one and only one
+ assert(mpCaption);
+ if (mpHead->mbInDrawPage)
+ {
+ /* FIXME: this should eventually remove the caption from drawing layer
+ * foo and call SdrObject::Free(), likely with mpCaption, see
+ * ScPostIt::RemoveCaption(). Further work needed to be able to do so.
+ * */
+ }
+ /* FIXME: once we got ownership right */
+ //SdrObject::Free( mpCaption );
+ mpCaption = nullptr;
delete mpHead;
mpHead = nullptr;
}