summaryrefslogtreecommitdiff
path: root/unotools/source/config/fontcfg.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 /unotools/source/config/fontcfg.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 'unotools/source/config/fontcfg.cxx')
-rw-r--r--unotools/source/config/fontcfg.cxx19
1 files changed, 9 insertions, 10 deletions
diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx
index 8d432e9b7c20..84f48885e7af 100644
--- a/unotools/source/config/fontcfg.cxx
+++ b/unotools/source/config/fontcfg.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/configuration/theDefaultProvider.hpp>
+#include <comphelper/propertysequence.hxx>
#include <unotools/configpaths.hxx>
#include <unotools/syslocale.hxx>
#include <rtl/ustrbuf.hxx>
@@ -102,11 +103,10 @@ DefaultFontConfiguration::DefaultFontConfiguration()
{
// get service provider
m_xConfigProvider = theDefaultProvider::get(comphelper::getProcessComponentContext());
- Sequence< Any > aArgs(1);
- PropertyValue aVal;
- aVal.Name = "nodepath";
- aVal.Value <<= OUString( "/org.openoffice.VCL/DefaultFonts" );
- aArgs.getArray()[0] <<= aVal;
+ Sequence<Any> aArgs(comphelper::InitAnyPropertySequence(
+ {
+ {"nodepath", Any(OUString( "/org.openoffice.VCL/DefaultFonts" ))}
+ }));
m_xConfigAccess =
Reference< XNameAccess >(
m_xConfigProvider->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess",
@@ -355,11 +355,10 @@ FontSubstConfiguration::FontSubstConfiguration() :
Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() );
// create configuration hierarchical access name
m_xConfigProvider = theDefaultProvider::get( xContext );
- Sequence< Any > aArgs(1);
- PropertyValue aVal;
- aVal.Name = "nodepath";
- aVal.Value <<= OUString( "/org.openoffice.VCL/FontSubstitutions" );
- aArgs.getArray()[0] <<= aVal;
+ Sequence<Any> aArgs(comphelper::InitAnyPropertySequence(
+ {
+ {"nodepath", Any(OUString( "/org.openoffice.VCL/FontSubstitutions" ))}
+ }));
m_xConfigAccess =
Reference< XNameAccess >(
m_xConfigProvider->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess",