summaryrefslogtreecommitdiff
path: root/cui
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 /cui
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 'cui')
-rw-r--r--cui/source/customize/cfg.cxx17
-rw-r--r--cui/source/options/optgdlg.cxx23
2 files changed, 17 insertions, 23 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 675e6370907a..0e9777aa1e19 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -95,6 +95,7 @@
#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
#include <com/sun/star/util/thePathSettings.hpp>
+#include <comphelper/propertysequence.hxx>
#include "dlgname.hxx"
@@ -2968,17 +2969,11 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( vcl::Window *pWindow,
uno::Reference< css::embed::XStorage > xStorage(
xStorageFactory->createInstanceWithArguments( aArgs ), uno::UNO_QUERY );
- uno::Sequence< uno::Any > aProp( 2 );
- beans::PropertyValue aPropValue;
-
- aPropValue.Name = "UserConfigStorage";
- aPropValue.Value <<= xStorage;
- aProp[ 0 ] <<= aPropValue;
-
- aPropValue.Name = "OpenMode";
- aPropValue.Value <<= css::embed::ElementModes::READWRITE;
- aProp[ 1 ] <<= aPropValue;
-
+ uno::Sequence<uno::Any> aProp(comphelper::InitAnyPropertySequence(
+ {
+ {"UserConfigStorage", uno::Any(xStorage)},
+ {"OpenMode", uno::Any(css::embed::ElementModes::READWRITE)}
+ }));
m_xImportedImageManager = css::ui::ImageManager::create( xComponentContext );
m_xImportedImageManager->initialize(aProp);
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 84ecbb97fb83..5d6829912867 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -44,6 +44,7 @@
#include <sfx2/objsh.hxx>
#include <comphelper/string.hxx>
#include <comphelper/types.hxx>
+#include <comphelper/propertysequence.hxx>
#include <svtools/langtab.hxx>
#include <unotools/localfilehelper.hxx>
#include <unotools/configmgr.hxx>
@@ -464,26 +465,24 @@ CanvasSettings::CanvasSettings() :
css::configuration::theDefaultProvider::get(
comphelper::getProcessComponentContext()));
- Any propValue(
- Any( NamedValue(
- "nodepath",
- Any( OUString("/org.openoffice.Office.Canvas") ) ) ) );
-
+ Sequence<Any> aArgs1(comphelper::InitAnyPropertySequence(
+ {
+ {"nodepath", Any(OUString("/org.openoffice.Office.Canvas"))}
+ }));
mxForceFlagNameAccess.set(
xConfigProvider->createInstanceWithArguments(
"com.sun.star.configuration.ConfigurationUpdateAccess",
- Sequence<Any>( &propValue, 1 ) ),
+ aArgs1 ),
UNO_QUERY_THROW );
- propValue <<=
- NamedValue(
- "nodepath",
- Any( OUString("/org.openoffice.Office.Canvas/CanvasServiceList") ) );
-
+ Sequence<Any> aArgs2(comphelper::InitAnyPropertySequence(
+ {
+ {"nodepath", Any(OUString("/org.openoffice.Office.Canvas/CanvasServiceList"))}
+ }));
Reference<XNameAccess> xNameAccess(
xConfigProvider->createInstanceWithArguments(
"com.sun.star.configuration.ConfigurationAccess",
- Sequence<Any>( &propValue, 1 ) ), UNO_QUERY_THROW );
+ aArgs2 ), UNO_QUERY_THROW );
Reference<XHierarchicalNameAccess> xHierarchicalNameAccess(
xNameAccess, UNO_QUERY_THROW);