summaryrefslogtreecommitdiff
path: root/stoc
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 /stoc
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 'stoc')
-rw-r--r--stoc/source/javavm/javavm.cxx37
1 files changed, 11 insertions, 26 deletions
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index 0a6105b013cd..4ae249b893c2 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -50,6 +50,7 @@
#include <com/sun/star/uno/XInterface.hpp>
#include <com/sun/star/util/theMacroExpander.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
+#include <comphelper/propertysequence.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase.hxx>
@@ -1301,19 +1302,11 @@ void JavaVirtualMachine::registerConfigChangesListener()
{
// We register this instance as listener to changes in org.openoffice.Inet/Settings
// arguments for ConfigurationAccess
- css::uno::Sequence< css::uno::Any > aArguments(2);
- aArguments[0] <<= css::beans::PropertyValue(
- "nodepath",
- 0,
- css::uno::makeAny(OUString("org.openoffice.Inet/Settings")),
- css::beans::PropertyState_DIRECT_VALUE);
- // depth: -1 means unlimited
- aArguments[1] <<= css::beans::PropertyValue(
- "depth",
- 0,
- css::uno::makeAny( (sal_Int32)-1),
- css::beans::PropertyState_DIRECT_VALUE);
-
+ css::uno::Sequence<css::uno::Any> aArguments(comphelper::InitAnyPropertySequence(
+ {
+ {"nodepath", css::uno::Any(OUString("org.openoffice.Inet/Settings"))},
+ {"depth", css::uno::Any((sal_Int32)-1)}
+ }));
m_xInetConfiguration.set(
xConfigProvider->createInstanceWithArguments(
"com.sun.star.configuration.ConfigurationAccess",
@@ -1324,19 +1317,11 @@ void JavaVirtualMachine::registerConfigChangesListener()
m_xInetConfiguration->addContainerListener(this);
// now register as listener to changes in org.openoffice.Java/VirtualMachine
- css::uno::Sequence< css::uno::Any > aArguments2(2);
- aArguments2[0] <<= css::beans::PropertyValue(
- "nodepath",
- 0,
- css::uno::makeAny(OUString("org.openoffice.Office.Java/VirtualMachine")),
- css::beans::PropertyState_DIRECT_VALUE);
- // depth: -1 means unlimited
- aArguments2[1] <<= css::beans::PropertyValue(
- "depth",
- 0,
- css::uno::makeAny( (sal_Int32)-1),
- css::beans::PropertyState_DIRECT_VALUE);
-
+ css::uno::Sequence<css::uno::Any> aArguments2(comphelper::InitAnyPropertySequence(
+ {
+ {"nodepath", css::uno::Any(OUString("org.openoffice.Office.Java/VirtualMachine"))},
+ {"depth", css::uno::Any((sal_Int32)-1)} // depth: -1 means unlimited
+ }));
m_xJavaConfiguration.set(
xConfigProvider->createInstanceWithArguments(
"com.sun.star.configuration.ConfigurationAccess",