From 86c1ebc1ef4a90e9bc58fb69c2d1d978765a34ca Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 8 May 2013 15:02:35 +0200 Subject: fdo#46808, Convert util::PathSettings service to new style Change-Id: I302be46b46518e1e872771e1c8a0647f7c330b30 --- vcl/source/window/dialog.cxx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'vcl/source/window/dialog.cxx') diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 4ea01eb635e5..c0bb50162f9f 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include @@ -477,19 +478,15 @@ Dialog::Dialog( WindowType nType ) ImplInitDialogData(); } -#define BASEPATH_SHARE_LAYER OUString("UIConfig") #define RELPATH_SHARE_LAYER OUString("soffice.cfg") -#define SERVICENAME_PATHSETTINGS OUString("com.sun.star.util.PathSettings") OUString VclBuilderContainer::getUIRootDir() { /*to-do, check if user config has an override before using shared one, etc*/ - css::uno::Reference< css::beans::XPropertySet > xPathSettings( - ::comphelper::getProcessServiceFactory()->createInstance(SERVICENAME_PATHSETTINGS), - css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::util::XPathSettings > xPathSettings = css::util::PathSettings::create( + ::comphelper::getProcessComponentContext() ); - OUString sShareLayer; - xPathSettings->getPropertyValue(BASEPATH_SHARE_LAYER) >>= sShareLayer; + OUString sShareLayer = xPathSettings->getBasePathShareLayer(); // "UIConfig" is a "multi path" ... use first part only here! sal_Int32 nPos = sShareLayer.indexOf(';'); -- cgit v1.2.3