diff options
author | Eike Rathke <erack@redhat.com> | 2017-04-13 00:34:34 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-04-13 00:48:47 +0200 |
commit | 6c0e633e79e3a8af075ddc17e98ff390e66cd496 (patch) | |
tree | 7c6599cd6575fabd4c3413a24f9a2311a7c879ac /sc/source | |
parent | 06e427c24d75311c0ab79d2da586b961881db766 (diff) |
turn assert into SAL_INFO
The old assert conditions don't hold anymore since removeFromDrawPageAndFree()
only deletes the SdrCaptionObj on the last refcount, but info can be useful.
Change-Id: I456149b8799a0509dcd7a2da09d627fb0de1a912
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/data/postit.cxx | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index ee8f82ee0a2c..225b46edcf76 100644 --- a/sc/source/core/data/postit.cxx +++ b/sc/source/core/data/postit.cxx @@ -1135,20 +1135,16 @@ void ScPostIt::RemoveCaption() if (pDrawLayer == maNoteData.mxCaption->GetModel()) maNoteData.mxCaption.removeFromDrawPageAndFree(); -#if 0 - // Either the caption object is gone or, because of Undo or clipboard is - // held in at least two instances, or only one instance in Undo because the - // original sheet in this document is just deleted, or the Undo document is - // just destroyed which leaves us with one reference. - // Let's detect other use cases.. - assert(!maNoteData.mxCaption || maNoteData.mxCaption.getRefs() >= 2 || - (!mrDoc.IsUndo() && !mrDoc.IsClipboard()) || (mrDoc.IsUndo() && mrDoc.IsInDtorClear())); -#endif + SAL_INFO("sc.core","ScPostIt::RemoveCaption - refs: " << maNoteData.mxCaption.getRefs() << + " IsUndo: " << mrDoc.IsUndo() << " IsClip: " << mrDoc.IsClipboard() << + " Dtor: " << mrDoc.IsInDtorClear()); - // Forget the caption object if removeFromDrawPageAndFree() above did not - // free it. + // Forget the caption object if removeFromDrawPageAndFree() did not free it. if (maNoteData.mxCaption) + { + SAL_INFO("sc.core","ScPostIt::RemoveCaption - forgetting one ref"); maNoteData.mxCaption.forget(); + } } ScCaptionPtr ScNoteUtil::CreateTempCaption( |