diff options
author | Eike Rathke <erack@redhat.com> | 2017-04-10 23:25:34 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-04-10 23:31:59 +0200 |
commit | 8984ca204dd4753246782a4f5b8f6058bb232d33 (patch) | |
tree | bae9a769e0e7428bb7aa3c59ac53d17fad511468 /sc | |
parent | 98940fc97fe134af332bd0f9d41ec76e21bc521c (diff) |
flag ScCaptionPtr::setInUndo() in ScUndoReplaceNote
Change-Id: I174be1262074e1fed784806d2f052b36749dff0d
Diffstat (limited to 'sc')
-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() |