svx a11y: Switch to override new extended attr helper for OLE shape
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: I12ce4776dc489dd87ee509b10c14da25a5139de6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201047
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
@@ -59,9 +59,9 @@ public:
|
||||
css::accessibility::XAccessibleKeyBinding> SAL_CALL getAccessibleActionKeyBinding (
|
||||
sal_Int32 nIndex) override;
|
||||
|
||||
// ====== XAccessibleExtendedAttributes =====================================
|
||||
virtual OUString SAL_CALL getExtendedAttributes() override;
|
||||
protected:
|
||||
virtual std::unordered_map<OUString, OUString> implGetExtendedAttributes() override;
|
||||
|
||||
/// Create a name string that contains the accessible name.
|
||||
virtual OUString
|
||||
CreateAccessibleBaseName () override;
|
||||
|
||||
@@ -71,13 +71,12 @@ Reference<XAccessibleKeyBinding> SAL_CALL AccessibleOLEShape::getAccessibleActio
|
||||
throw lang::IndexOutOfBoundsException();
|
||||
}
|
||||
|
||||
// XAccessibleExtendedAttributes
|
||||
OUString SAL_CALL AccessibleOLEShape::getExtendedAttributes()
|
||||
std::unordered_map<OUString, OUString> AccessibleOLEShape::implGetExtendedAttributes()
|
||||
{
|
||||
if (m_pShape)
|
||||
return "style:" + static_cast<SdrOle2Obj*>(m_pShape)->GetStyleString() + ";";
|
||||
if (!m_pShape)
|
||||
return {};
|
||||
|
||||
return OUString();
|
||||
return { { u"style"_ustr, static_cast<SdrOle2Obj*>(m_pShape)->GetStyleString() } };
|
||||
}
|
||||
|
||||
/// Set this object's name if is different to the current name.
|
||||
|
||||
Reference in New Issue
Block a user