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 --- svx/source/form/formcontrolling.cxx | 5 +---- svx/source/sidebar/line/LineWidthPopup.cxx | 5 ++--- svx/source/sidebar/text/TextCharacterSpacingPopup.cxx | 5 ++--- 3 files changed, 5 insertions(+), 10 deletions(-) (limited to 'svx') diff --git a/svx/source/form/formcontrolling.cxx b/svx/source/form/formcontrolling.cxx index 6fcf0a7b6782..d04b2c5a0840 100644 --- a/svx/source/form/formcontrolling.cxx +++ b/svx/source/form/formcontrolling.cxx @@ -309,10 +309,7 @@ namespace svx void FormControllerHelper::execute( sal_Int32 _nSlotId, const OUString& _rParamName, const Any& _rParamValue ) const { - Sequence< NamedValue > aArguments(1); - aArguments[0].Name = _rParamName; - aArguments[0].Value = _rParamValue; - + Sequence< NamedValue > aArguments { { _rParamName, _rParamValue } }; impl_operateForm_nothrow( EXECUTE_ARGS, FeatureSlotTranslation::getFormFeatureForSlotId( _nSlotId ), aArguments ); } diff --git a/svx/source/sidebar/line/LineWidthPopup.cxx b/svx/source/sidebar/line/LineWidthPopup.cxx index dcef64e798f6..2dfb136211f6 100644 --- a/svx/source/sidebar/line/LineWidthPopup.cxx +++ b/svx/source/sidebar/line/LineWidthPopup.cxx @@ -59,9 +59,8 @@ void LineWidthPopup::PopupModeEndCallback() if (pControl->IsCloseByEdit()) { SvtViewOptions aWinOpt( E_WINDOW, SIDEBAR_LINE_WIDTH_GLOBAL_VALUE ); - ::com::sun::star::uno::Sequence < ::com::sun::star::beans::NamedValue > aSeq(1); - aSeq[0].Name = "LineWidth"; - aSeq[0].Value <<= ::rtl::OUString::number(pControl->GetTmpCustomWidth()); + css::uno::Sequence < css::beans::NamedValue > aSeq + { { "LineWidth", css::uno::makeAny(OUString::number(pControl->GetTmpCustomWidth())) } }; aWinOpt.SetUserData( aSeq ); } } diff --git a/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx b/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx index b8840b06ab59..c32de3082ccd 100644 --- a/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx +++ b/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx @@ -57,9 +57,8 @@ void TextCharacterSpacingPopup::PopupModeEndCallback() if( pControl->GetLastCustomState() == SPACING_CLOSE_BY_CUS_EDIT) { SvtViewOptions aWinOpt( E_WINDOW, SIDEBAR_SPACING_GLOBAL_VALUE ); - ::com::sun::star::uno::Sequence < ::com::sun::star::beans::NamedValue > aSeq(1); - aSeq[0].Name = "Spacing"; - aSeq[0].Value <<= ::rtl::OUString::number(pControl->GetLastCustomValue()); + css::uno::Sequence < css::beans::NamedValue > aSeq + { { "Spacing", css::uno::makeAny(OUString::number(pControl->GetLastCustomValue())) } }; aWinOpt.SetUserData( aSeq ); } -- cgit