summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-25 09:34:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-25 12:03:17 +0200
commitf74da1315a5b2ec232a66944e41ff90231b383be (patch)
tree60d464c45df3531013642d61cbc8302ac815a1ae /sw/source
parent04a6a5d5cdc6889c6f0e41b3df537f59baeee9f9 (diff)
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')
-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