starmath/source/ElementsDockingWindow.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
New commits: commit 6b4d475b9377dba504a08c4317210bf3f8bc1859 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Apr 21 17:09:59 2021 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Thu Apr 22 10:28:15 2021 +0200 Related: tdf#140659 on control get/lose focus call update custom a11y Change-Id: Iab7df2c657da3386dc38db8a9d6427c60d8c1cc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114452 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx index e8365df87f01..e6835a4b8034 100644 --- a/starmath/source/ElementsDockingWindow.cxx +++ b/starmath/source/ElementsDockingWindow.cxx @@ -651,10 +651,14 @@ void SmElementsControl::GetFocus() { CustomWidgetController::GetFocus(); Invalidate(); + if (m_xAccessible.is() && m_nCurrentElement != SAL_MAX_UINT16) + m_xAccessible->AcquireFocus(); } void SmElementsControl::LoseFocus() { + if (m_xAccessible.is() && m_nCurrentElement != SAL_MAX_UINT16) + m_xAccessible->ReleaseFocus(m_nCurrentElement); CustomWidgetController::LoseFocus(); Invalidate(); } commit b45629418d91c7452245ae4c6894fa3c1becf237 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Apr 21 16:57:32 2021 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Thu Apr 22 10:28:00 2021 +0200 Related: tdf#140659 off by one indexes because scrollbar is now outside and not inside the control so it doesn't need to be accounted for as a child Change-Id: I77b55ec8d9b515850817417664df8944b4e44204 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114451 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx index 0ee85b49eab8..e8365df87f01 100644 --- a/starmath/source/ElementsDockingWindow.cxx +++ b/starmath/source/ElementsDockingWindow.cxx @@ -288,7 +288,7 @@ SmElementsControl::SmElementsControl(std::unique_ptr<weld::ScrolledWindow> xScro : mpDocShell(new SmDocShell(SfxModelFlags::EMBEDDED_OBJECT)) , m_nCurrentElement(SAL_MAX_UINT16) , m_nCurrentRolloverElement(SAL_MAX_UINT16) - , m_nCurrentOffset(1) // Default offset of 1 due to the ScrollBar child + , m_nCurrentOffset(0) , mbVerticalMode(true) , mxScroll(std::move(xScrolledWindow)) , m_bFirstPaintAfterLayout(false) @@ -1018,7 +1018,7 @@ void SmElementsControl::addElements(const SmElementDescr aElementsArray[], sal_u void SmElementsControl::build() { // The order is important! - // 1. Ensure there are no items left, including the default scrollbar! + // 1. Ensure there are no items left // 2. Release all the current accessible items. // This will check for new items after releasing them! // 3. Set the cursor element @@ -1033,9 +1033,7 @@ void SmElementsControl::build() setCurrentElement(SAL_MAX_UINT16); - // The first element is the scrollbar. We can't change its indexInParent - // value, as this is set by being a child of the SmElementsControl. - m_nCurrentOffset = 1; + m_nCurrentOffset = 0; for (sal_uInt16 n = 0; n < SAL_N_ELEMENTS(m_aCategories); ++n) { if (msCurrentSetId == std::get<0>(m_aCategories[n])) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits