diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-25 09:34:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-25 12:03:17 +0200 |
commit | f74da1315a5b2ec232a66944e41ff90231b383be (patch) | |
tree | 60d464c45df3531013642d61cbc8302ac815a1ae /sdext | |
parent | 04a6a5d5cdc6889c6f0e41b3df537f59baeee9f9 (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 'sdext')
-rw-r--r-- | sdext/source/minimizer/configurationaccess.cxx | 14 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterConfigurationAccess.cxx | 23 |
2 files changed, 13 insertions, 24 deletions
diff --git a/sdext/source/minimizer/configurationaccess.cxx b/sdext/source/minimizer/configurationaccess.cxx index 69048f3d3413..389bbecc1176 100644 --- a/sdext/source/minimizer/configurationaccess.cxx +++ b/sdext/source/minimizer/configurationaccess.cxx @@ -25,6 +25,7 @@ #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/util/theMacroExpander.hpp> #include <com/sun/star/lang/XSingleServiceFactory.hpp> +#include <comphelper/propertysequence.hxx> #include <sal/macros.h> using namespace ::com::sun::star; @@ -289,14 +290,11 @@ Reference< XInterface > ConfigurationAccess::OpenConfiguration( bool bReadOnly ) try { Reference< lang::XMultiServiceFactory > xProvider = configuration::theDefaultProvider::get( mxContext ); - Sequence< Any > aCreationArguments( 2 ); - aCreationArguments[0] <<= PropertyValue( - "nodepath", 0, - makeAny( GetPathToConfigurationRoot() ), - PropertyState_DIRECT_VALUE ); - aCreationArguments[1] <<= beans::PropertyValue( - "lazywrite", 0, makeAny( true ), - PropertyState_DIRECT_VALUE ); + uno::Sequence<uno::Any> aCreationArguments(comphelper::InitAnyPropertySequence( + { + {"nodepath", uno::Any(GetPathToConfigurationRoot())}, + {"lazywrite", uno::Any(true)} + })); OUString sAccessService; if ( bReadOnly ) sAccessService = "com.sun.star.configuration.ConfigurationAccess"; diff --git a/sdext/source/presenter/PresenterConfigurationAccess.cxx b/sdext/source/presenter/PresenterConfigurationAccess.cxx index 262e2b145b8a..f6ce8b4421ba 100644 --- a/sdext/source/presenter/PresenterConfigurationAccess.cxx +++ b/sdext/source/presenter/PresenterConfigurationAccess.cxx @@ -24,6 +24,7 @@ #include <com/sun/star/container/XHierarchicalNameAccess.hpp> #include <com/sun/star/configuration/theDefaultProvider.hpp> #include <com/sun/star/util/XChangesBatch.hpp> +#include <comphelper/propertysequence.hxx> #include <osl/diagnose.h> using namespace ::com::sun::star; @@ -45,22 +46,12 @@ PresenterConfigurationAccess::PresenterConfigurationAccess ( { if (rxContext.is()) { - Sequence<Any> aCreationArguments(3); - aCreationArguments[0] <<= beans::PropertyValue( - "nodepath", - 0, - makeAny(rsRootName), - beans::PropertyState_DIRECT_VALUE); - aCreationArguments[1] <<= beans::PropertyValue( - "depth", - 0, - makeAny((sal_Int32)-1), - beans::PropertyState_DIRECT_VALUE); - aCreationArguments[2] <<= beans::PropertyValue( - "lazywrite", - 0, - makeAny(true), - beans::PropertyState_DIRECT_VALUE); + uno::Sequence<uno::Any> aCreationArguments(comphelper::InitAnyPropertySequence( + { + {"nodepath", uno::Any(rsRootName)}, + {"depth", uno::Any((sal_Int32)-1)}, + {"lazywrite", uno::Any(true)} + })); OUString sAccessService; if (eMode == READ_ONLY) |