diff options
author | Eike Rathke <erack@redhat.com> | 2017-04-10 16:25:45 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-04-10 16:29:49 +0200 |
commit | 9c9c2caad67ca1188e1f1acf25cbfe6438349297 (patch) | |
tree | ad0b1d6dee8ccf4dd8f89a3e91feb457585a4dfc /sc/source | |
parent | eb433f83a5f66dd1ca8ed0c62ef9cc0761b7f0ac (diff) |
can't keep track of drawlayer insertion
Draw Undo independently can reinsert a caption to the drawlayer, which
is beyond our knowledge. To track that cumbersome manual tracking (or
callbacks or whatever) would be needed, which actually this tries to get
rid of instead of increasing..
Change-Id: I373843ad61d0b6e19b9d3f98fd8f9e01a448296d
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/data/postit.cxx | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index 9568148077d0..9bd602bfb72e 100644 --- a/sc/source/core/data/postit.cxx +++ b/sc/source/core/data/postit.cxx @@ -535,7 +535,7 @@ ScCaptionPtr& ScCaptionPtr::operator=( const ScCaptionPtr& r ) } ScCaptionPtr::Head::Head( ScCaptionPtr* p ) : - mpFirst(p), mnRefs(1), mbInDrawPage(false) + mpFirst(p), mnRefs(1) { } @@ -686,7 +686,8 @@ void ScCaptionPtr::decRefAndDestroy() assert(mpHead->mpFirst == this); // this must be one and only one assert(!mpNext); // this must be one and only one assert(mpCaption); - if (mpHead->mbInDrawPage) +#if 0 + if (what?) { /* FIXME: this should eventually remove the caption from drawing layer * foo and call SdrObject::Free(), likely with mpCaption, see @@ -695,6 +696,7 @@ void ScCaptionPtr::decRefAndDestroy() } /* FIXME: once we got ownership right */ //SdrObject::Free( mpCaption ); +#endif mpCaption = nullptr; delete mpHead; mpHead = nullptr; @@ -704,24 +706,15 @@ void ScCaptionPtr::decRefAndDestroy() void ScCaptionPtr::insertToDrawPage( SdrPage& rDrawPage ) { assert(mpHead && mpCaption); - assert(!mpHead->mbInDrawPage); // multiple assignments not possible rDrawPage.InsertObject( mpCaption ); - mpHead->mbInDrawPage = true; } void ScCaptionPtr::removeFromDrawPage( SdrPage& rDrawPage ) { assert(mpHead && mpCaption); - SAL_WARN_IF(!mpHead->mbInDrawPage,"sc.core","ScCaptionPtr::removeFromDrawPage - not in draw page"); - /* FIXME: that should assert, but currently fails in - * Test::testCopyToDocument() probably due to CopyStaticToDocument() - * lacking something. */ - //assert(mpHead->mbInDrawPage); // did we lose track anywhere? - SdrObject* pObj = rDrawPage.RemoveObject( mpCaption->GetOrdNum() ); assert(pObj == mpCaption); (void)pObj; - mpHead->mbInDrawPage = false; } SdrCaptionObj* ScCaptionPtr::release() |