summaryrefslogtreecommitdiff
path: root/sw/inc/formatcontentcontrol.hxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-07-14 15:52:37 +0200
committerMiklos Vajna <vmiklos@collabora.com>2022-07-14 19:05:27 +0200
commitc6eb8713438d1ba791fc858c8dc6e3d4d6583e0a (patch)
treef8aed8e3aa28e351ee1dea5d69416e0a79a10e1c /sw/inc/formatcontentcontrol.hxx
parentbcb1620b3e4929df1d06d57b4769650422fff16e (diff)
sw content control, checkbox: allow toggling via the keyboard
Toggling a checkbox content control was only possible by clicking on it with the mouse, which breaks accessiblity. Trying to type into a checkbox content control triggered the read-only popup (which is good), but there was no special handling for the space character, which is meant to toggle the checkbox. Fix the problem by adding a way to query if the current keycode is meant to interact with the content control, and if so, invoke GotoContentControl() from SwEditWin::KeyInput(), similar to how the click handler already did this already. This only handles checkboxes, but other types can be addressed in a follow-up commits similarly. Change-Id: I5c88f2e2f1c2d0f4b28f2ce0b6b1c75b14b7d67c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137082 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/inc/formatcontentcontrol.hxx')
-rw-r--r--sw/inc/formatcontentcontrol.hxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sw/inc/formatcontentcontrol.hxx b/sw/inc/formatcontentcontrol.hxx
index 82f4fca9e2be..839a7919ee6b 100644
--- a/sw/inc/formatcontentcontrol.hxx
+++ b/sw/inc/formatcontentcontrol.hxx
@@ -272,6 +272,9 @@ public:
std::optional<double> GetSelectedDate() const { return m_oSelectedDate; }
+ /// Should this character (during key input) interact with the content control?
+ bool IsInteractingCharacter(sal_Unicode cCh);
+
void dumpAsXml(xmlTextWriterPtr pWriter) const;
void SetDataBindingPrefixMappings(const OUString& rDataBindingPrefixMappings)