summaryrefslogtreecommitdiff
path: root/desktop
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 /desktop
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 'desktop')
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.cxx22
-rw-r--r--desktop/source/deployment/misc/dp_descriptioninfoset.cxx11
2 files changed, 16 insertions, 17 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index ebbad45dd4e3..fa8724c84ccb 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -29,6 +29,7 @@
#include <com/sun/star/frame/TerminationVetoException.hpp>
#include <com/sun/star/ucb/CommandAbortedException.hpp>
#include <com/sun/star/ucb/CommandFailedException.hpp>
+#include <comphelper/propertysequence.hxx>
#include "dp_gui_dialog2.hxx"
#include "dp_gui_extensioncmdqueue.hxx"
@@ -64,23 +65,22 @@ TheExtensionManager::TheExtensionManager( const uno::Reference< awt::XWindow > &
uno::Reference< lang::XMultiServiceFactory > xConfig(
configuration::theDefaultProvider::get(xContext));
- uno::Any args[1];
- beans::PropertyValue aValue( "nodepath", 0, uno::Any( OUString("/org.openoffice.Office.OptionsDialog/Nodes") ),
- beans::PropertyState_DIRECT_VALUE );
- args[0] <<= aValue;
+ uno::Sequence<uno::Any> args(comphelper::InitAnyPropertySequence(
+ {
+ {"nodepath", uno::Any(OUString("/org.openoffice.Office.OptionsDialog/Nodes"))}
+ }));
m_xNameAccessNodes.set(
- xConfig->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess",
- uno::Sequence< uno::Any >( args, 1 )),
+ xConfig->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", args),
uno::UNO_QUERY_THROW);
// get the 'get more extensions here' url
+ uno::Sequence<uno::Any> args2(comphelper::InitAnyPropertySequence(
+ {
+ {"nodepath", uno::Any(OUString("/org.openoffice.Office.ExtensionManager/ExtensionRepositories"))}
+ }));
uno::Reference< container::XNameAccess > xNameAccessRepositories;
- beans::PropertyValue aValue2( "nodepath", 0, uno::Any( OUString("/org.openoffice.Office.ExtensionManager/ExtensionRepositories") ),
- beans::PropertyState_DIRECT_VALUE );
- args[0] <<= aValue2;
xNameAccessRepositories.set(
- xConfig->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess",
- uno::Sequence< uno::Any >( args, 1 )),
+ xConfig->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", args2),
uno::UNO_QUERY_THROW);
try
{ //throws css::container::NoSuchElementException, css::lang::WrappedTargetException
diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
index b1762ab7fd87..3acd182a8ed8 100644
--- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
+++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
@@ -25,6 +25,7 @@
#include <comphelper/sequence.hxx>
#include <comphelper/seqstream.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/propertysequence.hxx>
#include <boost/optional.hpp>
#include <com/sun/star/configuration/theDefaultProvider.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -350,12 +351,10 @@ void DescriptionInfoset::checkBlacklist() const
if (currentversion.getLength() == 0)
return; // nothing to check
- css::uno::Sequence< css::uno::Any > args = css::uno::Sequence< css::uno::Any >(1);
- css::beans::PropertyValue prop;
- prop.Name = "nodepath";
- prop.Value <<= OUString("/org.openoffice.Office.ExtensionDependencies/Extensions");
- args[0] <<= prop;
-
+ css::uno::Sequence<css::uno::Any> args(comphelper::InitAnyPropertySequence(
+ {
+ {"nodepath", css::uno::Any(OUString("/org.openoffice.Office.ExtensionDependencies/Extensions"))}
+ }));
css::uno::Reference< css::container::XNameAccess > blacklist(
(css::configuration::theDefaultProvider::get(m_context)
->createInstanceWithArguments(