diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-29 13:57:50 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-30 08:10:22 +0200 |
commit | addb63fa8ac9fa1a29a00e886e7ae177b604494c (patch) | |
tree | 53b95e2a5ba086b62b511278a3283321962ba6f9 /accessibility | |
parent | f53343320101bfe650f5fe2cdf95f94995778037 (diff) |
convert Sequence<XInterface> constructions to use initializer lists
Change-Id: I66475190cc0f18465c56b94af7bc0d5a1ca81242
Diffstat (limited to 'accessibility')
4 files changed, 6 insertions, 12 deletions
diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx index aed1f9b8d6d6..51e1fe4198f3 100644 --- a/accessibility/source/extended/accessiblelistboxentry.cxx +++ b/accessibility/source/extended/accessiblelistboxentry.cxx @@ -509,8 +509,7 @@ namespace accessibility if ( xParent.is() ) { utl::AccessibleRelationSetHelper* pRelationSetHelper = new utl::AccessibleRelationSetHelper; - Sequence< Reference< XInterface > > aSequence(1); - aSequence[0] = xParent; + Sequence< Reference< XInterface > > aSequence { xParent }; pRelationSetHelper->AddRelation( AccessibleRelation( AccessibleRelationType::NODE_CHILD_OF, aSequence ) ); xRelSet = pRelationSetHelper; diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx index b78aa7e44a70..a970ef1508e0 100644 --- a/accessibility/source/extended/textwindowaccessibility.cxx +++ b/accessibility/source/extended/textwindowaccessibility.cxx @@ -1442,16 +1442,14 @@ Document::retrieveParagraphRelationSet( Paragraph const * pParagraph ) if ( aPara > m_aVisibleBegin && aPara < m_aVisibleEnd ) { - css::uno::Sequence< css::uno::Reference< css::uno::XInterface > > aSequence(1); - aSequence[0] = getAccessibleChild( aPara - 1 ); + css::uno::Sequence< css::uno::Reference< css::uno::XInterface > > aSequence { getAccessibleChild( aPara - 1 ) }; css::accessibility::AccessibleRelation aRelation( css::accessibility::AccessibleRelationType::CONTENT_FLOWS_FROM, aSequence ); pRelationSetHelper->AddRelation( aRelation ); } if ( aPara >= m_aVisibleBegin && aPara < m_aVisibleEnd -1 ) { - css::uno::Sequence< css::uno::Reference< css::uno::XInterface > > aSequence(1); - aSequence[0] = getAccessibleChild( aPara + 1 ); + css::uno::Sequence< css::uno::Reference< css::uno::XInterface > > aSequence { getAccessibleChild( aPara + 1 ) }; css::accessibility::AccessibleRelation aRelation( css::accessibility::AccessibleRelationType::CONTENT_FLOWS_TO, aSequence ); pRelationSetHelper->AddRelation( aRelation ); } @@ -1526,8 +1524,7 @@ void Document::FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& r { if( getAccessibleParent()->getAccessibleContext()->getAccessibleRole() == css::accessibility::AccessibleRole::SCROLL_PANE ) { - css::uno::Sequence< css::uno::Reference< css::uno::XInterface > > aSequence(1); - aSequence[0] = getAccessibleParent(); + css::uno::Sequence< css::uno::Reference< css::uno::XInterface > > aSequence { getAccessibleParent() }; rRelationSet.AddRelation( css::accessibility::AccessibleRelation( css::accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) ); } else diff --git a/accessibility/source/standard/floatingwindowaccessible.cxx b/accessibility/source/standard/floatingwindowaccessible.cxx index a6238c0dc977..7a3f1f59ac27 100755 --- a/accessibility/source/standard/floatingwindowaccessible.cxx +++ b/accessibility/source/standard/floatingwindowaccessible.cxx @@ -43,8 +43,7 @@ void FloatingWindowAccessible::FillAccessibleRelationSet(utl::AccessibleRelation vcl::Window* pParentWindow = pWindow->GetParent(); if( pParentWindow ) { - uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); - aSequence[0] = pParentWindow->GetAccessible(); + uno::Sequence< uno::Reference< uno::XInterface > > aSequence { pParentWindow->GetAccessible() }; rRelationSet.AddRelation( AccessibleRelation( AccessibleRelationType::SUB_WINDOW_OF, aSequence ) ); } } diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx b/accessibility/source/standard/vclxaccessiblelist.cxx index 2695c844cfbf..dd4ac1af09e2 100644 --- a/accessibility/source/standard/vclxaccessiblelist.cxx +++ b/accessibility/source/standard/vclxaccessiblelist.cxx @@ -461,8 +461,7 @@ void VCLXAccessibleList::ProcessWindowEvent (const VclWindowEvent& rVclWindowEve { if (m_pListBoxHelper && (m_pListBoxHelper->GetStyle() & WB_DROPDOWN ) != WB_DROPDOWN) { - uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); - aSequence[0] = pBox->GetAccessible(); + uno::Sequence< uno::Reference< uno::XInterface > > aSequence { pBox->GetAccessible() }; rRelationSet.AddRelation( com::sun::star::accessibility::AccessibleRelation( com::sun::star::accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) ); } } |