diff options
author | Justin Luth <justin.luth@collabora.com> | 2022-12-02 10:48:46 -0500 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-12-14 07:14:59 +0000 |
commit | 908d058c67c4efb3dc142ea8d6ad59badf01c9c6 (patch) | |
tree | 2922abca85f2700d11c881ceaf241a5d1eabdf01 /sw/inc/formatcontentcontrol.hxx | |
parent | e15658a7576c8160c9f1b861201e206f9cf34df9 (diff) |
tdf#151548 sw content controls: preserve tabIndex
This has to be vital to keyboard navigation.
Certainly it is good to have it imported
before we start to consider tab-movements
for form controls.
All tabIndex 1's are processed (in placement order)
and then the 2's etc. 0's are to be done last.
XML_TAB_INDEX already existed in include/xmloff/xmltoken.hxx
and "tab-index" already exists in xmloff/source/token/tokens.txt
make CppunitTest_writerfilter_dmapper CPPUNIT_TEST_NAME=testSdtRunRichText
make CppunitTest_sw_ooxmlexport17 CPPUNIT_TEST_NAME=testDateContentControlExport
make CppunitTest_sw_core_unocore CPPUNIT_TEST_NAME=testContentControlDate
make CppunitTest_xmloff_text CPPUNIT_TEST_NAME=testAliasContentControlExport
make CppunitTest_xmloff_text CPPUNIT_TEST_NAME=testAliasContentControlImport
No existing unit test found containing blockSDT with tabIndex.
Change-Id: I8a958844e6192b079a2b22a62dedfd8739021f4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143603
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/inc/formatcontentcontrol.hxx')
-rw-r--r-- | sw/inc/formatcontentcontrol.hxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sw/inc/formatcontentcontrol.hxx b/sw/inc/formatcontentcontrol.hxx index e561fa6e23fb..77e6addbca09 100644 --- a/sw/inc/formatcontentcontrol.hxx +++ b/sw/inc/formatcontentcontrol.hxx @@ -179,6 +179,9 @@ class SW_DLLPUBLIC SwContentControl : public sw::BroadcastingModify /// The id: just remembered. sal_Int32 m_nId = 0; + /// The tabIndex: just remembered. + sal_uInt32 m_nTabIndex = 0; + /// The control and content locks: mostly just remembered. OUString m_aLock; @@ -362,6 +365,10 @@ public: sal_Int32 GetId() const { return m_nId; } + void SetTabIndex(sal_uInt32 nTabIndex) { m_nTabIndex = nTabIndex; } + + sal_uInt32 GetTabIndex() const { return m_nTabIndex; } + // At the design level, define how the control should be locked. No effect at implementation lvl void SetLock(bool bLockContent, bool bLockControl); void SetLock(const OUString& rLock) { m_aLock = rLock; } |