summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2021-07-28 11:26:16 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2021-07-28 15:45:28 +0200
commitb5ada12ffd0b6b8677430fce117c4c1e38cc9159 (patch)
treea96fd46a243216c2d9a1a2b98f88a5e6cfa7a023 /sc
parent349a8801b9ee98f4f9ee1d35f7d28e17baedf7cc (diff)
a11y: Add XAccessibleValue::getMinimumIncrement method
Add a method 'getMinimumIncrement' to the XAccessibleValue interface. The method returns the minimal increment by which the value represented by the object can be adjusted. The main motivation is to expose this to AT-SPI, so it can be retrieved e.g. by libatspi's 'atspi_value_get_minimum_increment' function [1], s. the note in Change-Id: I8af326c2d24c1801147a56ea2e2a886ab42ac634 "a11y: Expose FormattedField as spinbox" for more details. The implementation relevant for the 'FormattedField' class is in 'SVTXAccessibleNumericField::getMinimumIncrement', which returns the spin size. While at it, also move the comment in sw/source/core/access/acccell.hxx mentioning what methods are overriden for the 'XAccessibleValue' interface to the right place. [1] https://developer.gnome.org/libatspi/stable/libatspi-atspi-value.html#atspi-value-get-minimum-increment Change-Id: Ie148a4e1cedbdbb5964f8565c81611d3480465cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119596 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/Accessibility/AccessibleCellBase.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx6
-rw-r--r--sc/source/ui/inc/AccessibleCellBase.hxx3
-rw-r--r--sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx1
4 files changed, 16 insertions, 0 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleCellBase.cxx b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
index 5d7e1d2c612c..03ecf65af241 100644
--- a/sc/source/ui/Accessibility/AccessibleCellBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
@@ -259,6 +259,12 @@ uno::Any SAL_CALL
return uno::Any(-DBL_MAX);
}
+uno::Any SAL_CALL
+ ScAccessibleCellBase::getMinimumIncrement( )
+{
+ return uno::Any();
+}
+
//===== XServiceInfo ====================================================
OUString SAL_CALL ScAccessibleCellBase::getImplementationName()
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
index 8a009fada4db..4a3292360808 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
@@ -167,6 +167,12 @@ uno::Any SAL_CALL ScAccessiblePreviewHeaderCell::getMinimumValue()
return uno::Any(0.0);
}
+uno::Any SAL_CALL ScAccessiblePreviewHeaderCell::getMinimumIncrement()
+{
+ // value can't be changed, s. 'setCurrentValue'
+ return uno::Any();
+}
+
//===== XAccessibleComponent ============================================
uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewHeaderCell::getAccessibleAtPoint( const awt::Point& rPoint )
diff --git a/sc/source/ui/inc/AccessibleCellBase.hxx b/sc/source/ui/inc/AccessibleCellBase.hxx
index 6461501b9843..4779c66dd363 100644
--- a/sc/source/ui/inc/AccessibleCellBase.hxx
+++ b/sc/source/ui/inc/AccessibleCellBase.hxx
@@ -89,6 +89,9 @@ public:
virtual css::uno::Any SAL_CALL
getMinimumValue( ) override;
+ virtual css::uno::Any SAL_CALL
+ getMinimumIncrement( ) override;
+
///===== XServiceInfo ====================================================
/** Returns an identifier for the implementation of this object.
diff --git a/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx b/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx
index bd762c4ab096..57612acfc428 100644
--- a/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx
+++ b/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx
@@ -72,6 +72,7 @@ public:
virtual sal_Bool SAL_CALL setCurrentValue( const css::uno::Any& aNumber ) override;
virtual css::uno::Any SAL_CALL getMaximumValue() override;
virtual css::uno::Any SAL_CALL getMinimumValue() override;
+ virtual css::uno::Any SAL_CALL getMinimumIncrement() override;
//===== XAccessibleComponent ============================================