[Libreoffice-commits] core.git: include/svx svx/source
Jim Raykowski (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jul 24 22:51:26 UTC 2019
include/svx/sdrundomanager.hxx | 2 ++
svx/source/svdraw/sdrundomanager.cxx | 20 ++++++++++++++++++++
2 files changed, 22 insertions(+)
New commits:
commit ed882d693f37779e3a09641e7cd43b7a925d2312
Author: Jim Raykowski <raykowj at gmail.com>
AuthorDate: Mon Jul 22 21:28:54 2019 -0800
Commit: Jim Raykowski <raykowj at gmail.com>
CommitDate: Thu Jul 25 00:50:05 2019 +0200
tdf#47807 Invalidate bindings to Undo Redo
Change-Id: I71a16e60395003402372202a755b976d37690a27
Reviewed-on: https://gerrit.libreoffice.org/76146
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj at gmail.com>
diff --git a/include/svx/sdrundomanager.hxx b/include/svx/sdrundomanager.hxx
index 60a06bd546c5..854c4be54c51 100644
--- a/include/svx/sdrundomanager.hxx
+++ b/include/svx/sdrundomanager.hxx
@@ -63,6 +63,8 @@ public:
// by a last undo during text edit
bool isEndTextEditTriggeredFromUndo() { return mbEndTextEditTriggeredFromUndo; }
void SetDocShell(SfxObjectShell* pDocShell);
+
+ virtual void AddUndoAction( std::unique_ptr<SfxUndoAction> pAction, bool bTryMerg=false ) override;
};
#endif // INCLUDED_SVX_SDRUNDOMANAGER_HXX
diff --git a/svx/source/svdraw/sdrundomanager.cxx b/svx/source/svdraw/sdrundomanager.cxx
index 78e72e76196a..5d13d8e5e8a8 100644
--- a/svx/source/svdraw/sdrundomanager.cxx
+++ b/svx/source/svdraw/sdrundomanager.cxx
@@ -18,7 +18,10 @@
*/
#include <svx/sdrundomanager.hxx>
+#include <svx/svxids.hrc>
+#include <sfx2/bindings.hxx>
#include <sfx2/objsh.hxx>
+#include <sfx2/viewfrm.hxx>
#include <svl/hint.hxx>
SdrUndoManager::SdrUndoManager()
@@ -146,4 +149,21 @@ void SdrUndoManager::EmptyActionsChanged()
}
}
+void SdrUndoManager::AddUndoAction( std::unique_ptr<SfxUndoAction> pAction, bool bTryMerg )
+{
+ EditUndoManager::AddUndoAction( std::move(pAction), bTryMerg);
+
+ if (m_pDocSh)
+ {
+ SfxViewFrame* pViewFrame = SfxViewFrame::GetFirst( m_pDocSh );
+ while ( pViewFrame )
+ {
+ pViewFrame->GetBindings().Invalidate( SID_UNDO );
+ pViewFrame->GetBindings().Invalidate( SID_REDO );
+ pViewFrame = SfxViewFrame::GetNext( *pViewFrame, m_pDocSh );
+ }
+ }
+}
+
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list