diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2021-07-28 11:46:20 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2021-07-28 15:45:43 +0200 |
commit | f62cbfed55099170ae6f9c006c36bca3420424e3 (patch) | |
tree | cdf3c10401d6c72eff30e28e651e0594dd4cf72e /vcl/qt5 | |
parent | b5ada12ffd0b6b8677430fce117c4c1e38cc9159 (diff) |
qt5 a11y: Implement Qt5AccessibleWidget::minimumStepSize
This makes use of the newly introduced
XAccessibleValue::getMinimumIncrement method,
s. Change-Id: Ie148a4e1cedbdbb5964f8565c81611d3480465cb,
"Add XAccessibleValue::getMinimumIncrement method".
With this in place, Accerciser now shows the correct
"Minimum increment" and the exact decimal value instead
of a rounded integer value for FormattedFields, s.
note in commit message for
Change-Id: I8af326c2d24c1801147a56ea2e2a886ab42ac634
"a11y: Expose FormattedField as spinbox" for more details.
Change-Id: Ia9d07552197357c81ae8ea3b62e2de07e82148bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119597
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl/qt5')
-rw-r--r-- | vcl/qt5/Qt5AccessibleWidget.cxx | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/vcl/qt5/Qt5AccessibleWidget.cxx b/vcl/qt5/Qt5AccessibleWidget.cxx index c7008f36d26a..65d5faafb918 100644 --- a/vcl/qt5/Qt5AccessibleWidget.cxx +++ b/vcl/qt5/Qt5AccessibleWidget.cxx @@ -1090,6 +1090,7 @@ QVariant Qt5AccessibleWidget::currentValue() const xValue->getCurrentValue() >>= aDouble; return QVariant(aDouble); } + QVariant Qt5AccessibleWidget::maximumValue() const { Reference<XAccessibleContext> xAc = getAccessibleContextImpl(); @@ -1103,7 +1104,21 @@ QVariant Qt5AccessibleWidget::maximumValue() const xValue->getMaximumValue() >>= aDouble; return QVariant(aDouble); } -QVariant Qt5AccessibleWidget::minimumStepSize() const { return QVariant(); } + +QVariant Qt5AccessibleWidget::minimumStepSize() const +{ + Reference<XAccessibleContext> xAc = getAccessibleContextImpl(); + if (!xAc.is()) + return QVariant(); + + Reference<XAccessibleValue> xValue(xAc, UNO_QUERY); + if (!xValue.is()) + return QVariant(); + double dMinStep = 0; + xValue->getMinimumIncrement() >>= dMinStep; + return QVariant(dMinStep); +} + QVariant Qt5AccessibleWidget::minimumValue() const { Reference<XAccessibleContext> xAc = getAccessibleContextImpl(); @@ -1117,6 +1132,7 @@ QVariant Qt5AccessibleWidget::minimumValue() const xValue->getMinimumValue() >>= aDouble; return QVariant(aDouble); } + void Qt5AccessibleWidget::setCurrentValue(const QVariant& value) { Reference<XAccessibleContext> xAc = getAccessibleContextImpl(); |