diff options
author | Eike Rathke <erack@redhat.com> | 2017-03-09 23:15:42 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-05-15 21:59:01 +0200 |
commit | 83cca3c8d7f93f792a2b2415bd02378c348c1e65 (patch) | |
tree | 6d117331282c2de649964ba4130fd6def9bc24e5 /sc | |
parent | 3deb09f16d9c68914be4f89c5fc4bed005cb7c0a (diff) |
finally turn this into a hard assert
Change-Id: Iba6abafeaa2542fc94b76a642ddb0eb5b70b572d
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/postit.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index 66e91517338e..078a30fa37b3 100644 --- a/sc/source/core/data/postit.cxx +++ b/sc/source/core/data/postit.cxx @@ -959,7 +959,9 @@ void ScPostIt::UpdateCaptionPos( const ScAddress& rPos ) void ScPostIt::CreateCaptionFromInitData( const ScAddress& rPos ) const { - OSL_ENSURE( maNoteData.mxCaption || maNoteData.mxInitData.get(), "ScPostIt::CreateCaptionFromInitData - need caption object or initial caption data" ); + // Captions are not created in Undo documents and only rarely in Clipboard, + // but otherwise we need caption or initial data. + assert((maNoteData.mxCaption || maNoteData.mxInitData.get()) || mrDoc.IsUndo() || mrDoc.IsClipboard()); if( maNoteData.mxInitData.get() ) { /* This function is called from ScPostIt::Clone() when copying cells |