From 7cdbde4867b14ae382262dc394ba83e609a8eecf Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 28 Oct 2015 13:55:01 +0200 Subject: Initialize Sequence from initializer_lists Change-Id: I216dcbd983dcf3df79df9fda371b93114540a9d8 --- toolkit/source/awt/vclxwindows.cxx | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'toolkit') diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index e733efae2485..ac9308283e7e 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -2672,17 +2672,11 @@ uno::Sequence< beans::NamedValue > SAL_CALL VCLXMultiPage::getTabProps( sal_Int3 if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ) == NULL ) throw lang::IndexOutOfBoundsException(); -#define ADD_PROP( seq, i, name, val ) { \ - beans::NamedValue value; \ - value.Name = name; \ - value.Value = uno::makeAny( val ); \ - seq[i] = value; \ - } - - uno::Sequence< beans::NamedValue > props( 2 ); - ADD_PROP( props, 0, "Title", OUString( pTabControl->GetPageText( sal::static_int_cast< sal_uInt16 >( ID ) ) ) ); - ADD_PROP( props, 1, "Position", pTabControl->GetPagePos( sal::static_int_cast< sal_uInt16 >( ID ) ) ); -#undef ADD_PROP + uno::Sequence< beans::NamedValue > props + { + { "Title", css::uno::makeAny(pTabControl->GetPageText( sal::static_int_cast< sal_uInt16 >( ID ) )) }, + { "Position", css::uno::makeAny(pTabControl->GetPagePos( sal::static_int_cast< sal_uInt16 >( ID ) )) } + }; return props; } void VCLXMultiPage::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) -- cgit