diff options
author | Eike Rathke <erack@redhat.com> | 2017-04-10 23:25:34 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-05-15 21:59:06 +0200 |
commit | dc1833e012c581c8b534652c28ebf635108ba279 (patch) | |
tree | 1879cad97dfbb8bd1645abe5afe1e5196440448a /sc/source | |
parent | 26337c1307a1cdee72b2d457cd0d210227662e29 (diff) |
flag ScCaptionPtr::setInUndo() in ScUndoReplaceNote
Change-Id: I174be1262074e1fed784806d2f052b36749dff0d
Diffstat (limited to 'sc/source')
-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 ee8ec67237c2..1e39da276459 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() |