diff options
author | Noel Grandin <noel@peralex.com> | 2012-06-01 15:15:25 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-06-06 10:53:34 +0200 |
commit | 0fcd1a73f0e1ec564f3c6da1ccd890183d3c18db (patch) | |
tree | 3895ecd6f804b8f3ef3a8f03f1739e17918feeef /sd/source/ui/tools | |
parent | 8a95074eaefd01621dc55db8567b19c8e6157f95 (diff) |
fdo#46808, Adapt UNO services to new style, Part 7, updating ::create
Update code to use factory method URLTransformer::create
Change-Id: I3fd2e838497bcfd8fc949615c0e7d60a6ea47118
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, added some tweaks.
Diffstat (limited to 'sd/source/ui/tools')
-rw-r--r-- | sd/source/ui/tools/SlotStateListener.cxx | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/sd/source/ui/tools/SlotStateListener.cxx b/sd/source/ui/tools/SlotStateListener.cxx index 567567477d1b..c9894eac7e51 100644 --- a/sd/source/ui/tools/SlotStateListener.cxx +++ b/sd/source/ui/tools/SlotStateListener.cxx @@ -31,6 +31,7 @@ #include <com/sun/star/frame/XStatusListener.hpp> #include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/frame/XDispatch.hpp> +#include <com/sun/star/util/URLTransformer.hpp> #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/beans/PropertyChangeEvent.hpp> @@ -125,19 +126,10 @@ void SlotStateListener::disposing (void) util::URL SlotStateListener::MakeURL (const OUString& rSlotName) const { util::URL aURL; - aURL.Complete = rSlotName; - uno::Reference<lang::XMultiServiceFactory> xServiceManager ( - ::comphelper::getProcessServiceFactory()); - if (xServiceManager.is()) - { - uno::Reference<util::XURLTransformer> xTransformer(xServiceManager->createInstance( - "com.sun.star.util.URLTransformer"), - uno::UNO_QUERY); - if (xTransformer.is()) - xTransformer->parseStrict(aURL); - } + uno::Reference<util::XURLTransformer> xTransformer(util::URLTransformer::create(::comphelper::getProcessComponentContext())); + xTransformer->parseStrict(aURL); return aURL; } |