winaccessibility/source/service/AccComponentEventListener.cxx |    1 +
 winaccessibility/source/service/AccObjectWinManager.cxx       |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 555eda2285aa727e0a67df85685f8c3ae5a114af
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Mon Sep 9 15:10:05 2024 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Mon Sep 9 19:30:31 2024 +0200

    wina11y: Send IA2_EVENT_TEXT_UPDATED when text changes
    
    When the text changes, don't only send an
    MSAA/IAccessible `EVENT_OBJECT_VALUECHANGE` [1]
    event, but also an IAccessible2 `IA2_EVENT_TEXT_UPDATED` [2]
    event in the Windows a11y bridge.
    
    As described at [2]:
    
    > This event indicates general text changes, i.e. changes to
    > text that are exposed through the IAccessibleText interface.
    
    This e.g. makes that event type be sent when the value/text in
    one of the editable combobox in Writer's "Formatting" toolbar
    changes, e.g. the font size, which exposes its current text
    via the IAccessibleText interface.
    
    [1] https://learn.microsoft.com/en-us/windows/win32/winauto/event-constants
    [2] 
https://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/_accessible_event_i_d_8idl.html#ae26846b6d521727ab696d20c3f43c0b5af9d3d9355e2cfd10b126d21513241609
    
    Change-Id: I83d3f2299c59bd9da4246723f99d1c55a351e6d8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173080
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/winaccessibility/source/service/AccComponentEventListener.cxx 
b/winaccessibility/source/service/AccComponentEventListener.cxx
index a5e73bc208a1..8166d8f83535 100644
--- a/winaccessibility/source/service/AccComponentEventListener.cxx
+++ b/winaccessibility/source/service/AccComponentEventListener.cxx
@@ -114,6 +114,7 @@ void AccComponentEventListener::HandleTextChangedEvent(Any, 
Any newValue)
 {
     m_rObjManager.SetValue(m_xAccessible.get(), newValue);
     m_rObjManager.NotifyAccEvent(m_xAccessible.get(), 
UnoMSAAEvent::OBJECT_VALUECHANGE);
+    m_rObjManager.NotifyAccEvent(m_xAccessible.get(), 
UnoMSAAEvent::OBJECT_TEXTCHANGE);
 }
 
 /**
commit 8cd08e0fb0d6a5fccfad6fbeb08b92b3429d49cb
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Mon Sep 9 15:07:23 2024 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Mon Sep 9 19:30:21 2024 +0200

    wina11y: Replace deprecated IA2_EVENT_TEXT_CHANGED
    
    Send `IA2_EVENT_TEXT_UPDATED instead of the deprecated
    `IA2_EVENT_TEXT_CHANGED` event. Quoting from the
    IAccessible 2 doc [1]:
    
    > IA2_EVENT_TEXT_CHANGED: Deprecated. This event is
    > equivalent to IA2_EVENT_TEXT_UPDATED.
    
    [1] 
https://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/_accessible_event_i_d_8idl.html#ae26846b6d521727ab696d20c3f43c0b5af9d3d9355e2cfd10b126d21513241609
    
    Change-Id: Iec1ba33ba4591c7608438dfdf7ac597e1746fc52
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173079
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Tested-by: Jenkins

diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx 
b/winaccessibility/source/service/AccObjectWinManager.cxx
index 244983cdac75..85804c9a59d6 100644
--- a/winaccessibility/source/service/AccObjectWinManager.cxx
+++ b/winaccessibility/source/service/AccObjectWinManager.cxx
@@ -244,7 +244,7 @@ bool AccObjectWinManager::NotifyAccEvent(XAccessible* 
pXAcc, UnoMSAAEvent eEvent
         NotifyWinEvent( IA2_EVENT_TEXT_CARET_MOVED,hAcc, OBJID_CLIENT,dChildID 
 );
         break;
     case UnoMSAAEvent::OBJECT_TEXTCHANGE:
-        NotifyWinEvent( IA2_EVENT_TEXT_CHANGED,hAcc, OBJID_CLIENT,dChildID  );
+        NotifyWinEvent(IA2_EVENT_TEXT_UPDATED, hAcc, OBJID_CLIENT, dChildID);
         break;
     case UnoMSAAEvent::ACTIVE_DESCENDANT_CHANGED:
         UpdateAccFocus(pXAcc);

Reply via email to