summaryrefslogtreecommitdiff
path: root/ucb/source/ucp/hierarchy/hierarchydata.cxx
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 /ucb/source/ucp/hierarchy/hierarchydata.cxx
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 'ucb/source/ucp/hierarchy/hierarchydata.cxx')
-rw-r--r--ucb/source/ucp/hierarchy/hierarchydata.cxx49
1 files changed, 22 insertions, 27 deletions
diff --git a/ucb/source/ucp/hierarchy/hierarchydata.cxx b/ucb/source/ucp/hierarchy/hierarchydata.cxx
index b9ce98c567d2..bef1f9bd3883 100644
--- a/ucb/source/ucp/hierarchy/hierarchydata.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydata.cxx
@@ -37,6 +37,7 @@
#include <com/sun/star/container/XNameReplace.hpp>
#include <com/sun/star/util/XChangesBatch.hpp>
#include <com/sun/star/util/XOfficeInstallationDirectories.hpp>
+#include <comphelper/propertysequence.hxx>
#include "hierarchyprovider.hxx"
#include "hierarchyuri.hxx"
@@ -284,12 +285,10 @@ bool HierarchyEntry::setData( const HierarchyEntryData& rData )
bRoot = false;
}
- uno::Sequence< uno::Any > aArguments( 1 );
- beans::PropertyValue aProperty;
-
- aProperty.Name = CFGPROPERTY_NODEPATH;
- aProperty.Value <<= aParentPath;
- aArguments[ 0 ] <<= aProperty;
+ uno::Sequence<uno::Any> aArguments(comphelper::InitAnyPropertySequence(
+ {
+ {CFGPROPERTY_NODEPATH, uno::Any(aParentPath)}
+ }));
uno::Reference< util::XChangesBatch > xBatch(
m_xConfigProvider->createInstanceWithArguments(
@@ -537,12 +536,10 @@ bool HierarchyEntry::move(
bNewRoot = false;
}
- uno::Sequence< uno::Any > aArguments( 1 );
- beans::PropertyValue aProperty;
-
- aProperty.Name = CFGPROPERTY_NODEPATH;
- aProperty.Value <<= aOldParentPath;
- aArguments[ 0 ] <<= aProperty;
+ uno::Sequence<uno::Any> aArguments(comphelper::InitAnyPropertySequence(
+ {
+ {CFGPROPERTY_NODEPATH, uno::Any(aOldParentPath)}
+ }));
xOldParentBatch.set(
m_xConfigProvider->createInstanceWithArguments(
@@ -564,14 +561,15 @@ bool HierarchyEntry::move(
{
bDifferentParents = true;
- aProperty.Name = CFGPROPERTY_NODEPATH;
- aProperty.Value <<= aNewParentPath;
- aArguments[ 0 ] <<= aProperty;
+ uno::Sequence<uno::Any> aArguments2(comphelper::InitAnyPropertySequence(
+ {
+ {CFGPROPERTY_NODEPATH, uno::Any(aNewParentPath)}
+ }));
xNewParentBatch.set(
m_xConfigProvider->createInstanceWithArguments(
READWRITE_SERVICE_NAME,
- aArguments ),
+ aArguments2 ),
uno::UNO_QUERY );
OSL_ENSURE(
@@ -787,12 +785,10 @@ bool HierarchyEntry::remove()
bRoot = false;
}
- uno::Sequence< uno::Any > aArguments( 1 );
- beans::PropertyValue aProperty;
-
- aProperty.Name = CFGPROPERTY_NODEPATH;
- aProperty.Value <<= aParentPath;
- aArguments[ 0 ] <<= aProperty;
+ uno::Sequence<uno::Any> aArguments(comphelper::InitAnyPropertySequence(
+ {
+ {CFGPROPERTY_NODEPATH, uno::Any(aParentPath)}
+ }));
uno::Reference< util::XChangesBatch > xBatch(
m_xConfigProvider->createInstanceWithArguments(
@@ -1021,11 +1017,10 @@ HierarchyEntry::getRootReadAccess()
{
// Create Root object.
- uno::Sequence< uno::Any > aArguments( 1 );
- beans::PropertyValue aProperty;
- aProperty.Name = CFGPROPERTY_NODEPATH;
- aProperty.Value <<= OUString(); // root path
- aArguments[ 0 ] <<= aProperty;
+ uno::Sequence<uno::Any> aArguments(comphelper::InitAnyPropertySequence(
+ {
+ {CFGPROPERTY_NODEPATH, uno::Any(OUString())} // root path
+ }));
m_bTriedToGetRootReadAccess = true;