summaryrefslogtreecommitdiff
path: root/include/svx
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-04-01 23:36:02 +0300
committerMichael Weghorn <m.weghorn@posteo.de>2023-04-03 17:00:55 +0200
commitfa7fc141e49bf1a5e1fc30645d559c19205d76a7 (patch)
treee33fbd7a4652c6a70741a14d223f1110133bc61a /include/svx
parentd1f5b3c5cb226fd5f58fe2cdc8be9d1330fad6a2 (diff)
tdf#153806 a11y: Insert special char + close dialog on return key
As discussed in tdf#153806, insert the currently selected character from the special characters dialog and close the dialog when the return key is pressed on the table of characters (either showing all characters or just the search result). Something similar should probably be done when the return key is pressed with one of the recent characters or favorite characters in the dialog having focus, but that needs to be handled separately, possibly along with the other remaining suggestions to improve keyboard handling in the special characters dialog as discussed in tdf#153806. Change-Id: Iccc19e4808ddf6f15c32710f9bea931e46b046bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149920 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'include/svx')
-rw-r--r--include/svx/charmap.hxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx
index 6c84a53a0d9a..5f0bfe6ffdee 100644
--- a/include/svx/charmap.hxx
+++ b/include/svx/charmap.hxx
@@ -69,6 +69,7 @@ public:
void createContextMenu();
void SetDoubleClickHdl( const Link<SvxShowCharSet*,void>& rLink ) { aDoubleClkHdl = rLink; }
+ void SetReturnKeyPressHdl( const Link<SvxShowCharSet*,void>& rLink ) { m_aReturnKeypressHdl = rLink; }
void SetSelectHdl( const Link<SvxShowCharSet*,void>& rHdl ) { aSelectHdl = rHdl; }
void SetHighlightHdl( const Link<SvxShowCharSet*,void>& rHdl ) { aHighHdl = rHdl; }
void SetPreSelectHdl( const Link<SvxShowCharSet*,void>& rHdl ) { aPreSelectHdl = rHdl; }
@@ -110,7 +111,6 @@ private:
virtual bool MouseButtonUp(const MouseEvent& rMEvt) override;
virtual void GetFocus() override;
virtual void LoseFocus() override;
- virtual bool KeyInput(const KeyEvent&) override;
virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override;
virtual FactoryFunction GetUITestFactory() const override;
@@ -119,6 +119,7 @@ protected:
typedef std::map<sal_Int32, std::shared_ptr<svx::SvxShowCharSetItem> > ItemsMap;
ItemsMap m_aItems;
Link<SvxShowCharSet*,void> aDoubleClkHdl;
+ Link<SvxShowCharSet*,void> m_aReturnKeypressHdl;
Link<SvxShowCharSet*,void> aSelectHdl;
Link<SvxShowCharSet*,void> aFavClickHdl;
Link<SvxShowCharSet*,void> aHighHdl;
@@ -146,6 +147,7 @@ protected:
protected:
+ virtual bool KeyInput(const KeyEvent&) override;
virtual void DrawChars_Impl(vcl::RenderContext& rRenderContext, int n1, int n2);
void InitSettings(vcl::RenderContext& rRenderContext);
// abstraction layers are: Unicode<->MapIndex<->Pixel