[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - 2 commits - starmath/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Apr 22 08:28:33 UTC 2021
starmath/source/ElementsDockingWindow.cxx | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
New commits:
commit 6b4d475b9377dba504a08c4317210bf3f8bc1859
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Apr 21 17:09:59 2021 +0100
Commit: Xisco Fauli <xiscofauli at 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 <xiscofauli at 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 <caolanm at redhat.com>
AuthorDate: Wed Apr 21 16:57:32 2021 +0100
Commit: Xisco Fauli <xiscofauli at 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 <xiscofauli at 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]))
More information about the Libreoffice-commits
mailing list