summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-03-09 19:50:31 +0100
committerJan Holesovsky <kendy@collabora.com>2017-05-15 21:58:58 +0200
commit108edf7c758c6001554a24ef99f9bba55a1d8cbc (patch)
treedfd3960363432124cd589ea00d36283c0f0ce26f /sc
parent326cfd39d5ddafc938cc6281452f9062d5b118e1 (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;
}