diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-04-20 17:44:29 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-04-20 17:17:19 +0000 |
commit | 100eb15b4d8529d7a11d98a28742f31f0f792fa1 (patch) | |
tree | f0de11fb70b685bf58a3e7a39e64bb00ff55e400 /include/svx/svdotable.hxx | |
parent | e8425c48102321d4f5a8bd687c8ca1ac7bae797e (diff) |
tdf#99396 SdrTableObj::EndTextEdit: restore cell format undo items
As seen by the user: after finishing the text edit of an Impress table
cell, the text changes are still on the undo stack, but the table ones
(like background color or vertical alignment) get lost.
This happens as SdrUndoManager::SetEndTextEditHdl() removes all undo
items from the stack which are created after the start of the text edit,
and creates a single item, but that doesn't include the table changes,
just the text ones.
Fix the problem by creating a copy of the CellUndo objects when it text
edit mode, and pushing them to the undo stack in
SdrTableObj::EndTextEdit(), which already writes the undo stack and runs
after the undo manager cleared the text edit items from the undo stack.
Change-Id: I7d2768c86b5b262e98be1d09d7fa08d581430bb5
Reviewed-on: https://gerrit.libreoffice.org/24264
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'include/svx/svdotable.hxx')
-rw-r--r-- | include/svx/svdotable.hxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/svx/svdotable.hxx b/include/svx/svdotable.hxx index de68ed7589bf..ed1264d5eeb9 100644 --- a/include/svx/svdotable.hxx +++ b/include/svx/svdotable.hxx @@ -30,6 +30,7 @@ class SvStream; class SfxStyleSheet; +class SdrUndoAction; namespace sdr { namespace contact { class ViewContactOfTableObj; @@ -249,6 +250,9 @@ public: css::text::WritingMode GetWritingMode() const; + /// Add an undo action that should be on the undo stack after ending text edit. + void AddUndo(SdrUndoAction* pUndo); + virtual void onEditOutlinerStatusEvent( EditStatus* pEditStatus ) override; // Transformation interface for StarOfficeAPI. This implements support for |