diff --git a/accessibility/inc/standard/svtaccessiblenumericfield.hxx b/accessibility/inc/standard/svtaccessiblenumericfield.hxx index 3537b9d6ef1d..29225a5c6072 100644 --- a/accessibility/inc/standard/svtaccessiblenumericfield.hxx +++ b/accessibility/inc/standard/svtaccessiblenumericfield.hxx @@ -20,6 +20,8 @@ #pragma once #include +#include + #include #include @@ -30,6 +32,8 @@ class SVTXAccessibleNumericField final public: SVTXAccessibleNumericField(VCLXWindow* pVCLXindow); + virtual void ProcessWindowEvent(const VclWindowEvent& rVclWindowEvent) override; + // XAccessibleContext virtual sal_Int16 SAL_CALL getAccessibleRole() override; diff --git a/accessibility/source/standard/svtaccessiblenumericfield.cxx b/accessibility/source/standard/svtaccessiblenumericfield.cxx index 2862a3a2b670..f3192d4212f0 100644 --- a/accessibility/source/standard/svtaccessiblenumericfield.cxx +++ b/accessibility/source/standard/svtaccessiblenumericfield.cxx @@ -21,6 +21,7 @@ #include #include +#include #include using namespace ::com::sun::star::accessibility; @@ -31,6 +32,17 @@ SVTXAccessibleNumericField::SVTXAccessibleNumericField(VCLXWindow* pVCLWindow) { } +void SVTXAccessibleNumericField::ProcessWindowEvent(const VclWindowEvent& rVclWindowEvent) +{ + VCLXAccessibleEdit::ProcessWindowEvent(rVclWindowEvent); + + if (rVclWindowEvent.GetId() == VclEventId::EditModify) + { + css::uno::Any aNewValue = getCurrentValue(); + NotifyAccessibleEvent(AccessibleEventId::VALUE_CHANGED, css::uno::Any(), aNewValue); + } +} + sal_Int16 SVTXAccessibleNumericField::getAccessibleRole() { return AccessibleRole::SPIN_BOX; } css::uno::Any SAL_CALL SVTXAccessibleNumericField::getCurrentValue()