diff options
Diffstat (limited to 'xmlhelp')
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/databases.cxx | 10 | ||||
-rw-r--r-- | xmlhelp/source/treeview/tvfactory.cxx | 16 | ||||
-rw-r--r-- | xmlhelp/source/treeview/tvread.cxx | 10 |
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( |