summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/drawfunc/fuins2.cxx18
-rw-r--r--sc/source/ui/view/cellsh1.cxx12
2 files changed, 11 insertions, 19 deletions
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index 025934679a6c..3409bfa3db43 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -48,6 +48,7 @@
#include <cppuhelper/component_context.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
+#include <comphelper/propertysequence.hxx>
#include <com/sun/star/embed/EmbedVerbs.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/chart2/data/XDataProvider.hpp>
@@ -650,18 +651,11 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV
uno::Reference< lang::XInitialization > xInit( xDialog, uno::UNO_QUERY );
if( xChartModel.is() && 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
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index e559a6b782c8..269ff7a68890 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -26,6 +26,7 @@
#include <sfx2/viewfrm.hxx>
#include <comphelper/lok.hxx>
+#include <comphelper/propertysequence.hxx>
#include <svl/stritem.hxx>
#include <svl/whiter.hxx>
#include <svl/zforlist.hxx>
@@ -1749,13 +1750,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if( xInit.is() )
{
// initialize dialog
- Reference< awt::XWindow > xDialogParentWindow(nullptr);
- Sequence<Any> aSeq(1);
- Any* pArray = aSeq.getArray();
- PropertyValue aParam;
- aParam.Name = "ParentWindow";
- aParam.Value <<= xDialogParentWindow;
- pArray[0] <<= aParam;
+ uno::Sequence<uno::Any> aSeq(comphelper::InitAnyPropertySequence(
+ {
+ {"ParentWindow", uno::Any(Reference< awt::XWindow >())}
+ }));
xInit->initialize( aSeq );
//execute dialog