diff options
author | Noel Grandin <noel@peralex.com> | 2013-02-08 11:02:37 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-02-11 08:02:13 +0200 |
commit | 591ef7844079e93ff627c7e194c04d520d2f1d55 (patch) | |
tree | 39c16f140ef2eae20f00a6c078d49519d4bd6bdc /sdext/source | |
parent | fdo#46808, Convert to getProcessComponentContext() (diff) | |
download | core-591ef7844079e93ff627c7e194c04d520d2f1d55.tar.gz core-591ef7844079e93ff627c7e194c04d520d2f1d55.zip |
fdo#46808, Use singleton util::theMacroExpander new-style constructor
And deprecate the old-style service util::MacroExpander
Change-Id: Ifcefe31a8f8c68c6d44d6ec19616727eb607e1cd
Diffstat (limited to 'sdext/source')
-rw-r--r-- | sdext/source/minimizer/configurationaccess.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
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 <com/sun/star/configuration/theDefaultProvider.hpp> #include <com/sun/star/util/XChangesBatch.hpp> #include <com/sun/star/container/XNameContainer.hpp> -#include <com/sun/star/util/XMacroExpander.hpp> +#include <com/sun/star/util/theMacroExpander.hpp> #include <com/sun/star/lang/XSingleServiceFactory.hpp> #include <sal/macros.h> @@ -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&) |