diff options
Diffstat (limited to 'sc/source/ui/undo')
-rw-r--r-- | sc/source/ui/undo/undocell.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx index ddd0ebdb66a9..202acdd26f45 100644 --- a/sc/source/ui/undo/undocell.cxx +++ b/sc/source/ui/undo/undocell.cxx @@ -709,7 +709,16 @@ ScUndoReplaceNote::ScUndoReplaceNote( ScDocShell& rDocShell, const ScAddress& rP mpDrawUndo( pDrawUndo ) { OSL_ENSURE( rNoteData.mxCaption, "ScUndoReplaceNote::ScUndoReplaceNote - missing note caption" ); - (bInsert ? maNewData : maOldData) = rNoteData; + if (bInsert) + { + maNewData = rNoteData; + maNewData.mxCaption.setInUndo(); + } + else + { + maOldData = rNoteData; + maOldData.mxCaption.setInUndo(); + } } ScUndoReplaceNote::ScUndoReplaceNote( ScDocShell& rDocShell, const ScAddress& rPos, @@ -722,6 +731,8 @@ ScUndoReplaceNote::ScUndoReplaceNote( ScDocShell& rDocShell, const ScAddress& rP { OSL_ENSURE( maOldData.mxCaption || maNewData.mxCaption, "ScUndoReplaceNote::ScUndoReplaceNote - missing note captions" ); OSL_ENSURE( !maOldData.mxInitData.get() && !maNewData.mxInitData.get(), "ScUndoReplaceNote::ScUndoReplaceNote - unexpected unitialized note" ); + maOldData.mxCaption.setInUndo(); + maNewData.mxCaption.setInUndo(); } ScUndoReplaceNote::~ScUndoReplaceNote() |