summaryrefslogtreecommitdiff
path: root/editeng/source
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-04-24 14:39:46 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2024-04-24 23:04:35 +0200
commitd4f6534e8870e8f271984c37ce54a6878f372ae1 (patch)
treea436e84d416170538a3b554ec15b5a471716d2ae /editeng/source
parentb6a8fec62cb7576ac8a94a76ca88256eb4f97695 (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 'editeng/source')
-rw-r--r--editeng/source/accessibility/AccessibleEditableTextPara.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index e504d0fa29a7..2f727cb7669d 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -736,8 +736,8 @@ namespace accessibility
if ( nMyParaIndex > 0 &&
mpParaManager->IsReferencable( nMyParaIndex - 1 ) )
{
- uno::Sequence<uno::Reference<XInterface> > aSequence
- { cppu::getXWeak(mpParaManager->GetChild( nMyParaIndex - 1 ).first.get().get()) };
+ uno::Sequence<uno::Reference<XAccessible>> aSequence
+ { mpParaManager->GetChild( nMyParaIndex - 1 ).first.get() };
AccessibleRelation aAccRel( AccessibleRelationType::CONTENT_FLOWS_FROM,
aSequence );
pAccRelSetHelper->AddRelation( aAccRel );
@@ -747,8 +747,8 @@ namespace accessibility
if ( (nMyParaIndex + 1) < mpParaManager->GetNum() &&
mpParaManager->IsReferencable( nMyParaIndex + 1 ) )
{
- uno::Sequence<uno::Reference<XInterface> > aSequence
- { cppu::getXWeak(mpParaManager->GetChild( nMyParaIndex + 1 ).first.get().get()) };
+ uno::Sequence<uno::Reference<XAccessible>> aSequence
+ { mpParaManager->GetChild( nMyParaIndex + 1 ).first.get() };
AccessibleRelation aAccRel( AccessibleRelationType::CONTENT_FLOWS_TO,
aSequence );
pAccRelSetHelper->AddRelation( aAccRel );