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 /canvas | |
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 'canvas')
-rw-r--r-- | canvas/source/factory/cf_service.cxx | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/canvas/source/factory/cf_service.cxx b/canvas/source/factory/cf_service.cxx index d8eb242b5061..535f09c63727 100644 --- a/canvas/source/factory/cf_service.cxx +++ b/canvas/source/factory/cf_service.cxx @@ -32,6 +32,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XSingleComponentFactory.hpp> #include <com/sun/star/uno/XComponentContext.hpp> +#include <comphelper/propertysequence.hxx> #include <cppuhelper/factory.hxx> #include <cppuhelper/implbase.hxx> #include <cppuhelper/implementationentry.hxx> @@ -132,28 +133,24 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) : Reference<lang::XMultiServiceFactory> xConfigProvider( configuration::theDefaultProvider::get( m_xContext ) ); - Any propValue( - Any( beans::PropertyValue( - "nodepath", -1, - Any( OUString("/org.openoffice.Office.Canvas") ), - beans::PropertyState_DIRECT_VALUE ) ) ); - + uno::Sequence<uno::Any> aArgs(comphelper::InitAnyPropertySequence( + { + {"nodepath", uno::Any(OUString("/org.openoffice.Office.Canvas"))} + })); m_xCanvasConfigNameAccess.set( xConfigProvider->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", - Sequence<Any>( &propValue, 1 ) ), + aArgs ), UNO_QUERY_THROW ); - propValue <<= - beans::PropertyValue( - "nodepath", -1, - Any( OUString("/org.openoffice.Office.Canvas/CanvasServiceList") ), - beans::PropertyState_DIRECT_VALUE ); - + uno::Sequence<uno::Any> aArgs2(comphelper::InitAnyPropertySequence( + { + {"nodepath", uno::Any(OUString("/org.openoffice.Office.Canvas/CanvasServiceList"))} + })); Reference<container::XNameAccess> xNameAccess( xConfigProvider->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", - Sequence<Any>( &propValue, 1 ) ), UNO_QUERY_THROW ); + aArgs2 ), UNO_QUERY_THROW ); Reference<container::XHierarchicalNameAccess> xHierarchicalNameAccess( xNameAccess, UNO_QUERY_THROW); |