Clean up getTextFromIAccessible (PR #13127)
Overview:
The moved function getTextFromIAccessible doesn't use smart pointers, was missing some explicit initialization, and logic could be simplified.
- Introduce (CCom) smart pointers.
- Initialize all variables.
- Simplify logic where obvious.
Details:
* Use constant for OBJ_REPLACEMENT_CHAR
* Check pacc2 for null
* Use CComQIPtr for paccText
No longer need to manually release.
* Make recursive call args explicit.
* Use CComQIPtr for pacc2Child
* Add a helper to getAccessibleChildren
Make all usages of AccessibleChildren conform to a consitant approach.
Management of resources is automatic.
* use CComBSTR for bstrText
* CComQIPtr for paccHypertext
* intialisation and condition ordering
* use CCom for paccHyperlink and pacc2Child
* use standard string comparison
* split name&description collection to a separate function.