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 /sc/source | |
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 'sc/source')
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleCell.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleCsvControl.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleEditObject.cxx | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx index 3ac2fdba307f..b27fbb90671a 100644 --- a/sc/source/ui/Accessibility/AccessibleCell.cxx +++ b/sc/source/ui/Accessibility/AccessibleCell.cxx @@ -464,8 +464,8 @@ void ScAccessibleCell::AddRelation(const ScRange& rRange, return; } - uno::Sequence < uno::Reference < uno::XInterface > > aTargetSet( nCount ); - uno::Reference < uno::XInterface >* pTargetSet = aTargetSet.getArray(); + uno::Sequence<uno::Reference<css::accessibility::XAccessible>> aTargetSet(nCount); + uno::Reference <css::accessibility::XAccessible>* pTargetSet = aTargetSet.getArray(); sal_uInt32 nPos(0); for (sal_uInt32 nRow = rRange.aStart.Row(); nRow <= sal::static_int_cast<sal_uInt32>(rRange.aEnd.Row()); ++nRow) { diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx index c7050d777704..c6dc50dc011a 100644 --- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx +++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx @@ -300,7 +300,7 @@ Reference< XAccessibleRelationSet > SAL_CALL ScAccessibleCsvRuler::getAccessible css::uno::Reference<css::accessibility::XAccessible> xAccObj(static_cast<ScAccessibleCsvGrid*>(rGrid.GetAccessible())); if( xAccObj.is() ) { - Sequence< Reference< XInterface > > aSeq{ xAccObj }; + Sequence<Reference<css::accessibility::XAccessible>> aSeq{ xAccObj }; pRelationSet->AddRelation( AccessibleRelation( AccessibleRelationType::CONTROLLER_FOR, aSeq ) ); } @@ -839,7 +839,7 @@ Reference< XAccessibleRelationSet > SAL_CALL ScAccessibleCsvGrid::getAccessibleR css::uno::Reference<css::accessibility::XAccessible> xAccObj(static_cast<ScAccessibleCsvGrid*>(rRuler.GetAccessible())); if( xAccObj.is() ) { - Sequence< Reference< XInterface > > aSeq{ xAccObj }; + Sequence<Reference<css::accessibility::XAccessible>> aSeq{ xAccObj }; pRelationSet->AddRelation( AccessibleRelation( AccessibleRelationType::CONTROLLED_BY, aSeq ) ); } } diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx b/sc/source/ui/Accessibility/AccessibleEditObject.cxx index 3b1eaf532d7a..ceb07cb662aa 100644 --- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx +++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx @@ -517,13 +517,13 @@ uno::Reference< XAccessibleRelationSet > ScAccessibleEditObject::getAccessibleRe vcl::Window *pLabeledBy = pWindow->GetAccessibleRelationLabeledBy(); if ( pLabeledBy && pLabeledBy != pWindow ) { - uno::Sequence< uno::Reference< uno::XInterface > > aSequence { pLabeledBy->GetAccessible() }; + uno::Sequence<uno::Reference<css::accessibility::XAccessible>> aSequence { pLabeledBy->GetAccessible() }; rRelationSet->AddRelation( AccessibleRelation( AccessibleRelationType::LABELED_BY, aSequence ) ); } vcl::Window* pMemberOf = pWindow->GetAccessibleRelationMemberOf(); if ( pMemberOf && pMemberOf != pWindow ) { - uno::Sequence< uno::Reference< uno::XInterface > > aSequence { pMemberOf->GetAccessible() }; + uno::Sequence< uno::Reference<css::accessibility::XAccessible> > aSequence { pMemberOf->GetAccessible() }; rRelationSet->AddRelation( AccessibleRelation( AccessibleRelationType::MEMBER_OF, aSequence ) ); } return rRelationSet; |