svx a11y: Switch to override new extended attr helper

Override the OAccessible::implGetExtendedAttributes
base class method newly introduced in

    Change-Id: Ie66f135fbf6cdc98c7cdca27fa3f5fe7db7f9a74
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Mar 5 12:12:45 2026 +0100

        a11y: Introduce helper to implement XAccessibleExtendedAttributes logic

instead of manually implementing
XAccessibleExtendedAttributes::getExtendedAttributes, to
unify/deduplicate the string concatenation and locking logic
by having it implemented (only) in the base class implementation.

Change-Id: I0a16552643c4a04c09df5b1129d55d96ebb0ee8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201036
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This commit is contained in:
Michael Weghorn
2026-03-06 07:15:26 +01:00
parent 99ff2618e6
commit fe36eee75e
2 changed files with 5 additions and 7 deletions
+1 -2
View File
@@ -127,8 +127,6 @@ public:
virtual void SAL_CALL deselectAccessibleChild(
sal_Int64 nSelectedChildIndex ) override;
// ====== XAccessibleExtendedAttributes =====================================
virtual OUString SAL_CALL getExtendedAttributes() override;
/// Return this object's role.
virtual sal_Int16 SAL_CALL getAccessibleRole() override;
//===== XAccessibleGroupPosition =========================================
@@ -217,6 +215,7 @@ public:
// OAccessible
virtual css::awt::Rectangle implGetBounds() override;
virtual std::unordered_map<OUString, OUString> implGetExtendedAttributes() override;
//===== XAccessibleComponent ============================================
+4 -5
View File
@@ -730,16 +730,15 @@ void SAL_CALL AccessibleShape::deselectAccessibleChild( sal_Int64 )
}
// XAccessibleExtendedAttributes
OUString SAL_CALL AccessibleShape::getExtendedAttributes()
std::unordered_map<OUString, OUString> AccessibleShape::implGetExtendedAttributes()
{
if (getAccessibleRole() != AccessibleRole::SHAPE)
return OUString();
return {};
if (m_pShape)
return "style:" + GetStyle() + ";";
return { { u"style"_ustr, GetStyle() } };
return OUString();
return {};
}
// XTypeProvider