From f74da1315a5b2ec232a66944e41ff90231b383be Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 25 Jul 2017 09:34:01 +0200 Subject: use more comphelper::InitAnyPropertySequence Found with: git grep -n -A10 'Sequence.*Any' -- *.cxx | grep -B5 -w PropertyValueProvider and: git grep -n 'Sequence.*Any.*( *&' Change-Id: Icb18c98bdd3f8352817e443ff78de5df042859ad Reviewed-on: https://gerrit.libreoffice.org/40389 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svtools/source/uno/addrtempuno.cxx | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'svtools/source/uno/addrtempuno.cxx') diff --git a/svtools/source/uno/addrtempuno.cxx b/svtools/source/uno/addrtempuno.cxx index 5796b06dc7a6..37c6594564e4 100644 --- a/svtools/source/uno/addrtempuno.cxx +++ b/svtools/source/uno/addrtempuno.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -153,17 +154,14 @@ namespace { { // convert the parameters for creating the dialog to PropertyValues - Sequence< Any > aArguments(5); - Any* pArguments = aArguments.getArray(); - // the parent window - *pArguments++ <<= PropertyValue( "ParentWindow", -1, makeAny( xParentWindow ), PropertyState_DIRECT_VALUE); - // the data source to use - *pArguments++ <<= PropertyValue( "DataSource", -1, makeAny( xDataSource ), PropertyState_DIRECT_VALUE); - *pArguments++ <<= PropertyValue( "DataSourceName", -1, makeAny( sDataSourceName ), PropertyState_DIRECT_VALUE); - // the table to use - *pArguments++ <<= PropertyValue( "Command", -1, makeAny( sCommand ), PropertyState_DIRECT_VALUE); - // the title - *pArguments++ <<= PropertyValue( "Title", -1, makeAny( sTitle ), PropertyState_DIRECT_VALUE); + Sequence aArguments(comphelper::InitAnyPropertySequence( + { + {"ParentWindow", Any(xParentWindow)}, + {"DataSource", Any(xDataSource)}, + {"DataSourceName", Any(sDataSourceName)}, + {"Command", Any(sCommand)}, // the table to use + {"Title", Any(sTitle)} + })); OGenericUnoDialog::initialize(aArguments); return; } -- cgit