starmath/source/view.cxx | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit 195faf2b3d1ee0f4fd1bf59137cc6310c390ebbe
Author: Mike Kaganski <[email protected]>
AuthorDate: Mon Jul 25 11:59:58 2022 +0300
Commit: Mike Kaganski <[email protected]>
CommitDate: Mon Jul 25 19:26:34 2022 +0200
Handle Ctrl+Z / Ctrl+Y in Math graphic window correctly
... instead of trying to insert a control character in the formula.
Change-Id: Ifcf4d3ce1111a381cd29de310b041c08f7314cff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137402
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <[email protected]>
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index ebbf0bcea2e6..e2b60cb9c6bd 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -65,6 +65,7 @@
#include <sal/log.hxx>
#include <tools/svborder.hxx>
#include <o3tl/string_view.hxx>
+#include <o3tl/temporary.hxx>
#include <unotools/streamwrap.hxx>
@@ -686,6 +687,12 @@ bool SmGraphicWidget::KeyInput(const KeyEvent& rKEvt)
case KeyFuncType::PASTE:
rCursor.Paste();
break;
+ case KeyFuncType::UNDO:
+ GetDoc()->Execute(o3tl::temporary(SfxRequest(GetView().GetFrame(),
SID_UNDO)));
+ break;
+ case KeyFuncType::REDO:
+ GetDoc()->Execute(o3tl::temporary(SfxRequest(GetView().GetFrame(),
SID_REDO)));
+ break;
default:
switch (rKEvt.GetKeyCode().GetCode())
{