diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-07-25 11:59:58 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-07-27 08:31:27 +0200 |
commit | 0de49f7a6dd0b3731f35d74858af385ad9b6083b (patch) | |
tree | d0abe42d1a5a980aa599cf1905653d6530bb12a5 /starmath | |
parent | 81e6c87d2b03940f2378b0c710dfae7c1de56709 (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>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137477
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/view.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index c2aea203f176..21d500c1d937 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -64,6 +64,7 @@ #include <vcl/virdev.hxx> #include <sal/log.hxx> #include <tools/svborder.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()) { |