From fb0f7c2415321a3bcae00802b98ae76144ea4e79 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 13 Feb 2013 08:31:59 +0200 Subject: fdo#46808, convert singleton util::theOfficeInstallationDirectories .. to new-style UNO. And deprecate old service in favour of singleton. Change-Id: I67244097c22af02530214d7c529dd0d32f5964c1 --- svtools/source/misc/templatefoldercache.cxx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'svtools/source/misc') diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx index 18e873024165..538c2246111a 100644 --- a/svtools/source/misc/templatefoldercache.cxx +++ b/svtools/source/misc/templatefoldercache.cxx @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -829,13 +829,7 @@ namespace svt { uno::Reference< uno::XComponentContext > xCtx( comphelper::getProcessComponentContext() ); - xCtx->getValueByName( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "/singletons/com.sun.star.util.theOfficeInstallationDirectories" ) ) ) - >>= m_xOfficeInstDirs; - - OSL_ENSURE( m_xOfficeInstDirs.is(), - "Unable to obtain office directories singleton!" ); + m_xOfficeInstDirs = util::theOfficeInstallationDirectories::get(xCtx); } } return m_xOfficeInstDirs; -- cgit