summaryrefslogtreecommitdiff
path: root/sw/inc/crsrsh.hxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-07-15 11:37:58 +0200
committerMiklos Vajna <vmiklos@collabora.com>2022-07-18 08:08:19 +0200
commit5bc905f997d94e02e0fb16b19e57b42ae97e4076 (patch)
tree38dcbdc07aaa819363e117278e5c5003c2e5f446 /sw/inc/crsrsh.hxx
parentf74bbe7397ad8e05a4d201e4d014fdad8acf12a4 (diff)
sw content control, dropdown: allow selecting via the keyboard
It was not possible to select an entry from a content control dropdown using the keyboard, which breaks accessibility. This had the benefit that the mouse handler code could contain the popup start calls, but Word can do this with alt-down arrow, so make sense to add it on our side as well. Fix the problem by adding SwContentControl::ShouldOpenPopup(), which knows that dropdowns want a popup with alt-down, and then connecting SwEditWin::KeyInput() to it. Date content controls probably will want something similar, but that's not yet done in this commit. (cherry picked from commit d65e85178abdd4f1bf068f161e49204e068bb5da) Conflicts: sw/inc/formatcontentcontrol.hxx Change-Id: I6853d3a1661e4d826b96b1b5cb938909875af2ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137107 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/inc/crsrsh.hxx')
-rw-r--r--sw/inc/crsrsh.hxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 2dd27529810a..fb6e00106691 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -59,6 +59,7 @@ class SwBlockCursor;
class SwPostItField;
class SwTextField;
class SwTextFootnote;
+class SwTextContentControl;
namespace i18nutil {
struct SearchOptions2;
@@ -717,7 +718,7 @@ public:
const bool bIncludeInputFieldAtStart );
SwField* GetCurField( const bool bIncludeInputFieldAtStart = false ) const;
bool CursorInsideInputField() const;
- bool CursorInsideContentControl() const;
+ SwTextContentControl* CursorInsideContentControl() const;
static bool PosInsideInputField( const SwPosition& rPos );
bool DocPtInsideInputField( const Point& rDocPt ) const;
static sal_Int32 StartOfInputFieldAtPos( const SwPosition& rPos );