summaryrefslogtreecommitdiff
path: root/offapi/com/sun/star/ucb/XContentTransmitter.idl
blob: 89220f675802f35951800f6d4f17cac76525cc9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */
#ifndef __com_sun_star_ucb_XContentTransmitter_idl__
#define __com_sun_star_ucb_XContentTransmitter_idl__

#include <com/sun/star/uno/XInterface.idl>



module com { module sun { module star { module ucb {

/**
     @deprecated

     @version  1.0
     @author   Dirk Voelzke
     @see
*/

published interface XContentTransmitter: com::sun::star::uno::XInterface
{
    /**
    */
    void transmit( [in] string Source,
                            [in] string Destination,
                            [in] long   Flags );


};


}; }; }; };

#endif

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Michael Weghorn <m.weghorn@posteo.de> 2023-10-25tdf#135586 a11y: Make IAccessible2 an external and update itMichael Weghorn So far, there was an internal copy of the IAccessible2 IDL file added in 2013, and never updated since then (except for cosmetic changes like formatting and typo fixes), and therefore it e.g. doesn't have the `IA2_ROLE_BLOCK_QUOTE` role needed for tdf#135586. Drop the outdated internal copy and integrate an up to date upstream version (current git master) instead. Instead of duplicating things in an internal copy, switch to using the usual mechanism for externals. The IAccessible2 source contains separate .idl files for the different interfaces, while the previous interal copy was already the merged IDL file. Call the IAccessible2 `./concatidl.sh` script to generate the merged `ia2_api_all.idl` (s. external/IAccessible2/ExternalProject_IAccessible2.mk) and adapt the winaccessibility make files to use that version instead of the internal copy. (Add a dependency to the target that generates `ia2_api_all.idl`.) The tarball was generated from the master branch of the IAccessible2 git repo [1] as of commit 3d8c7f0b833453f761ded6b12d8be431507bfe0b (HEAD -> master, origin/master, origin/HEAD, mygithub/master) Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Oct 13 04:16:03 2023 +0300 Update no longer working links (#26) * Update link to Linux Foundation Trademark Policy * Update link to Object Attributes specification Signed-off-by: Michael Weghorn <m.weghorn@posteo.de> using this command: $ git archive -o ../IAccessible2-1.3+git20231013.3d8c7f0.tar.gz --prefix=IAccessible2-1.3+git20231013.3d8c7f0/ master Andrea Gelmini's typo fixes have been upstreamed in [2]. [1] https://github.com/LinuxA11y/IAccessible2 [2] https://github.com/LinuxA11y/IAccessible2/pull/21 Change-Id: I9f19ff55694da5d3a9a8750be8de387cbf6da785 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158427 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-10-21tdf#135922 wina11y: Report text-related IA2 obj attrsMichael Weghorn Extend `CMAccessible::get_attributes` so that it also reports the text-related IAccessible2 object attributes, since what is meant to be reported as a text attribute and what is meant to be reported as an object attribute differs between the IAccessible2 specificiation and what LibreOffice does on the UNO level, s. the commit message in this previous change for more details: Change-Id Ief7c840d3c5274714a914ca0e56df0c5eaffb06d tdf#135922 a11y: Prepare reporting text attrs as IA2 obj attrs Just use a character offset of 0 when querying via the `XAccessibleText` interface here. The exct offset used used shouldn't make any difference for paragraph-specific attributes. With this and the NVDA pull request [1] to evaluate attributes according to the IAccessible2 text attributes and IAccessible2 object attributes specifications, NVDA now reports the alignment of paragraphs in Writer, e.g. says "align center" since the corresponding attribute is now reported for the paragraph object, as can also be seen by querying the IAccessible2 interface manually in NVDA's Python console: >>> focus.IAccessibleObject.attributes 'heading-level:;level:;text-align:center;' ("text-align:center;" was not yet reported without this change in place.) [1] https://github.com/nvaccess/nvda/pull/15649 Change-Id: I5723797232f89db6a2b74d4a601344f2078ee630 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158260 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-10-21wina11y: Just return empty attr string when none presentMichael Weghorn If the `XAccessibleExtendedAttributes` interface isn't implemented, just return an empty string for the attributes instead of an error code. (This seems like a totally valid case to me, no need to report an error.) Change-Id: I986f030bc7a01da0fdd92a5aa2b4cf3c0d6a9200 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158258 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-10-21wina11y: Indent try blockMichael Weghorn Change-Id: I89a4ed514e1c24e683b081d04f72cd62ede80065 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158257 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-10-21tdf#135922 a11y: Prepare reporting text attrs as IA2 obj attrsMichael Weghorn According to the IAccessible2 specification, some of the attributes that LibreOffice handles as text attributes are mapped to IAccessible2 text attributes as well [1], but others should be reported as object attributes [2], e.g. text alignment is reported via the "text-align" object attribute on the paragraph object. So far, `AccessibleTextAttributeHelper` was only handling attributes that are mapped to IAccessible2 text attributes. Prepare for reporting object attributes as well, which will be required to report text alignment on Windows in a compliant way (s. tdf#135922). On the other hand, Qt also expects `QAccessibleTextInterface::attributes` to return text formatting using the attributes specified in the IAccessible2 attribute specifications and maps that to the platform-specific attributes (AT-SPI text attributes on Linux), but currently does not provide any way to report object attributes in addition to text attributes. It however supports e.g. the "text-align" attribute mentioned in the IAccessible2 object attribute specification when it's reported as a text attribute [3]. Therefore, add a new `IA2AttributeType` enum that can be used to specify what kind of IAccessible2 attributes (text attributes, object attributes) to report. Only request IA2 text attributes on Windows when text attributes are requested, but both types for Qt. So far, support for none of the object attributes has been implemented, but an upcoming change will do that. [1] https://wiki.linuxfoundation.org/accessibility/iaccessible2/textattributes [2] https://wiki.linuxfoundation.org/accessibility/iaccessible2/objectattributes [3] https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/accessible/linux/atspiadaptor.cpp?id=546208f0ff23819d216cbb5bf0b5daded79b454e#n2193 Change-Id: Ief7c840d3c5274714a914ca0e56df0c5eaffb06d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158255 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-10-20wina11y: Drop now unused CMAccessible::get_String4Numbering etc.Michael Weghorn `CMAccessible::get_String4Numbering` is unused since commit 2bf88c172c9c9d159344b95fb96073f4891a6c30 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Wed Oct 18 13:44:42 2023 +0200 tdf#157696 wina11y: Switch from custom to IA2 text attributes , so drop it. This means that `CMAccessible::get_StringFromAny` is then also unused, so drop it as well. Change-Id: I35abc94b2fc2ecec1789918fbf4ed6707a96c974 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158195 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-10-19tdf#157696 wina11y: Switch from custom to IA2 text attributesMichael Weghorn So far, reporting text attributes on the a11y layer on Windows did not follow any standard/specification, but LibreOffice's custom attribute values were mostly reported as is (i.e. using the LibreOffice-internal attribute names and values), and assistive tooling had to interpret those in order to support reporting them to the user in a useful way. For example, NVDA has custom code in the LibreOffice-specific app module to do so. [1] Stop using our custom attributes and switch to the use of attributes according to the IAccessible2 text attributes specification [2] instead, which is the applicable specification for `IAccessibleText::get_attributes` that is implemented here. This implies that by reporting more IAccessible2 text attributes, those should "automatically" work if assistive tooling handles those, as is e.g. the case for NVDA and the the "invalid:spelling;" attribute for spelling errors, for which bridging to IA2 has been iplemented in Change-Id I54e5bcbb4bef4c73068243f91a3ee69c10326460 tdf#157696 a11y: Report spelling error via IA2 "invalid:spelling" attr (See also the other tdf#135922 commits preparing for this change.) A change in NVDA is still needed in addition to switch from only handling the custom values for LO to use the existing code path for handling IA2 text attrs instead. Pending pull request that implents this: [3] [1] https://github.com/nvaccess/nvda/blob/9878248c217156de4defe244d2df797d6b3bd0ca/source/appModules/soffice.py#L35-L137 [2] https://wiki.linuxfoundation.org/accessibility/iaccessible2/textattributes [3] https://github.com/nvaccess/nvda/pull/15649 Change-Id: I11492bb5d09d64fd153db1b73d97a331a98ee535 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158090 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-10-11wina11y: Drop CAccTextBase::GetXInterfaceMichael Weghorn Just use the private `pRXText` member directly. The separate getter doesn't really help regarding readability, in particular since the typical usage pattern involved first checking the member directly, then using the getter, making it less obvious that this was about the same object/reference e.g. if(!pRXText.is()) { return E_FAIL; } if( offset < 0 || offset > GetXInterface()->getCharacterCount() ) return E_FAIL; Change-Id: Iaf786220b94a37e79a46985f58e0586252846f56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157766 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-10-11wina11y: Drop unnecessary check for empty ReferenceMichael Weghorn Using operator= with either an empty Reference or nullptr has the same effect. Change-Id: Ifa33127f3718ba4bbf3d364484b412b4108719a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157765 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-10-07wina11y: Map FRAME a11y role to IAccessible2 equivalentMichael Weghorn The description of the UNO API role (s. `offapi/com/sun/star/accessibility/AccessibleRole.idl`) and the IAccessible2 role `IA2_ROLE_FRAME` (s. `winaccessibility/source/UAccCOMIDL/ia2_api_all.idl`) match. (The first sentence is even identical.). Therefore, map them accordingly instead of mapping to `ROLE_SYSTEM_DIALOG`, which is not really the same. It's not clear why this "perfect match" was commented ever since commit a18bdb3bc05e761704cc345a66a9d642bc4f4a0a Author: Steve Yin Date: Thu Nov 14 08:18:05 2013 +0000 Integrate branch of IAccessible2 I noticed this because announcement of the status bar in Writer by NVDA as implemented in NVDA commit [1] didn't work any more after commit 2cd1408dd7d6688357257f4a58a8b467628b1884 Author: Michael Weghorn Date: Thu Aug 17 13:15:46 2023 +0100 tdf#156561 a11y: Create VCLXTopWindow peer for border win frame as the DIALOG role was used instead of the WINDOW role after this, and NVDA doesn't consider that yet when looking for the status bar. It also doesn't take `IA2_ROLE_FRAME` into account yet, but this NVDA PR makes NVDA to consider both, `ROLE_SYSTEM_DIALOG` and `IA2_ROLE_FRAME` as well: [2] Just mapping to `ROLE_SYSTEM_WINDOW` instead would still be a better match than the previous `ROLE_SYSTEM_DIALOG` and would make that NVDA scenario work again without further changes to NVDA, but would rather be a workaround than the proper solution. [1] https://github.com/nvaccess/nvda/commit/62536a97cd29019c7055c927746da72435d12b95 [2] https://github.com/nvaccess/nvda/pull/15592 Change-Id: Ide39222d2525cb64106c878e8b0a11174bcb16ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157658 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-09-14Fix typoAndrea Gelmini Change-Id: I94b00910d261731b712f21a92766d97fed4889a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156927 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr> 2023-09-10using decls should come after #includeNoel Grandin Change-Id: I058551e87bca42adede860f6f299b0f7ae2af3b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156798 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2023-08-22wina11y: Drop CAccActionBase::GetXInterfaceMichael Weghorn Just use the `pRXAct` member directly. In particular the fact that all of the `CAccActionBase` methods mixed both ways of accessing the member (first checking `pRXAct` directly, but then retrieving it via `CAccActionBase::GetXInterface` to call a method on it) didn't really increase readability of the code. Change-Id: Ic6f5ce9a9b229b949ac656668e3bbf01cb65af2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155956 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-08-09wina11y: Drop "#CHECK#" commentsMichael Weghorn ... 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 <m.weghorn@posteo.de> 2023-08-09wina11y: Use return value instead of out paramMichael Weghorn ... to return the `IAccessible*` in `AccObjectWinManager::GetIAccessibleFromXAccessible` and `CMAccessible::get_IAccessibleFromXAccessible` and adapt the call sites accordingly. This is more straight-forward and the extra bool return value didn't add anything, since it was also just saying whether the pointer was a nullptr, so rather check that directly. Also drop `AccObjectWinManager::GetIMAccByXAcc` that does the same thing and switch the only call site to use `AccObjectWinManager::GetIAccessibleFromXAccessible` instead. Change-Id: I72933df62aa9ac1ff3f2a84c5045dfae354c18e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155505 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-08-09tdf#156679 wina11y: Convert screen to local coords as neededMichael Weghorn When `AccTextBase::get_offsetAtPoint` gets called with screen coordinates, convert them to local coordinates within the text object first, because that is what `XAccessibleText::getIndexAtPoint` expects. Not doing so resulted in NVDA failing to create a TextInfo object in the mouse event handler [1] when hovering over a Calc cell containing text, because the method would always return an offset of -1. With this change in place, NVDA now announces the text when hovering over the text and mouse tracking is enabled in NVDA (which is the case by default). Other than with Microsoft Excel, the text is only announced when the mouse is actually over the text, not over free space in the cell, which might be because Excel uses UIA and the UIA equivalent, `ITextProvider::RangeFromPoint` [2] shall also return the index of the closest character when the point itself is not over the actual bounds of any character. [1] https://github.com/nvaccess/nvda/blob/a198c9b5f27e47ff2830f77c833eec584078dfd8/source/NVDAObjects/__init__.py#L1209 [2] https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextprovider-rangefrompoint Change-Id: I1e4ab2dd3dace5fea1de2eef67a91fe3c31218a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155492 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-08-09tdf#156679 wina11y: Implement accHitTest via UNO equivalentMichael Weghorn Instead of manually iterating over the children and checking whether the given position is in the location that they're in in `CMAccessible::accHitTest`, use `XAccessibleComponent::XAccessibleComponent`, which provides exactly the functionality that's needed. (This is similar to what the Qt-based VCL plugins on Linux do, s. `QtAccessibleWidget::childAt`.) This also drops the need to limit this to objects that have at most a certain amount of children for performance reasons (previously 256) and thus makes this work e.g. also to identify a Calc cell that the mouse pointer is currently over while previously the document was returned, as could be seen also in NVDA's Python console: 1) start NVDA 2) hover over a Calc cell 3) press NVDA+Ctrl+Z to capture snapshot variables 4) check what NVDA identifies as the mouse object via the Python Console: Before: >>> mouse <NVDAObjects.IAccessible.IAccessible object at 0x00FB9910> >>> mouse.name 'Untitled 1 - LibreOfficeDev Spreadsheets' >>> mouse.role <Role.DOCUMENT: 52> With this change in place: >>> mouse <NVDAObjects.Dynamic_SymphonyIATableCellEditableTextWithAutoSelectDetectionIAccessible object at 0x0774DD10> >>> mouse.name >>> mouse.role <Role.TABLECELL: 29> The cell's text still isn't announced by NVDA even with mouse tracking enabled, but that's another issue. Change-Id: Ib821020cef6303ab786c4c3fc3ccd917398214f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155491 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-08-09wina11y: Move these 2 checks out of try/catchMichael Weghorn Change-Id: I4ae7527d9b5047d46aab44a1ab6fa42a99c43a14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155490 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-08-08wina11y: Drop AccObjectManagerAgent indirectionMichael Weghorn `AccObjectManagerAgent` was holding an `AccObjectWinManager` object and forwarding everything to that one and the event listeners were holding a pointer to the `AccObjectManagerAgent` object. Drop this `AccObjectManagerAgent` indirection and let all of the classes that were interacting with the `AccObjectManagerAgent` directly interact with the `AccObjectWinManager` instead. The idea of having the agent seems to have been to have an abstraction layer and implement different accessible object managers for all platforms, but the agent already has quite some Windows-/IAccessible-specific code/interface and by now, the Linux VCL plugins and macOS have their own a11y bridges, so the TODO do implement this here for Linux as well seems outdated to me. Even if implementing this for Linux and/or macOS in a similar way, I don't see the need for the agent layer, but one way might be to just have an abstract base class (e.g. `AccObjectManager`) that `AccObjectWinManager` and implementations for other platforms derive from, and have the SalInstance return the platform-specific implementation that the `AccTopWindowListener` would then retrieve and pass on. Given that `AccObjectManagerAgent` was forwarding all calls to `AccObjectWinManager` and the methods and params are mostly the same by now (s.a. the preparatory commits), this change is mostly straightforward. A few notes: * `AccObjectManagerAgent::InsertAccObj` had a default nullptr value for the HWND that `AccObjectWinManager:InsertAccObj` didn't have yet, so add that. * `AccObjectManagerAgent::GetIAccessibleFromResID` had an out param instead of a return value; call sites were adapted to fit `AccObjectWinManager:GetIAccessibleFromResID`. * The `UpdateValue` and `UpdateAccName` methods taking 2 params are called `SetValue` and `SetAccName` in `AccObjectWinManager` instead, so adapt call sites accordingly. * prewin.h and postwin.h includes had to be added around the windows.h include in AccObjectWinManager.hxx (build would otherwise fail) * A few `AccObjectWinManager` methods had to be made virtual to make linking work. Change-Id: I88741bf416d4db25d78e973c0db060a828f27926 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155440 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-08-08wina11y: Drop unused includeMichael Weghorn Change-Id: I71659b8aa3ba0f0097aa4200ec159272c5c75b24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155439 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-08-08wina11y: Align param order with other methodsMichael Weghorn Switch the param order in `AccObjectManagerAgent::NotifyAccEvent` to be consistent with all of its other methods that take the `XAccessible*` first, and also with `AccObjectWinManager::NotifyAccEvent` that is called by the method. This is also in preparation of dropping AccObjectManagerAgent altogether. Change-Id: I83d331176971cc728524266d87939f33acd375f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155438 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-08-08wina11y: Drop unused default nullptr argMichael Weghorn Calling this without passing an actual XAccessible* wouldn't make any sense anyway. Change-Id: Ie8d8aecc0c0a3a8a2c1ef62015fba7ad242059b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155437 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-08-08wina11y: Move and simplify casting for Get_ToATInterfaceMichael Weghorn Move the casting from AccObjectManagerAgent::Get_ToATInterface to AccObjectWinManager::Get_ToATInterface and just do a `reinterpret_cast<HWND>(...)` right away instead of a `static_cast<HWND>(reinterpret_cast<void*>(...))`. This is in preparation of dropping the AccObjectManagerAgent indirection altogether. Change-Id: Iad759f856f727418aab0d20b479fc38feac714ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155436 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-08-08wina11y: Move GetIAccessibleFromXAccessible logicMichael Weghorn Move the logic from AccObjectManagerAgent::GetIAccessibleFromXAccessible to the new AccObjectWinManager::GetIAccessibleFromXAccessible and just forward to that one. This is in preparation of dropping the AccObjectManagerAgent indirection altogether. Change-Id: Ic276a04cf7dda3762cee0d3932962e2a0947cfde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155435 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-08-08wina11y: Replace nullptr check with assertMichael Weghorn `AccObjectManagerAgent::pWinManager` gets set in the ctor and is never reset explicitly, so I don't see any way it can ever be null before the `AccObjectManagerAgent` object itself gets destroyed. Change-Id: I027ca0d15cbc7ca8e183b71b0dbee7ce1acc925d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155434 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-08-08wina11y: Drop AccObjectManagerAgent indirection to get a11y roleMichael Weghorn Just retrieve it from the context directly here, and drop the now unused `AccObjectWinManager::GetRole`. Change-Id: I4c14d2f9b6fb1df9c58149576897c8585ba4a437 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155433 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-08-03tdf#156473 wina11y: Fix invalid write due to row/col mismatchMichael Weghorn 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 <m.weghorn@posteo.de> 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 <m.weghorn@posteo.de> 2023-08-01wina11y: Drop/Clean up CHILD event handling in subclassesMichael Weghorn 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 <m.weghorn@posteo.de> 2023-08-01tdf#156561 wina11y: Handle CHILD eventMichael Weghorn So far, `AccessibleEventId::CHILD` events were ignored by `AccComponentEventListener` and its base class, `AccEventListener`. As a result, no event listener would be created when e.g. a child that was previously hidden got shown, resulting e.g. in NVDA not announcing that object when it receives focus later. Handle the event and register a listener when notified about a new child and drop the old child when one gets removed, like some of the derived classes already do in pretty much the same way. (Those implementations will be cleaned up/dropped in a separate commit.) This addresses one of the root causes of why tdf#140762 ("No text spoken by screen reader for 'Borders' dropdown button items in Calc's formatting toolbar (NVDA on Windows)") occured without commit dc0706cabfe39ddb6ea23d60ccfb756f2b9e6efb Author: Michael Weghorn <m.weghorn@posteo.de> Date: Wed Mar 15 17:00:27 2023 +0100 tdf#140762 tdf#152671 Make dock win visible before showing popup , i.e. when the window is made visible only after its parent. Still, this change at least by itself does not yet solve tdf#152671 ("ui, accessibility: auto filter drop down menu is not spoken by the screen reader") and also for the case of the toolbar popup, the initially focused item would no more be announced when reverting the above-mentioned commit and its follow-up commit commit 57c2209dd04abfda90e0aba782bc174243633ec9 Author: Caolán McNamara <caolanm@redhat.com> Date: Thu Apr 6 15:07:15 2023 +0100 tdf#154470 try moving the Show of the client to after the float positioning Example backtrace of the font color popup in the formatting toolbar where no event listener was created previously: 1 AccEventListener::notifyEvent AccEventListener.cxx 74 0x7ffe4b4ecf14 2 AccComponentEventListener::notifyEvent AccComponentEventListener.cxx 82 0x7ffe4b4ee699 3 comphelper::AccessibleEventNotifier::addEvent accessibleeventnotifier.cxx 256 0x7ffe5e80ebac 4 comphelper::OCommonAccessibleComponent::NotifyAccessibleEvent accessiblecomponenthelper.cxx 127 0x7ffe5e80443e 5 VCLXAccessibleToolBoxItem::NotifyChildEvent vclxaccessibletoolboxitem.cxx 213 0x7ffe4b337e10 6 VCLXAccessibleToolBox::UpdateCustomPopupItemp_Impl vclxaccessibletoolbox.cxx 373 0x7ffe4b33334d 7 VCLXAccessibleToolBox::ProcessWindowEvent vclxaccessibletoolbox.cxx 547 0x7ffe4b33263c 8 VCLXAccessibleComponent::WindowEventListener vclxaccessiblecomponent.cxx 112 0x7ffe51e871c5 9 VCLXAccessibleComponent::LinkStubWindowEventListener vclxaccessiblecomponent.cxx 98 0x7ffe51e861f6 10 Link<VclWindowEvent &,void>::Call link.hxx 111 0x7ffe504204b3 11 vcl::Window::CallEventListeners event.cxx 263 0x7ffe50420860 12 svt::PopupWindowControllerImpl::WindowEventListener popupwindowcontroller.cxx 148 0x7ffe53c65593 13 svt::PopupWindowControllerImpl::LinkStubWindowEventListener popupwindowcontroller.cxx 89 0x7ffe53c64f76 14 Link<VclWindowEvent &,void>::Call link.hxx 111 0x7ffe504204b3 15 vcl::Window::CallEventListeners event.cxx 263 0x7ffe50420860 16 vcl::Window::ImplResetReallyVisible stacking.cxx 723 0x7ffe5033d6f1 17 vcl::Window::Show window.cxx 2234 0x7ffe5053eca7 18 ImplDockingWindowWrapper::ImplPreparePopupMode dockmgr.cxx 769 0x7ffe5041154e 19 ImplDockingWindowWrapper::StartPopupMode dockmgr.cxx 816 0x7ffe50413d4c 20 DockingManager::StartPopupMode dockmgr.cxx 349 0x7ffe50413c11 ... <More> Change-Id: I62ab32342ef67c770ced9f0d2be867dc9355bd4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155126 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-06-13tdf#155794 winaccessibility: no SolarMutex in getAccObjectPtr()Michael Stahl MSAAServiceImpl::getAccObjectPtr() is called when processing WM_GETOBJECT messages, and this can happen (at least when NVDA is active) during processing SendMessages. When loading a document on a non-main thread, WinSalFrame::SetTitle() calls SetWindowTextW which is equivalent to SendMessage(WM_SETTEXT), while holding SolarMutex, and if the main thread doesn't finish processing it then that's a deadlock. Introduce a new mutex in AccObjectWinManager and use it to guard the 2 members that getAccObjectPtr() reads, while keeping the rest of winaccessibility with the SolarMutex, as the UNO services may be called on any thread. This fixes part of the problem, VCL also needs to stop using SolarMutex. Change-Id: I6df5889fd76f59146b4b0b1e5f4513232f8ab867 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152957 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>