Kaydet (Commit) bfeabd96 authored tarafından Armin Le Grand's avatar Armin Le Grand Kaydeden (comit) Caolán McNamara

Resolves: #i123350# Added Clear() implementation to SdrUndoManager...

to only delete text edit part of the undo stack

(cherry picked from commit 81e91652)

Conflicts:
	svx/inc/svx/sdrundomanager.hxx

Change-Id: I19594e4cfa52a24dbcb95639ac3c6b9f39908cc7
üst 8d1a1721
......@@ -48,6 +48,9 @@ public:
virtual bool Undo();
virtual bool Redo();
// #i123350#
virtual void Clear();
// Call for the view which starts the interactive text edit. Use link to
// activate (start text edit) and empty link to reset (end text edit). On
// reset all text edit actions will be removed from this undo manager to
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment