summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-10-08 12:38:03 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-10-08 15:45:47 +0100
commitbfeabd965c4ed4cc78975dbedafb586e2fac8c48 (patch)
treeb313224fff4dd63af127e570f2684fdfd0ffdb70 /svx
parent8d1a172121ab29c70de89c59945b60f462a89fa4 (diff)
Resolves: #i123350# Added Clear() implementation to SdrUndoManager...
to only delete text edit part of the undo stack (cherry picked from commit 81e916525fa63b188b2a3b9bb7030e4d451a4808) Conflicts: svx/inc/svx/sdrundomanager.hxx Change-Id: I19594e4cfa52a24dbcb95639ac3c6b9f39908cc7
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/sdrundomanager.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/svx/source/svdraw/sdrundomanager.cxx b/svx/source/svdraw/sdrundomanager.cxx
index 4f97225383bd..f2a00c553d5f 100644
--- a/svx/source/svdraw/sdrundomanager.cxx
+++ b/svx/source/svdraw/sdrundomanager.cxx
@@ -80,6 +80,25 @@ bool SdrUndoManager::Redo()
return bRetval;
}
+void SdrUndoManager::Clear()
+{
+ if(isTextEditActive())
+ {
+ while(GetUndoActionCount() && mpLastUndoActionBeforeTextEdit != GetUndoAction(0))
+ {
+ RemoveLastUndoAction();
+ }
+
+ // urgently needed: RemoveLastUndoAction does NOT correct the Redo stack by itself (!)
+ ClearRedo();
+ }
+ else
+ {
+ // call parent
+ EditUndoManager::Clear();
+ }
+}
+
void SdrUndoManager::SetEndTextEditHdl(const Link& rLink)
{
maEndTextEditHdl = rLink;