diff options
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/sdrundomanager.cxx | 19 |
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; |