summaryrefslogtreecommitdiff
path: root/xmlhelp
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 /xmlhelp
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 'xmlhelp')
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.cxx10
-rw-r--r--xmlhelp/source/treeview/tvfactory.cxx16
-rw-r--r--xmlhelp/source/treeview/tvread.cxx10
3 files changed, 17 insertions, 19 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 0deeea6217d7..27a61b238da6 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -29,6 +29,7 @@
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/awt/Toolkit.hpp>
#include <com/sun/star/i18n/Collator.hpp>
+#include <comphelper/propertysequence.hxx>
#include "inputstream.hxx"
#include <algorithm>
#include <cassert>
@@ -200,11 +201,10 @@ OString Databases::getImageTheme()
configuration::theDefaultProvider::get(m_xContext);
// set root path
- uno::Sequence < uno::Any > lParams(1);
- beans::PropertyValue aParam ;
- aParam.Name = "nodepath";
- aParam.Value <<= OUString("org.openoffice.Office.Common");
- lParams[0] <<= aParam;
+ uno::Sequence<uno::Any> lParams(comphelper::InitAnyPropertySequence(
+ {
+ {"nodepath", uno::Any(OUString("org.openoffice.Office.Common"))}
+ }));
// open it
uno::Reference< uno::XInterface > xCFG( xConfigProvider->createInstanceWithArguments(
diff --git a/xmlhelp/source/treeview/tvfactory.cxx b/xmlhelp/source/treeview/tvfactory.cxx
index 5e0ff8832ebf..bd685d19dab2 100644
--- a/xmlhelp/source/treeview/tvfactory.cxx
+++ b/xmlhelp/source/treeview/tvfactory.cxx
@@ -21,6 +21,7 @@
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <comphelper/processfactory.hxx>
+#include <comphelper/propertysequence.hxx>
#include <cppuhelper/supportsservice.hxx>
#include "tvfactory.hxx"
#include "tvread.hxx"
@@ -66,15 +67,12 @@ Reference< XInterface > SAL_CALL
TVFactory::createInstance(
const OUString& aServiceSpecifier )
{
- Sequence< Any > seq( 1 );
- seq[0] <<= PropertyValue(
- "nodepath",
- -1,
- Any( OUString() ),
- PropertyState_DIRECT_VALUE );
-
- return createInstanceWithArguments( aServiceSpecifier,
- seq );
+ uno::Sequence<uno::Any> seq(comphelper::InitAnyPropertySequence(
+ {
+ {"nodepath", uno::Any(OUString())}
+ }));
+
+ return createInstanceWithArguments( aServiceSpecifier, seq );
}
Reference< XInterface > SAL_CALL
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx
index 4e726a2bf2b6..424ec3029ada 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -30,6 +30,7 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <comphelper/processfactory.hxx>
+#include <comphelper/propertysequence.hxx>
#include <com/sun/star/deployment/thePackageManagerFactory.hpp>
#include <com/sun/star/util/theMacroExpander.hpp>
#include <com/sun/star/uri/UriReferenceFactory.hpp>
@@ -614,11 +615,10 @@ ConfigData TVChildTarget::init( const Reference< XComponentContext >& xContext )
{
Reference< lang::XMultiServiceFactory > xConfigProvider = theDefaultProvider::get( xContext );
- uno::Sequence < uno::Any > lParams(1);
- beans::PropertyValue aParam ;
- aParam.Name = "nodepath";
- aParam.Value <<= OUString("/org.openoffice.Setup/Product");
- lParams[0] <<= aParam;
+ uno::Sequence<uno::Any> lParams(comphelper::InitAnyPropertySequence(
+ {
+ {"nodepath", uno::Any(OUString("/org.openoffice.Setup/Product"))}
+ }));
// open it
uno::Reference< uno::XInterface > xCFG( xConfigProvider->createInstanceWithArguments(