summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/shells/annotsh.cxx12
-rw-r--r--sw/source/uibase/shells/drwtxtsh.cxx12
-rw-r--r--sw/source/uibase/table/chartins.cxx17
-rw-r--r--sw/source/uibase/uiview/viewling.cxx12
4 files changed, 21 insertions, 32 deletions
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index 3aa0f98d044a..ab78fad7aabc 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -116,6 +116,7 @@
#include <app.hrc>
#include <comphelper/string.hxx>
+#include <comphelper/propertysequence.hxx>
#include <cppuhelper/bootstrap.hxx>
#include <langhelper.hxx>
@@ -1289,13 +1290,10 @@ void SwAnnotationShell::ExecLingu(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
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index 4169bac09886..1c5bbb245ab3 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -44,6 +44,7 @@
#include <com/sun/star/i18n/TextConversionOption.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
+#include <comphelper/propertysequence.hxx>
#include <swtypes.hxx>
#include <view.hxx>
#include <wrtsh.hxx>
@@ -304,13 +305,10 @@ void SwDrawTextShell::ExecDrawLingu(SfxRequest &rReq)
return;
// initialize dialog
- Reference<awt::XWindow> xDialogParentWindow(nullptr);
- Sequence<Any> aSequence(1);
- Any* pArray = aSequence.getArray();
- PropertyValue aParam;
- aParam.Name = "ParentWindow";
- aParam.Value <<= xDialogParentWindow;
- pArray[0] <<= aParam;
+ uno::Sequence<uno::Any> aSequence(comphelper::InitAnyPropertySequence(
+ {
+ {"ParentWindow", uno::Any(Reference<awt::XWindow>())}
+ }));
xInit->initialize( aSequence );
//execute dialog
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
diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx
index baba813b4fbb..be812b0deb51 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -26,6 +26,7 @@
#include <linguistic/lngprops.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/propertyvalue.hxx>
+#include <comphelper/propertysequence.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/msgbox.hxx>
#include <svtools/ehdl.hxx>
@@ -126,13 +127,10 @@ void SwView::ExecLingu(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