[Libreoffice-commits] core.git: 2 commits - winaccessibility/inc winaccessibility/source

2023-08-09 Thread Michael Weghorn (via logerrit)
 winaccessibility/inc/AccObjectWinManager.hxx|3 
 winaccessibility/source/UAccCOM/AccActionBase.cxx   |4 
 winaccessibility/source/UAccCOM/AccComponentBase.cxx|   10 -
 winaccessibility/source/UAccCOM/AccEditableText.cxx |3 
 winaccessibility/source/UAccCOM/AccHyperLink.cxx|   13 --
 winaccessibility/source/UAccCOM/AccHypertext.cxx|9 -
 winaccessibility/source/UAccCOM/AccImage.cxx|1 
 winaccessibility/source/UAccCOM/AccRelation.cxx |9 -
 winaccessibility/source/UAccCOM/AccTable.cxx|   65 +-
 winaccessibility/source/UAccCOM/AccTableCell.cxx|   23 +--
 winaccessibility/source/UAccCOM/AccTextBase.cxx |   32 ++---
 winaccessibility/source/UAccCOM/EnumVariant.cxx |   11 -
 winaccessibility/source/UAccCOM/MAccessible.cxx |   95 ++--
 winaccessibility/source/UAccCOM/MAccessible.h   |3 
 winaccessibility/source/service/AccObjectWinManager.cxx |   19 ---
 15 files changed, 97 insertions(+), 203 deletions(-)

New commits:
commit 1ba5f6682c2eaf46cbe6447125aaed5f87edeb34
Author: Michael Weghorn 
AuthorDate: Wed Aug 9 10:35:23 2023 +0100
Commit: Michael Weghorn 
CommitDate: Wed Aug 9 15:45:49 2023 +0200

wina11y: Drop "#CHECK#" comments

... and "#CHECK XInterface#" comments;
it's obvious that this is what the next lines do.

Change-Id: I09234d1a2f5c58cfab1580f188229d28d27fc402
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155506
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/winaccessibility/source/UAccCOM/AccActionBase.cxx 
b/winaccessibility/source/UAccCOM/AccActionBase.cxx
index 3062e96a855c..70940aa31b1e 100644
--- a/winaccessibility/source/UAccCOM/AccActionBase.cxx
+++ b/winaccessibility/source/UAccCOM/AccActionBase.cxx
@@ -60,7 +60,6 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP 
CAccActionBase::nActions(/*[out,retval]*/long*
 
 try {
 
-// #CHECK#
 if( pRXAct.is() && nActions != nullptr )
 {
 *nActions = GetXInterface()->getAccessibleActionCount();
@@ -105,16 +104,13 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP 
CAccActionBase::get_description(long actionInd
 
 try {
 
-// #CHECK#
 if(description == nullptr)
 return E_INVALIDARG;
 
-// #CHECK XInterface#
 if(!pRXAct.is())
 return E_FAIL;
 
 OUString ouStr = 
GetXInterface()->getAccessibleActionDescription(actionIndex);
-// #CHECK#
 
 SysFreeString(*description);
 *description = SysAllocString(o3tl::toW(ouStr.getStr()));
diff --git a/winaccessibility/source/UAccCOM/AccComponentBase.cxx 
b/winaccessibility/source/UAccCOM/AccComponentBase.cxx
index ed44c2c93d17..1cd6cdc1c8ac 100644
--- a/winaccessibility/source/UAccCOM/AccComponentBase.cxx
+++ b/winaccessibility/source/UAccCOM/AccComponentBase.cxx
@@ -47,7 +47,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP 
CAccComponentBase::get_locationInParent(long*
 {
 if (x == nullptr || y == nullptr)
 return E_INVALIDARG;
-// #CHECK XInterface#
+
 if (!pRXComp.is())
 return E_FAIL;
 
@@ -77,7 +77,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP 
CAccComponentBase::get_locationOnScreen(long*
 {
 if (x == nullptr || y == nullptr)
 return E_INVALIDARG;
-// #CHECK XInterface#
+
 if (!pRXComp.is())
 return E_FAIL;
 
@@ -105,7 +105,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP 
CAccComponentBase::grabFocus(boolean* success)
 {
 if (success == nullptr)
 return E_INVALIDARG;
-// #CHECK XInterface#
+
 if (!pRXComp.is())
 {
 return E_FAIL;
@@ -134,7 +134,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP 
CAccComponentBase::get_foreground(IA2Color* fo
 {
 if (foreground == nullptr)
 return E_INVALIDARG;
-// #CHECK XInterface#
+
 if (!pRXComp.is())
 {
 return E_FAIL;
@@ -162,7 +162,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP 
CAccComponentBase::get_background(IA2Color* ba
 {
 if (background == nullptr)
 return E_INVALIDARG;
-// #CHECK XInterface#
+
 if (!pRXComp.is())
 {
 return E_FAIL;
diff --git a/winaccessibility/source/UAccCOM/AccEditableText.cxx 
b/winaccessibility/source/UAccCOM/AccEditableText.cxx
index 3dd1883b9fb3..212546e12ee0 100644
--- a/winaccessibility/source/UAccCOM/AccEditableText.cxx
+++ b/winaccessibility/source/UAccCOM/AccEditableText.cxx
@@ -54,7 +54,6 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP 
CAccEditableText::copyText(long startOffset, l
 
 try {
 
-// #CHECK XInterface#
 if(!pRXEdtTxt.is())
 {
 return E_FAIL;
@@ -182,7 +181,6 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP 
CAccEditableText::replaceText(long startOffset
 
 try {
 
-// #CHECK#
 if (text == nullptr)
 return E_INVALIDARG;
 if( !pRXEdtTxt.is() )
@@ -211,7 +209,6 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP 

[Libreoffice-commits] core.git: 2 commits - winaccessibility/inc winaccessibility/source

2023-08-01 Thread Michael Weghorn (via logerrit)
 winaccessibility/inc/AccContainerEventListener.hxx|4 
 winaccessibility/inc/AccDescendantManagerEventListener.hxx|4 
 winaccessibility/inc/AccDialogEventListener.hxx   |3 
 winaccessibility/inc/AccEventListener.hxx |2 
 winaccessibility/inc/AccFrameEventListener.hxx|2 
 winaccessibility/inc/AccMenuEventListener.hxx |3 
 winaccessibility/inc/AccWindowEventListener.hxx   |3 
 winaccessibility/source/service/AccContainerEventListener.cxx |   44 
--
 winaccessibility/source/service/AccDescendantManagerEventListener.cxx |   40 
-
 winaccessibility/source/service/AccDialogEventListener.cxx|   40 
-
 winaccessibility/source/service/AccEventListener.cxx  |   34 
+++
 winaccessibility/source/service/AccFrameEventListener.cxx |   19 

 winaccessibility/source/service/AccMenuEventListener.cxx  |   41 
-
 winaccessibility/source/service/AccWindowEventListener.cxx|   38 

 14 files changed, 37 insertions(+), 240 deletions(-)

New commits:
commit f9631765c9dfd805ae486a94eacb69d307c9eef1
Author: Michael Weghorn 
AuthorDate: Tue Aug 1 09:35:48 2023 +0100
Commit: Michael Weghorn 
CommitDate: Tue Aug 1 13:14:46 2023 +0200

wina11y: Drop/Clean up CHILD event handling in subclasses

Now that Change-Id I62ab32342ef67c770ced9f0d2be867dc9355bd4a
("tdf#156561 wina11y: Handle CHILD event") has implemented
handling for the CHILD event in `AccEventListener`,
drop the overrides in child classes that effectively
do the same.

For the case that a new child gets added,
`AccFrameEventListener::HandleChildChangedEvent`
also passes the HWND, so leave that and only
forward to the base class for the other case.

Change-Id: I68d836abedbf3563df84187d56851820c043866f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155127
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/winaccessibility/inc/AccContainerEventListener.hxx 
b/winaccessibility/inc/AccContainerEventListener.hxx
index cf1cdb2157c4..0ce0c217548a 100644
--- a/winaccessibility/inc/AccContainerEventListener.hxx
+++ b/winaccessibility/inc/AccContainerEventListener.hxx
@@ -45,10 +45,6 @@ public:
 //AccessibleEventListener
 virtual void SAL_CALL notifyEvent( const 
css::accessibility::AccessibleEventObject& aEvent ) override;
 
-//for child changed event
-virtual void HandleChildChangedEvent(
-css::uno::Any oldValue, css::uno::Any newValue) override;
-
 //for selection changed event
 virtual void HandleSelectionChangedEvent(
 const css::uno::Any , const css::uno::Any );
diff --git a/winaccessibility/inc/AccDescendantManagerEventListener.hxx 
b/winaccessibility/inc/AccDescendantManagerEventListener.hxx
index 0f0e30ed3af1..4cae3c808dd0 100644
--- a/winaccessibility/inc/AccDescendantManagerEventListener.hxx
+++ b/winaccessibility/inc/AccDescendantManagerEventListener.hxx
@@ -49,10 +49,6 @@ public:
 virtual void HandleSelectionChangedEvent(
 css::uno::Any oldValue, css::uno::Any newValue);
 
-//for child changed event
-virtual void HandleChildChangedEvent(
-css::uno::Any oldValue, css::uno::Any newValue) override;
-
 virtual void HandleChildChangedNoFocusEvent(
 css::uno::Any oldValue, css::uno::Any newValue);
 
diff --git a/winaccessibility/inc/AccDialogEventListener.hxx 
b/winaccessibility/inc/AccDialogEventListener.hxx
index 49482474f811..f2d7ff9a0005 100644
--- a/winaccessibility/inc/AccDialogEventListener.hxx
+++ b/winaccessibility/inc/AccDialogEventListener.hxx
@@ -40,9 +40,6 @@ public:
 virtual void SAL_CALL
 notifyEvent(const css::accessibility::AccessibleEventObject& aEvent) 
override;
 
-//for child changed event
-virtual void HandleChildChangedEvent(css::uno::Any oldValue, css::uno::Any 
newValue) override;
-
 //state changed
 virtual void SetComponentState(sal_Int64 state, bool enable) override;
 };
diff --git a/winaccessibility/inc/AccMenuEventListener.hxx 
b/winaccessibility/inc/AccMenuEventListener.hxx
index 93c9f0f2f867..354d7166029d 100644
--- a/winaccessibility/inc/AccMenuEventListener.hxx
+++ b/winaccessibility/inc/AccMenuEventListener.hxx
@@ -40,9 +40,6 @@ public:
 virtual void SAL_CALL
 notifyEvent(const css::accessibility::AccessibleEventObject& aEvent) 
override;
 
-//for child changed event
-virtual void HandleChildChangedEvent(css::uno::Any oldValue, css::uno::Any 
newValue) override;
-
 //for selection changed event
 virtual void HandleSelectionChangedEventNoArgs();
 
diff --git a/winaccessibility/inc/AccWindowEventListener.hxx 
b/winaccessibility/inc/AccWindowEventListener.hxx
index 6fb20892813b..dfc3e2756b2e 100644
--- 

[Libreoffice-commits] core.git: 2 commits - winaccessibility/inc winaccessibility/source

2022-08-31 Thread Michael Weghorn (via logerrit)
 winaccessibility/inc/AccObject.hxx  |4 
 winaccessibility/inc/AccObjectWinManager.hxx|1 
 winaccessibility/source/service/AccObject.cxx   |   15 ---
 winaccessibility/source/service/AccObjectWinManager.cxx |   79 
 4 files changed, 99 deletions(-)

New commits:
commit 7d873ed7043c4f7d671d443bcf92369b5fe37224
Author: Michael Weghorn 
AuthorDate: Wed Aug 31 16:06:20 2022 +0100
Commit: Michael Weghorn 
CommitDate: Wed Aug 31 23:38:11 2022 +0200

wina11y: Drop unused member and methods related to selection

Those were only used by
`AccObjectWinManager::UpdateAccSelection`,
which has been dropped in
Change-Id I49bfddb636721d9142a88b7ce1eb3ee3a2f9c695
("wina11y: Drop unused AccObjectWinManager::UpdateAccSelection").

Change-Id: I11d1ad3f01929a68e341f910ec6382f91227e3c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139124
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/winaccessibility/inc/AccObject.hxx 
b/winaccessibility/inc/AccObject.hxx
index 0b34f076b5d6..707d307242bc 100644
--- a/winaccessibility/inc/AccObject.hxx
+++ b/winaccessibility/inc/AccObject.hxx
@@ -48,7 +48,6 @@ class AccEventListener;
 class AccObjectManagerAgent;
 class AccObject;
 
-typedef std::map IAccSelectionList;
 typedef std::vector IAccChildList;
 
 
@@ -63,7 +62,6 @@ private:
 AccObject*  m_pParentObj;
 IAccChildList   m_childrenList;
 ::rtl::Reference  m_pListener;
-IAccSelectionList   m_selectionList;
 
 css::uno::Reference < css::accessibility::XAccessible > m_xAccRef;
 css::uno::Reference < css::accessibility::XAccessibleAction > 
m_xAccActionRef;
@@ -126,8 +124,6 @@ public:
 void  setFocus();
 void  unsetFocus();
 
-void  AddSelect(long index, AccObject* accObj);
-IAccSelectionList& GetSelection();
 void  setLocalizedResourceString();
 };
 
diff --git a/winaccessibility/source/service/AccObject.cxx 
b/winaccessibility/source/service/AccObject.cxx
index 7b3f1e6fc1db..1f7dc5df224d 100644
--- a/winaccessibility/source/service/AccObject.cxx
+++ b/winaccessibility/source/service/AccObject.cxx
@@ -953,21 +953,6 @@ bool AccObject::UpdateAccessibleInfoFromUnoToMSAA()
 return true;
 }
 
-/*
-   * Add a child selected element.
-   * @param pAccObj Child object pointer.
-   * @return
-   */
-void AccObject::AddSelect( long index, AccObject* accObj)
-{
-m_selectionList.emplace(index,accObj);
-}
-
-IAccSelectionList& AccObject::GetSelection()
-{
-return m_selectionList;
-}
-
 
 /**
* Set self to focus object in parent child list
commit 58649c1db48b888f7ce4946ca92895fa0bc63349
Author: Michael Weghorn 
AuthorDate: Wed Aug 31 15:50:36 2022 +0100
Commit: Michael Weghorn 
CommitDate: Wed Aug 31 23:37:56 2022 +0200

wina11y: Drop unused AccObjectWinManager::UpdateAccSelection

It was already unused when it was added in

commit a18bdb3bc05e761704cc345a66a9d642bc4f4a0a
Date:   Thu Nov 14 08:18:05 2013 +

Integrate branch of IAccessible2

`CMAccessible::get_accSelection` already queries
information on demand.

The dropped method looks like another one of the methods that
could be used for manual bookkeeping of information
instead of querying them from the underlying UNO
interfaces on demand. But retrieving them on demand
seems preferable, s.a. the commit message in

commit fcf4a26275d7503835f9aa23cb94938809840300
Author: Michael Weghorn 
Date:   Wed Jan 5 13:41:53 2022 +
tdf#146306 wina11y: Retrieve accessible desc on demand

> Querying up-to-date values from the underlying
> UNO interfaces on demand instead of doing extra
> manual bookkeeping in the winaccessibility code
> may be possible for more a11y attributes in addition
> to the accessible description handled in this commit,
> but each one will have to be looked at separately.

Change-Id: I49bfddb636721d9142a88b7ce1eb3ee3a2f9c695
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139123
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/winaccessibility/inc/AccObjectWinManager.hxx 
b/winaccessibility/inc/AccObjectWinManager.hxx
index f1adfb0dc9d0..6ca9319f82a0 100644
--- a/winaccessibility/inc/AccObjectWinManager.hxx
+++ b/winaccessibility/inc/AccObjectWinManager.hxx
@@ -96,7 +96,6 @@ private:
 static void InsertAccChildNode(AccObject* pCurObj,AccObject* 
pParentObj,HWND pWnd);
 static void DeleteAccChildNode(AccObject* pChild);
 void   DeleteFromHwndXAcc(css::accessibility::XAccessible const * 
pXAcc );
-int  UpdateAccSelection(css::accessibility::XAccessible* pXAcc);
 
 ::rtl::Reference CreateAccEventListener(
 css::accessibility::XAccessible* pXAcc);
diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx 

[Libreoffice-commits] core.git: 2 commits - winaccessibility/inc winaccessibility/source

2022-02-28 Thread Michael Weghorn (via logerrit)
 winaccessibility/inc/AccObjectManagerAgent.hxx|2 
 winaccessibility/inc/AccObjectWinManager.hxx  |2 
 winaccessibility/source/service/AccComponentEventListener.cxx |4 
 winaccessibility/source/service/AccObjectManagerAgent.cxx |4 
 winaccessibility/source/service/AccObjectWinManager.cxx   |  207 --
 5 files changed, 109 insertions(+), 110 deletions(-)

New commits:
commit 3cde1fe16965d2b976c6c1210e81f17ae352b79f
Author: Michael Weghorn 
AuthorDate: Mon Feb 28 11:43:13 2022 +
Commit: Michael Weghorn 
CommitDate: Mon Feb 28 17:43:19 2022 +0100

wina11y: Unify how AccessibleRole is referred to here

Using

using namespace com::sun::star::accessibility::AccessibleRole;

and then

case /*AccessibleRole::*/DIALOG

looks a bit odd. Drop the `using` directive and
consistently use `AccessibleRole::` across
this source file when referring to `AccessibleRole`s.

Change-Id: If4b295548468067c65afcd1a216d29cad9e0c213
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130699
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx 
b/winaccessibility/source/service/AccObjectWinManager.cxx
index d24154769b05..13b6bd640bf2 100644
--- a/winaccessibility/source/service/AccObjectWinManager.cxx
+++ b/winaccessibility/source/service/AccObjectWinManager.cxx
@@ -46,7 +46,6 @@
 
 
 using namespace com::sun::star::accessibility;
-using namespace com::sun::star::accessibility::AccessibleRole;
 using namespace com::sun::star::accessibility::AccessibleStateType;
 using namespace com::sun::star::uno;
 
@@ -530,10 +529,10 @@ void AccObjectWinManager::DeleteAccObj( XAccessible* 
pXAcc )
 assert(i != 0);
 (void) i;
 DeleteFromHwndXAcc(pXAcc);
-if( accObj.GetRole() == DOCUMENT ||
-accObj.GetRole() == DOCUMENT_PRESENTATION ||
-accObj.GetRole() == DOCUMENT_SPREADSHEET ||
-accObj.GetRole() == DOCUMENT_TEXT )
+if (accObj.GetRole() == AccessibleRole::DOCUMENT ||
+accObj.GetRole() == AccessibleRole::DOCUMENT_PRESENTATION ||
+accObj.GetRole() == AccessibleRole::DOCUMENT_SPREADSHEET ||
+accObj.GetRole() == AccessibleRole::DOCUMENT_TEXT)
 {
 XHWNDDocList.erase(accObj.GetParentHWND());
 }
@@ -695,10 +694,10 @@ bool AccObjectWinManager::InsertAccObj( XAccessible* 
pXAcc,XAccessible* pParentX
 pObj.SetParentHWND( pWnd );
 
 //for file name support
-if( pObj.GetRole() == DOCUMENT ||
-pObj.GetRole() == DOCUMENT_PRESENTATION ||
-pObj.GetRole() == DOCUMENT_SPREADSHEET ||
-pObj.GetRole() == DOCUMENT_TEXT )
+if (pObj.GetRole() == AccessibleRole::DOCUMENT ||
+pObj.GetRole() == AccessibleRole::DOCUMENT_PRESENTATION ||
+pObj.GetRole() == AccessibleRole::DOCUMENT_SPREADSHEET ||
+pObj.GetRole() == AccessibleRole::DOCUMENT_TEXT)
 {
 XHWNDToDocumentHash::iterator aIter = XHWNDDocList.find(pWnd);
 if ( aIter != XHWNDDocList.end() )
@@ -765,94 +764,94 @@ AccObjectWinManager::CreateAccEventListener(XAccessible* 
pXAcc)
 {
 switch( xContext->getAccessibleRole() )
 {
-case /*AccessibleRole::*/DIALOG:
+case AccessibleRole::DIALOG:
 pRet = new AccDialogEventListener(pXAcc,pAgent);
 break;
-case /*AccessibleRole::*/FRAME:
+case AccessibleRole::FRAME:
 pRet = new AccFrameEventListener(pXAcc,pAgent);
 break;
-case /*AccessibleRole::*/WINDOW:
+case AccessibleRole::WINDOW:
 pRet = new AccWindowEventListener(pXAcc,pAgent);
 break;
-case /*AccessibleRole::*/ROOT_PANE:
+case AccessibleRole::ROOT_PANE:
 pRet = new AccFrameEventListener(pXAcc,pAgent);
 break;
 //Container
-case /*AccessibleRole::*/CANVAS:
-case /*AccessibleRole::*/COMBO_BOX:
-case /*AccessibleRole::*/DOCUMENT:
-case /*AccessibleRole::*/DOCUMENT_PRESENTATION:
-case /*AccessibleRole::*/DOCUMENT_SPREADSHEET:
-case /*AccessibleRole::*/DOCUMENT_TEXT:
-case /*AccessibleRole::*/END_NOTE:
-case /*AccessibleRole::*/FILLER:
-case /*AccessibleRole::*/FOOTNOTE:
-case /*AccessibleRole::*/FOOTER:
-case /*AccessibleRole::*/HEADER:
-case /*AccessibleRole::*/LAYERED_PANE:
-case /*AccessibleRole::*/MENU_BAR:
-case /*AccessibleRole::*/POPUP_MENU:
-case /*AccessibleRole::*/OPTION_PANE:
-case /*AccessibleRole::*/PAGE_TAB:
-case /*AccessibleRole::*/PAGE_TAB_LIST:
-case /*AccessibleRole::*/PANEL:
-case /*AccessibleRole::*/SCROLL_PANE:
-case /*AccessibleRole::*/SPLIT_PANE:
-case /*AccessibleRole::*/STATUS_BAR:
-case /*AccessibleRole::*/TABLE_CELL:
-case /*AccessibleRole::*/TOOL_BAR:
-   

[Libreoffice-commits] core.git: 2 commits - winaccessibility/inc winaccessibility/source

2022-01-06 Thread Michael Weghorn (via logerrit)
 winaccessibility/inc/AccObject.hxx  |1 -
 winaccessibility/inc/AccObjectWinManager.hxx|2 --
 winaccessibility/source/service/AccObject.cxx   |   12 
 winaccessibility/source/service/AccObjectWinManager.cxx |   13 -
 4 files changed, 28 deletions(-)

New commits:
commit fd787538797a182786ab7b1dfc041562b2e5073a
Author: Michael Weghorn 
AuthorDate: Wed Jan 5 14:18:15 2022 +
Commit: Michael Weghorn 
CommitDate: Thu Jan 6 10:10:38 2022 +0100

wina11y: Drop now unused AccObject::SetRole

Change-Id: I04db43ac49d7bc6ff42157cdd0c94087c454c981
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128009
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/winaccessibility/inc/AccObject.hxx 
b/winaccessibility/inc/AccObject.hxx
index 6da9d6621c5e..a255f36268fa 100644
--- a/winaccessibility/inc/AccObject.hxx
+++ b/winaccessibility/inc/AccObject.hxx
@@ -114,7 +114,6 @@ public:
 
 void  SetName( css::uno::Any newName);
 void  SetValue( css::uno::Any pAny );
-void  SetRole( short Role );
 
 short GetRole() const;
 
diff --git a/winaccessibility/source/service/AccObject.cxx 
b/winaccessibility/source/service/AccObject.cxx
index 781c58c82e71..cbda17fa3e77 100644
--- a/winaccessibility/source/service/AccObject.cxx
+++ b/winaccessibility/source/service/AccObject.cxx
@@ -485,18 +485,6 @@ void  AccObject::SetName( Any pAny)
 
 }
 
-/**
-   * Set role property via pAny
-   * @param Role New accessible role.
-   * @return
-   */
-void  AccObject::SetRole( short Role )
-{
-if( nullptr == m_pIMAcc )
-return ;
-m_pIMAcc->Put_XAccRole( Role );
-}
-
 /**
 * Get role property via pAny
 * @param
commit e60406b0873d9e73e84682248f234fca600a1a34
Author: Michael Weghorn 
AuthorDate: Wed Jan 5 14:14:18 2022 +
Commit: Michael Weghorn 
CommitDate: Thu Jan 6 10:10:25 2022 +0100

wina11y: Drop unused AccObjectWinManager::SetRole

Change-Id: Ic2d470a137e4d0c907f28e24c58ba19a937a8b4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128008
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/winaccessibility/inc/AccObjectWinManager.hxx 
b/winaccessibility/inc/AccObjectWinManager.hxx
index 911c83ea2a8f..813c1d8541fa 100644
--- a/winaccessibility/inc/AccObjectWinManager.hxx
+++ b/winaccessibility/inc/AccObjectWinManager.hxx
@@ -122,8 +122,6 @@ public:
 void  SetAccName( css::accessibility::XAccessible* pXAcc, css::uno::Any 
newName);
 void  UpdateAccName( css::accessibility::XAccessible* pXAcc );
 
-void  SetRole( css::accessibility::XAccessible* pXAcc, long Role );
-
 void  UpdateAccFocus( css::accessibility::XAccessible* newFocus );
 void  UpdateAction( css::accessibility::XAccessible* pXAcc );
 
diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx 
b/winaccessibility/source/service/AccObjectWinManager.cxx
index 69d8af6ee65a..341d108e1bff 100644
--- a/winaccessibility/source/service/AccObjectWinManager.cxx
+++ b/winaccessibility/source/service/AccObjectWinManager.cxx
@@ -977,19 +977,6 @@ void  AccObjectWinManager::SetAccName( XAccessible* pXAcc, 
Any newName)
 pAccObj->SetName( newName );
 }
 
-/**
-   * Set corresponding com object's role via XAccessible interface and new 
role.
-   * @param pXAcc XAccessible interface.
-   * @param Role new role
-   * @return
-   */
-void  AccObjectWinManager::SetRole( XAccessible* pXAcc, long Role )
-{
-AccObject* pAccObj = GetAccObjByXAcc( pXAcc );
-if( pAccObj )
-pAccObj->SetRole( static_cast(Role) );
-}
-
 /**
* Judge if a XAccessible object is a container object.
* @param pAccessible XAccessible interface.


[Libreoffice-commits] core.git: 2 commits - winaccessibility/inc winaccessibility/source

2022-01-06 Thread Michael Weghorn (via logerrit)
 winaccessibility/inc/AccObject.hxx  |2 
 winaccessibility/inc/AccObjectManagerAgent.hxx  |3 
 winaccessibility/inc/AccObjectWinManager.hxx|3 
 winaccessibility/source/UAccCOM/MAccessible.cxx |   43 
++
 winaccessibility/source/UAccCOM/MAccessible.h   |2 
 winaccessibility/source/UAccCOMIDL/UAccCOM.idl  |1 
 winaccessibility/source/service/AccContainerEventListener.cxx   |2 
 winaccessibility/source/service/AccEventListener.cxx|1 
 winaccessibility/source/service/AccObject.cxx   |   32 
---
 winaccessibility/source/service/AccObjectContainerEventListener.cxx |1 
 winaccessibility/source/service/AccObjectManagerAgent.cxx   |   18 
 winaccessibility/source/service/AccObjectWinManager.cxx |   20 
 12 files changed, 9 insertions(+), 119 deletions(-)

New commits:
commit fcf4a26275d7503835f9aa23cb94938809840300
Author: Michael Weghorn 
AuthorDate: Wed Jan 5 13:41:53 2022 +
Commit: Michael Weghorn 
CommitDate: Thu Jan 6 10:10:11 2022 +0100

tdf#146306 wina11y: Retrieve accessible desc on demand

Adapt 'MAccessible::get_accDescription' to directly
retrieve the accessible description on demand via the
corresponding XAccessible, rather than keeping
track of it in a class member.

This simplifies the handling and makes it
unnecessary to "manually" update the description
on 'accessibility::AccessibleEventId::DESCRIPTION_CHANGED'
events, since the new value will
be queried next time it is needed anyway.

This also fixes the problem that a significant
amount of time was spent generating accessible
descriptions for all newly inserted a11y objects when
entering values into Calc cells with the NVDA
screen reader in use, resulting in several
seconds of delay.

Querying up-to-date values from the underlying
UNO interfaces on demand instead of doing extra
manual bookkeeping in the winaccessibility code
may be possible for more a11y attributes in addition
to the accessible description handled in this commit,
but each one will have to be looked at separately.

Change-Id: I57f4c523ca8b10afad3f9c347c8ff5e9420ad968
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128006
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/winaccessibility/inc/AccObject.hxx 
b/winaccessibility/inc/AccObject.hxx
index 2a246ce43b29..6da9d6621c5e 100644
--- a/winaccessibility/inc/AccObject.hxx
+++ b/winaccessibility/inc/AccObject.hxx
@@ -114,7 +114,6 @@ public:
 
 void  SetName( css::uno::Any newName);
 void  SetValue( css::uno::Any pAny );
-void  SetDescription( css::uno::Any newDesc );
 void  SetRole( short Role );
 
 short GetRole() const;
@@ -123,7 +122,6 @@ public:
 void  UpdateName();
 void  UpdateValue();
 void  UpdateAction();
-void  UpdateDescription();
 void  UpdateValidWindow();
 void  UpdateLocation();
 
diff --git a/winaccessibility/inc/AccObjectManagerAgent.hxx 
b/winaccessibility/inc/AccObjectManagerAgent.hxx
index 579a785b41bb..a0f3daec579b 100644
--- a/winaccessibility/inc/AccObjectManagerAgent.hxx
+++ b/winaccessibility/inc/AccObjectManagerAgent.hxx
@@ -76,9 +76,6 @@ public:
 void  UpdateAccName( css::accessibility::XAccessible* pXAcc, css::uno::Any 
newName);
 void  UpdateAccName( css::accessibility::XAccessible* pXAcc);
 
-void  UpdateDescription( css::accessibility::XAccessible* pXAcc, 
css::uno::Any newDesc );
-void  UpdateDescription( css::accessibility::XAccessible* pXAcc );
-
 void NotifyDestroy(css::accessibility::XAccessible* pXAcc);
 
 css::accessibility::XAccessible* GetParentXAccessible( 
css::accessibility::XAccessible* pXAcc );
diff --git a/winaccessibility/inc/AccObjectWinManager.hxx 
b/winaccessibility/inc/AccObjectWinManager.hxx
index 4f35668c56ef..911c83ea2a8f 100644
--- a/winaccessibility/inc/AccObjectWinManager.hxx
+++ b/winaccessibility/inc/AccObjectWinManager.hxx
@@ -122,9 +122,6 @@ public:
 void  SetAccName( css::accessibility::XAccessible* pXAcc, css::uno::Any 
newName);
 void  UpdateAccName( css::accessibility::XAccessible* pXAcc );
 
-void  SetDescription( css::accessibility::XAccessible* pXAcc, 
css::uno::Any newDesc );
-void UpdateDescription( css::accessibility::XAccessible* pXAcc );
-
 void  SetRole( css::accessibility::XAccessible* pXAcc, long Role );
 
 void  UpdateAccFocus( css::accessibility::XAccessible* newFocus );
diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx 
b/winaccessibility/source/UAccCOM/MAccessible.cxx
index 7437f8a586c9..0e3de1af1b53 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -200,7 +200,6 @@ m_pszValue(nullptr),
 

[Libreoffice-commits] core.git: 2 commits - winaccessibility/inc winaccessibility/source

2021-09-20 Thread Michael Weghorn (via logerrit)
 winaccessibility/inc/AccObject.hxx  |4 +---
 winaccessibility/source/UAccCOM/MAccessible.cxx |7 +++
 winaccessibility/source/UAccCOM/MAccessible.h   |2 +-
 winaccessibility/source/UAccCOMIDL/UAccCOM.idl  |2 +-
 winaccessibility/source/service/AccObject.cxx   |   10 ++
 winaccessibility/source/service/AccObjectWinManager.cxx |2 +-
 6 files changed, 9 insertions(+), 18 deletions(-)

New commits:
commit 85b4b15bb02f8d2fdbead0c836763621096b995e
Author: Michael Weghorn 
AuthorDate: Mon Sep 20 09:23:10 2021 +0100
Commit: Michael Weghorn 
CommitDate: Mon Sep 20 18:05:00 2021 +0200

wina11y: Drop bool param from CMAccessible::NotifyDestroy

... and 'AccObject::NotifyDestroy', respectively.

The only calling site calls it with 'true' as parameter
(and 'CMAccessible::NotifyDestroy' was calling
'm_xAccessible.clear()' regardless of what value the
passed param had anyway).

Change-Id: I08a24f79b50ec327ae461bd44ee6460a2d8145f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122343
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/winaccessibility/inc/AccObject.hxx 
b/winaccessibility/inc/AccObject.hxx
index bc689178c95c..2a246ce43b29 100644
--- a/winaccessibility/inc/AccObject.hxx
+++ b/winaccessibility/inc/AccObject.hxx
@@ -107,7 +107,7 @@ public:
 void DeleteChild( AccObject* pChild );
 AccObject* NextChild();
 
-void NotifyDestroy(bool bDestroy);
+void NotifyDestroy();
 
 void  DecreaseState(short xState );//call COM interface DecreaseState 
method
 void  IncreaseState( short xState );//call COM interface IncreaseState 
method
diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx 
b/winaccessibility/source/UAccCOM/MAccessible.cxx
index 2d62ec494bc7..8f69dcf01649 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -1364,15 +1364,14 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP 
CMAccessible::Put_XAccAgent(hyper pAgent)
 /**
 * When a UNO control disposing, it disposes its listeners,
 * then notify AccObject in bridge management, then notify
-* COM that the XAccessible is invalid,so set m_xAccessible as NULL
-* @paramisDestroy, true is it needs to be destroyed.
+* COM that the XAccessible is invalid, so set m_xAccessible as NULL
 * @return   S_OK if successful and E_FAIL if failure.
 */
-COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::NotifyDestroy(BOOL isDestroy)
+COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::NotifyDestroy()
 {
 // internal IMAccessible - no mutex meeded
 
-m_isDestroy = isDestroy;
+m_isDestroy = true;
 m_xAccessible.clear();
 return S_OK;
 }
diff --git a/winaccessibility/source/UAccCOM/MAccessible.h 
b/winaccessibility/source/UAccCOM/MAccessible.h
index 71296cfc2fda..224e59179d61 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.h
+++ b/winaccessibility/source/UAccCOM/MAccessible.h
@@ -147,7 +147,7 @@ public:
 STDMETHOD(Put_XAccWindowHandle)(HWND hwnd) override;
 STDMETHOD(Put_XAccChildID)(long dChildID) override;
 STDMETHOD(Put_XAccAgent)(hyper pAgent) override;
-STDMETHOD(NotifyDestroy)(BOOL isDestroy) override;
+STDMETHOD(NotifyDestroy)() override;
 STDMETHOD(Put_ActionDescription)( const OLECHAR* szAction) override;
 STDMETHOD(SetDefaultAction)(hyper pAction) override;
 STDMETHOD(GetUNOInterface)(hyper*) override;
diff --git a/winaccessibility/source/UAccCOMIDL/UAccCOM.idl 
b/winaccessibility/source/UAccCOMIDL/UAccCOM.idl
index 1a0705754114..da123ab7f972 100644
--- a/winaccessibility/source/UAccCOMIDL/UAccCOM.idl
+++ b/winaccessibility/source/UAccCOMIDL/UAccCOM.idl
@@ -49,7 +49,7 @@ import "defines.idl";
 [id(23), helpstring("method SetDefaultAction")] HRESULT 
SetDefaultAction(hyper pAction);
 [id(24), helpstring("method Put_ActionDescription")] HRESULT 
Put_ActionDescription( const OLECHAR* szAction);
 [id(25), helpstring("method Put_XAccAgent")] HRESULT 
Put_XAccAgent(hyper pAgent);
-[id(26), helpstring("method NotifyDestroy")] HRESULT 
NotifyDestroy(BOOL isDestroy);
+[id(26), helpstring("method NotifyDestroy")] HRESULT NotifyDestroy();
 [id(30), helpstring("method Get_XAccChildID")] HRESULT 
Get_XAccChildID([out,retval] long* childID);
 };
 [
diff --git a/winaccessibility/source/service/AccObject.cxx 
b/winaccessibility/source/service/AccObject.cxx
index 7d1adb27afd4..877d33cc0e37 100644
--- a/winaccessibility/source/service/AccObject.cxx
+++ b/winaccessibility/source/service/AccObject.cxx
@@ -1116,10 +1116,10 @@ void AccObject::GetExpandedState( sal_Bool* 
isExpandable, sal_Bool* isExpanded)
 }
 }
 
-void AccObject::NotifyDestroy(bool bDestroy)
+void AccObject::NotifyDestroy()
 {
 if(m_pIMAcc)
-m_pIMAcc->NotifyDestroy(bDestroy);
+m_pIMAcc->NotifyDestroy();
 }
 
 void AccObject::SetParentObj(AccObject* 

[Libreoffice-commits] core.git: 2 commits - winaccessibility/inc winaccessibility/source

2021-09-16 Thread Michael Weghorn (via logerrit)
 winaccessibility/inc/AccObjectManagerAgent.hxx|   11 +++
 winaccessibility/source/UAccCOM/MAccessible.cxx   |3 +--
 winaccessibility/source/service/AccFrameEventListener.cxx |3 +--
 winaccessibility/source/service/AccObjectManagerAgent.cxx |   14 ++
 winaccessibility/source/service/AccTopWindowListener.cxx  |6 ++
 5 files changed, 17 insertions(+), 20 deletions(-)

New commits:
commit 36be1ecdc8cc2ef36ff9db0ba8af78b4aeee774e
Author: Michael Weghorn 
AuthorDate: Thu Sep 16 14:57:53 2021 +0100
Commit: Michael Weghorn 
CommitDate: Fri Sep 17 07:05:46 2021 +0200

wina11y: Get rid of more HWND<->sal_Int64 casting

... by changing the first param for
AccObjectManagerAgent::SaveTopWindowHandle
to HWND.

Change-Id: Ia94bd95c49a64e63b1be332bd03e83a288707d80
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122204
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/winaccessibility/inc/AccObjectManagerAgent.hxx 
b/winaccessibility/inc/AccObjectManagerAgent.hxx
index c3e1ee78c387..e4e87be3dc3c 100644
--- a/winaccessibility/inc/AccObjectManagerAgent.hxx
+++ b/winaccessibility/inc/AccObjectManagerAgent.hxx
@@ -85,8 +85,7 @@ public:
 short GetParentRole(css::accessibility::XAccessible* pXAcc );
 bool IsContainer(css::accessibility::XAccessible* pXAcc);
 
-void SaveTopWindowHandle(sal_Int64 hWnd,
-css::accessibility::XAccessible* pXAcc);
+void SaveTopWindowHandle(HWND hWnd, css::accessibility::XAccessible* 
pXAcc);
 
 void UpdateChildState(css::accessibility::XAccessible* pXAcc);
 
diff --git a/winaccessibility/source/service/AccObjectManagerAgent.cxx 
b/winaccessibility/source/service/AccObjectManagerAgent.cxx
index 1e0c37729f31..ab909d495398 100644
--- a/winaccessibility/source/service/AccObjectManagerAgent.cxx
+++ b/winaccessibility/source/service/AccObjectManagerAgent.cxx
@@ -157,11 +157,10 @@ bool AccObjectManagerAgent::InsertAccObj(
* @return void
*/
 void
-AccObjectManagerAgent::SaveTopWindowHandle(sal_Int64 hWnd, XAccessible* pXAcc)
+AccObjectManagerAgent::SaveTopWindowHandle(HWND hWnd, XAccessible* pXAcc)
 {
 if( pWinManager )
-pWinManager->SaveTopWindowHandle(
-static_cast(reinterpret_cast(hWnd)), pXAcc);
+pWinManager->SaveTopWindowHandle(hWnd, pXAcc);
 }
 
 
diff --git a/winaccessibility/source/service/AccTopWindowListener.cxx 
b/winaccessibility/source/service/AccTopWindowListener.cxx
index 3c52d3280bd2..6ea78eb57c5b 100644
--- a/winaccessibility/source/service/AccTopWindowListener.cxx
+++ b/winaccessibility/source/service/AccTopWindowListener.cxx
@@ -65,8 +65,7 @@ void AccTopWindowListener::HandleWindowOpened( 
css::accessibility::XAccessible*
 //Only AccessibleContext exist, add all listeners
 if(pAccessibleContext != nullptr && systemdata != nullptr)
 {
-accManagerAgent.SaveTopWindowHandle(
-reinterpret_cast(systemdata->hWnd), pAccessible);
+accManagerAgent.SaveTopWindowHandle(systemdata->hWnd, pAccessible);
 
 AddAllListeners(pAccessible,nullptr,systemdata->hWnd);
 
commit 2a5da1609d9d39e5b2bd80bd6af80bebcb6c1fb9
Author: Michael Weghorn 
AuthorDate: Thu Sep 16 14:50:29 2021 +0100
Commit: Michael Weghorn 
CommitDate: Fri Sep 17 07:05:33 2021 +0200

wina11y: Avoid some casting between HWND and sal_Int64

... by changing the corresponding params for
AccObjectManagerAgent::InsertAccObj and
AccObjectManagerAgent::InsertChildrenAccObj
to HWND.

Change-Id: I598bac30d827ae9166bc21cb5e8dff88a5cc99bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122203
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/winaccessibility/inc/AccObjectManagerAgent.hxx 
b/winaccessibility/inc/AccObjectManagerAgent.hxx
index ea4b5837b74f..c3e1ee78c387 100644
--- a/winaccessibility/inc/AccObjectManagerAgent.hxx
+++ b/winaccessibility/inc/AccObjectManagerAgent.hxx
@@ -21,6 +21,10 @@
 
 #include 
 
+#include 
+#include 
+#include 
+
 #include 
 
 struct IMAccessible;
@@ -45,7 +49,7 @@ public:
 
 virtual bool InsertAccObj(css::accessibility::XAccessible* pXAcc,
   css::accessibility::XAccessible* pParentXAcc,
-  sal_Int64 pWnd=0);
+  HWND hWnd = 0);
 virtual void GetIAccessibleFromResID(long childID,IMAccessible**);
 virtual bool 
GetIAccessibleFromXAccessible(css::accessibility::XAccessible* pXAcc, 
IAccessible** ppIA);
 
@@ -55,7 +59,7 @@ public:
 bool NotifyAccEvent(short pEvent = 0, css::accessibility::XAccessible* 
pXAcc = nullptr);
 
 bool InsertChildrenAccObj(css::accessibility::XAccessible* pXAcc,
-  sal_Int64 pWnd=0);
+  HWND  hWnd = 0);
 void DeleteChildrenAccObj( css::accessibility::XAccessible* pXAcc );
 
 void  DecreaseState(