summaryrefslogtreecommitdiff
path: root/starmath/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-07-25 11:59:58 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2022-07-25 19:26:34 +0200
commit195faf2b3d1ee0f4fd1bf59137cc6310c390ebbe (patch)
treef42f1115d7637aac3188a07b17d0992df21bc2bd /starmath/source
parent7a48b95e2516f51460341c6e0f8f991cca93c6f2 (diff)
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 <mike.kaganski@collabora.com>
Diffstat (limited to 'starmath/source')
-rw-r--r--starmath/source/view.cxx7
1 files changed, 7 insertions, 0 deletions
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())
{