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 /svx | |
parent | f53343320101bfe650f5fe2cdf95f94995778037 (diff) |
convert Sequence<XInterface> constructions to use initializer lists
Change-Id: I66475190cc0f18465c56b94af7bc0d5a1ca81242
Diffstat (limited to 'svx')
4 files changed, 7 insertions, 14 deletions
diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx index 2cebeaf4c08a..d40771a562b1 100644 --- a/svx/source/accessibility/AccessibleControlShape.cxx +++ b/svx/source/accessibility/AccessibleControlShape.cxx @@ -590,8 +590,7 @@ Reference< XAccessibleRelationSet > SAL_CALL AccessibleControlShape::getAccessib { Reference < XAccessible > xAcc (pCtlAccShape->getAccessibleContext(), UNO_QUERY); - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > aSequence(1); - aSequence[0] = xAcc; + css::uno::Sequence< css::uno::Reference< css::uno::XInterface > > aSequence { xAcc }; if( getAccessibleRole() == AccessibleRole::RADIO_BUTTON ) { pRelationSetHelper->AddRelation( AccessibleRelation( AccessibleRelationType::MEMBER_OF, aSequence ) ); diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index 8c5a9ff77b1d..8ec75945cfc7 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -401,8 +401,7 @@ uno::Reference<XAccessibleRelationSet> SAL_CALL ::utl::AccessibleRelationSetHelper* pRelationSet = new utl::AccessibleRelationSetHelper; //this mxshape is the captioned shape - uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); - aSequence[0] = mpParent->GetAccessibleCaption(mxShape); + uno::Sequence< uno::Reference< uno::XInterface > > aSequence { mpParent->GetAccessibleCaption(mxShape) }; if(aSequence[0].get()) { pRelationSet->AddRelation( diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx index 74960ea53dec..065d688a94e8 100644 --- a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx +++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx @@ -144,16 +144,14 @@ uno::Reference< XAccessibleRelationSet > SvxPixelCtlAccessible::getAccessibleRel vcl::Window *pLabeledBy = mrPixelCtl.GetAccessibleRelationLabeledBy(); if ( pLabeledBy && pLabeledBy != &mrPixelCtl ) { - uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); - aSequence[0] = pLabeledBy->GetAccessible(); + uno::Sequence< uno::Reference< uno::XInterface > > aSequence { pLabeledBy->GetAccessible() }; rRelationSet->AddRelation( css::accessibility::AccessibleRelation( css::accessibility::AccessibleRelationType::LABELED_BY, aSequence ) ); } vcl::Window* pMemberOf = mrPixelCtl.GetAccessibleRelationMemberOf(); if ( pMemberOf && pMemberOf != &mrPixelCtl ) { - uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); - aSequence[0] = pMemberOf->GetAccessible(); + uno::Sequence< uno::Reference< uno::XInterface > > aSequence { pMemberOf->GetAccessible() }; rRelationSet->AddRelation( css::accessibility::AccessibleRelation( css::accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) ); } return rSet; diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx index 35c79d87fd7a..396952641f01 100644 --- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx +++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx @@ -354,15 +354,13 @@ Reference< XAccessibleRelationSet > SAL_CALL SvxRectCtlAccessibleContext::getAcc vcl::Window *pLabeledBy = pWindow->GetAccessibleRelationLabeledBy(); if ( pLabeledBy && pLabeledBy != pWindow ) { - uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); - aSequence[0] = pLabeledBy->GetAccessible(); + uno::Sequence< uno::Reference< uno::XInterface > > aSequence { pLabeledBy->GetAccessible() }; pRelationSetHelper->AddRelation( css::accessibility::AccessibleRelation( css::accessibility::AccessibleRelationType::LABELED_BY, aSequence ) ); } vcl::Window* pMemberOf = pWindow->GetAccessibleRelationMemberOf(); if ( pMemberOf && pMemberOf != pWindow ) { - uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); - aSequence[0] = pMemberOf->GetAccessible(); + uno::Sequence< uno::Reference< uno::XInterface > > aSequence { pMemberOf->GetAccessible() }; pRelationSetHelper->AddRelation( css::accessibility::AccessibleRelation( css::accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) ); } } @@ -856,8 +854,7 @@ Reference<XAccessibleRelationSet> SAL_CALL SvxRectCtlChildAccessibleContext::get uno::Reference< css::accessibility::XAccessibleRelationSet > xSet = pRelationSetHelper; if( mxParent.is() ) { - uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); - aSequence[0] = mxParent; + uno::Sequence< uno::Reference< uno::XInterface > > aSequence { mxParent }; pRelationSetHelper->AddRelation( css::accessibility::AccessibleRelation( css::accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) ); } |