diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-09-29 17:20:22 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-29 18:18:28 +0200 |
commit | c2ca6fabd1afc3fc07001721c2069d3c8db7000a (patch) | |
tree | 350741d6d19564bcaf00506bd7d22b4c644e0fdc /unotools | |
parent | f05d7abf93bbcf443cb0b5759ca19992e2fa85a3 (diff) |
Use comphelper::getComponentContext
...and some further clean up.
Change-Id: Id294c0f38fe0041646fc86cacbd2e19734c746a9
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/config/lingucfg.cxx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx index be309293d466..e8956c464d18 100644 --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx @@ -24,7 +24,6 @@ #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/container/XNameReplace.hpp> #include "com/sun/star/util/XMacroExpander.hpp" -#include "com/sun/star/beans/XPropertySet.hpp" #include <rtl/uri.hxx> #include <rtl/instance.hxx> #include <osl/mutex.hxx> @@ -939,16 +938,12 @@ static uno::Reference< util::XMacroExpander > lcl_GetMacroExpander() { if ( !xMacroExpander.is() ) { - uno::Reference< uno::XComponentContext > xContext; - uno::Reference< beans::XPropertySet > xProps( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY ); - xProps->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext"))) >>= xContext; - if ( xContext.is() ) - { - aG_xMacroExpander = uno::Reference< com::sun::star::util::XMacroExpander >( xContext->getValueByName( + uno::Reference< uno::XComponentContext > xContext( + comphelper::getProcessComponentContext() ); + aG_xMacroExpander = uno::Reference< com::sun::star::util::XMacroExpander >( xContext->getValueByName( OUString(RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.util.theMacroExpander"))), uno::UNO_QUERY ); - xMacroExpander = aG_xMacroExpander; - } + xMacroExpander = aG_xMacroExpander; } } |