diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-25 09:34:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-25 12:03:17 +0200 |
commit | f74da1315a5b2ec232a66944e41ff90231b383be (patch) | |
tree | 60d464c45df3531013642d61cbc8302ac815a1ae /sw/source/uibase/table | |
parent | OOXMLPropertySet::add: remove redundant check (diff) | |
download | core-f74da1315a5b2ec232a66944e41ff90231b383be.tar.gz core-f74da1315a5b2ec232a66944e41ff90231b383be.zip |
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 <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/table')
-rw-r--r-- | sw/source/uibase/table/chartins.cxx | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/sw/source/uibase/table/chartins.cxx b/sw/source/uibase/table/chartins.cxx index 435452b889d8..bc778aa90eea 100644 --- a/sw/source/uibase/table/chartins.cxx +++ b/sw/source/uibase/table/chartins.cxx @@ -48,6 +48,7 @@ #include <cppuhelper/bootstrap.hxx> #include <cppuhelper/component_context.hxx> #include <comphelper/processfactory.hxx> +#include <comphelper/propertysequence.hxx> #include <com/sun/star/chart2/data/XDataProvider.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> @@ -174,18 +175,12 @@ void SwInsertChart() uno::Reference< lang::XInitialization > xInit( xDialog, uno::UNO_QUERY ); if( xInit.is() ) { - uno::Reference< awt::XWindow > xDialogParentWindow(nullptr); // initialize dialog - uno::Sequence<uno::Any> aSeq(2); - uno::Any* pArray = aSeq.getArray(); - beans::PropertyValue aParam1; - aParam1.Name = "ParentWindow"; - aParam1.Value <<= xDialogParentWindow; - beans::PropertyValue aParam2; - aParam2.Name = "ChartModel"; - aParam2.Value <<= xChartModel; - pArray[0] <<= aParam1; - pArray[1] <<= aParam2; + uno::Sequence<uno::Any> aSeq(comphelper::InitAnyPropertySequence( + { + {"ParentWindow", uno::Any(uno::Reference< awt::XWindow >())}, + {"ChartModel", uno::Any(xChartModel)} + })); xInit->initialize( aSeq ); // try to set the dialog's position so it doesn't hide the chart |