From 591ef7844079e93ff627c7e194c04d520d2f1d55 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 8 Feb 2013 11:02:37 +0200 Subject: fdo#46808, Use singleton util::theMacroExpander new-style constructor And deprecate the old-style service util::MacroExpander Change-Id: Ifcefe31a8f8c68c6d44d6ec19616727eb607e1cd --- sdext/source/minimizer/configurationaccess.cxx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'sdext') diff --git a/sdext/source/minimizer/configurationaccess.cxx b/sdext/source/minimizer/configurationaccess.cxx index 3057e91808bc..3a0f78af567e 100644 --- a/sdext/source/minimizer/configurationaccess.cxx +++ b/sdext/source/minimizer/configurationaccess.cxx @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include @@ -169,18 +169,14 @@ rtl::OUString ConfigurationAccess::getPath( const PPPOptimizerTokenEnum eToken ) try { static const OUString sProtocol( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.expand:" ) ); - static const OUString stheMacroExpander( RTL_CONSTASCII_USTRINGPARAM( "/singletons/com.sun.star.util.theMacroExpander" ) ); Reference< container::XNameAccess > xSet( OpenConfiguration( true ), UNO_QUERY_THROW ); if ( xSet->hasByName( TKGet( eToken ) ) ) xSet->getByName( TKGet( eToken ) ) >>= aPath; if ( aPath.match( sProtocol, 0 ) ) { rtl::OUString aTmp( aPath.copy( 20 ) ); - Reference< util::XMacroExpander > xExpander; - if ( mxMSF->getValueByName( stheMacroExpander ) >>= xExpander ) - { - aPath = xExpander->expandMacros( aTmp ); - } + Reference< util::XMacroExpander > xExpander = util::theMacroExpander::get(mxMSF); + aPath = xExpander->expandMacros( aTmp ); } } catch (const Exception&) -- cgit