diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2024-04-24 14:39:46 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-04-24 23:04:35 +0200 |
commit | d4f6534e8870e8f271984c37ce54a6878f372ae1 (patch) | |
tree | a436e84d416170538a3b554ec15b5a471716d2ae /dbaccess | |
parent | b6a8fec62cb7576ac8a94a76ca88256eb4f97695 (diff) |
[API CHANGE] a11y: Use XAccessible for relation targets
Use a Sequence of XAccessible rather than its base
interface XInterface for AccessibleRelation's TargetSet.
As the targets are accessible objects as well,
anything other than XAccessible doesn't make much sense.
Using XAccessible right away makes that clearer and avoids
the need to query the XAccessible interface.
(The winaccessibility bridge was already using
`static_cast`, relying on the fact that the objects
are XAccessibles.)
The a11y UNO API is not published, so an API change
should be unproblematic.
Change-Id: I7f08e98d1ec303d5343d9a7954187cdd71495ebc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166586
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/TableWindowAccess.cxx | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx index 56842bccf03d..1fa17c06207c 100644 --- a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx +++ b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx @@ -133,7 +133,7 @@ namespace dbaui if( nIndex < 0 || nIndex >= getRelationCount() ) throw IndexOutOfBoundsException(); - Sequence< Reference<XInterface> > aSeq; + Sequence<Reference<XAccessible>> aSeq; if( m_pLine ) { aSeq = { m_pLine->GetSourceWin()->GetAccessible(), diff --git a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx index bb6131840d80..138850267c47 100644 --- a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx @@ -201,19 +201,19 @@ namespace dbaui auto aIter = pView->getTableConnections(m_pTable); auto aEnd = rConnectionList.end(); - std::vector< Reference<XInterface> > aRelations; + std::vector< Reference<css::accessibility::XAccessible> > aRelations; aRelations.reserve(5); // just guessing // TODO JNA aIter comes from pView->getTableConnections(m_pTable) // and aEnd comes from pView->getTableConnections().end() for (; aIter != aEnd ; ++aIter ) { - uno::Reference<uno::XInterface> xInterface( + uno::Reference<css::accessibility::XAccessible> xAccessible( getParentChild(aIter - rConnectionList.begin())); - aRelations.push_back(xInterface); + aRelations.push_back(xAccessible); } - Sequence< Reference<XInterface> > aSeq(aRelations.data(), aRelations.size()); - return AccessibleRelation(AccessibleRelationType::CONTROLLER_FOR,aSeq); + Sequence<Reference<css::accessibility::XAccessible>> aSeq(aRelations.data(), aRelations.size()); + return AccessibleRelation(AccessibleRelationType::CONTROLLER_FOR, aSeq); } return AccessibleRelation(); } |