summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-02-08 11:02:37 +0200
committerNoel Grandin <noel@peralex.com>2013-02-11 08:02:13 +0200
commit591ef7844079e93ff627c7e194c04d520d2f1d55 (patch)
tree39c16f140ef2eae20f00a6c078d49519d4bd6bdc /basic
parent81c967e06e4247dec7ecb9ffec695ba31cb4f057 (diff)
fdo#46808, Use singleton util::theMacroExpander new-style constructor
And deprecate the old-style service util::MacroExpander Change-Id: Ifcefe31a8f8c68c6d44d6ec19616727eb607e1cd
Diffstat (limited to 'basic')
-rw-r--r--basic/source/uno/namecont.cxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 2a61123290e3..eb2dceb389ed 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -54,6 +54,7 @@
#include <com/sun/star/script/vba/VBAScriptEventId.hpp>
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <com/sun/star/util/PathSubstitution.hpp>
+#include <com/sun/star/util/theMacroExpander.hpp>
#include <com/sun/star/deployment/ExtensionManager.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
@@ -2848,14 +2849,7 @@ OUString SfxLibraryContainer::expand_url( const OUString& url )
if( !mxMacroExpander.is() )
{
Reference< XComponentContext > xContext(comphelper::getComponentContext( mxMSF ) );
- Reference< util::XMacroExpander > xExpander;
- xContext->getValueByName( OUString("/singletons/com.sun.star.util.theMacroExpander") ) >>= xExpander;
- if(! xExpander.is())
- {
- throw uno::DeploymentException(
- OUString("no macro expander singleton available!"),
- Reference< XInterface >() );
- }
+ Reference< util::XMacroExpander > xExpander = util::theMacroExpander::get(xContext);
MutexGuard guard( Mutex::getGlobalMutex() );
if( !mxMacroExpander.is() )
{