[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - winaccessibility/source

2023-08-04 Thread Michael Weghorn (via logerrit)
 winaccessibility/source/UAccCOM/AccTableCell.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1019104d9b2754aa8efaadb4aef046e732189b9b
Author: Michael Weghorn 
AuthorDate: Thu Aug 3 15:48:48 2023 +0100
Commit: Michael Stahl 
CommitDate: Fri Aug 4 10:37:43 2023 +0200

tdf#156473 wina11y: Fix invalid write due to row/col mismatch

With the grid control now reporting row/column headers
due to the previous tdf#156473-related commits, this
copy-paste mistake in

commit 8a4271e168f70f9147b567189c1770a243e7fcb1
Author: Michael Weghorn 
Date:   Fri Aug 5 09:49:02 2022 +0100

wina11y: Implement IAccessibleTableCell::get{column,row}HeaderCells

was now causing hard to debug crashes when moving around
in the table from the tdf#156473 sample macro with
the NVDA screen reader running on Windows.

Change-Id: I9fa30c1181d0fd21a85a73fd660c49667850d82b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155311
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
(cherry picked from commit 2b30d37bd555188733a006e1a5796461ab11d326)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155297
Reviewed-by: Michael Stahl 

diff --git a/winaccessibility/source/UAccCOM/AccTableCell.cxx 
b/winaccessibility/source/UAccCOM/AccTableCell.cxx
index 1b126404456a..0a04683ac109 100644
--- a/winaccessibility/source/UAccCOM/AccTableCell.cxx
+++ b/winaccessibility/source/UAccCOM/AccTableCell.cxx
@@ -215,7 +215,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP 
CAccTableCell::get_rowHeaderCells(IUnknown***
 assert(bOK && "Couldn't retrieve IAccessible object for cell.");
 
 pIAccessible->AddRef();
-(*cellAccessibles)[nRow] = pIAccessible;
+(*cellAccessibles)[nCol] = pIAccessible;
 }
 return S_OK;
 }


[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - winaccessibility/source

2023-03-08 Thread Michael Weghorn (via logerrit)
 winaccessibility/source/UAccCOM/MAccessible.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit f7ae8fb0c612988a308b16284ce659e860e7ad99
Author: Michael Weghorn 
AuthorDate: Tue Mar 7 10:35:38 2023 +
Commit: Michael Stahl 
CommitDate: Wed Mar 8 08:57:27 2023 +

tdf#154039 wina11y: Increase refcount for returned COM interface

The reference counter for the IUnknown interface
of the COM object needs to be increased in
`CMAccessible::get_accSelection` as well,
not just in the called `CEnumVariant::Next`,
because calling VariantClear` on the temporary
variant afterwards decreases the ref count again.

Regression from

commit 00c0ee8cf0fac0c933c5ae600e99a64b1c7d4397
Author: Michael Weghorn 
Date:   Mon Jan 31 07:41:14 2022 +

tdf#147083 wina11y: Return a11y object instead of child ID

Change-Id: Id968c3d80b38961b836fbb1a9bd6dfeefdff813f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148393
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
(cherry picked from commit 38e2dde00da0207c5f7157bb427a006d32dfeb5b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148399
Reviewed-by: Michael Stahl 

diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx 
b/winaccessibility/source/UAccCOM/MAccessible.cxx
index cf53ec077973..7579d7ee1271 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -848,6 +848,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP 
CMAccessible::get_accSelection(VARIANT *pvarCh
 return S_FALSE;
 pvarChildren->vt = VT_DISPATCH;
 pvarChildren->pdispVal = varTmp[0].pdispVal;
+pvarChildren->pdispVal->AddRef();
 VariantClear([0]);
 m_pEnumVar->Reset();
 break;