diff options
author | Eike Rathke <erack@redhat.com> | 2017-03-09 23:15:42 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-03-09 23:16:42 +0100 |
commit | da3d56b077ce81f6f399a68f53895590dbb1357f (patch) | |
tree | 2bd9272e176eacf498e2a6edb60079df69a1e002 /sc/source | |
parent | 96175e7ed24fc007f88c418f8d449b6bd07563ad (diff) |
finally turn this into a hard assert
Change-Id: Iba6abafeaa2542fc94b76a642ddb0eb5b70b572d
Diffstat (limited to 'sc/source')
-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 c01b6d772cc5..3addea4c948d 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 |