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 /sw | |
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 'sw')
-rw-r--r-- | sw/source/ui/uiview/viewling.cxx | 9 | ||||
-rw-r--r-- | sw/source/ui/utlui/uitool.cxx | 3 |
2 files changed, 4 insertions, 8 deletions
diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index 5c94fcf272ca..1722998e6499 100644 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -79,6 +79,7 @@ #include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/util/URL.hpp> #include <com/sun/star/beans/PropertyValue.hpp> +#include <com/sun/star/util/URLTransformer.hpp> #include <com/sun/star/util/XURLTransformer.hpp> #include <vcl/svapp.hxx> @@ -749,17 +750,11 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt) xFrame = pSfxViewFrame->GetFrame().GetFrameInterface(); com::sun::star::util::URL aURL; uno::Reference< frame::XDispatchProvider > xDispatchProvider( xFrame, UNO_QUERY ); - uno::Reference< lang::XMultiServiceFactory > xMgr( comphelper::getProcessServiceFactory(), uno::UNO_QUERY ); try { uno::Reference< frame::XDispatch > xDispatch; - uno::Reference< util::XURLTransformer > xURLTransformer; - if (xMgr.is()) - { - xURLTransformer = uno::Reference< util::XURLTransformer >( xMgr->createInstance( - C2U("com.sun.star.util.URLTransformer")), UNO_QUERY); - } + uno::Reference< util::XURLTransformer > xURLTransformer = util::URLTransformer::create(comphelper::getProcessComponentContext()); aURL.Complete = aCommand; xURLTransformer->parseStrict(aURL); diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx index 4c6c8004af38..13fc0fe55757 100644 --- a/sw/source/ui/utlui/uitool.cxx +++ b/sw/source/ui/utlui/uitool.cxx @@ -51,6 +51,7 @@ #include <unotools/localedatawrapper.hxx> #include <com/sun/star/frame/XDispatch.hpp> #include <com/sun/star/frame/XDispatchProvider.hpp> +#include <com/sun/star/util/URLTransformer.hpp> #include <com/sun/star/util/XURLTransformer.hpp> #include <comphelper/processfactory.hxx> #include <sfx2/viewfrm.hxx> @@ -740,7 +741,7 @@ bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, sal_uInt16 uno::Reference < frame::XDispatchProvider > xProv( xFrame, uno::UNO_QUERY ); util::URL aURL; aURL.Complete = sCommand; - uno::Reference < util::XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.URLTransformer"))), uno::UNO_QUERY ); + uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create(::comphelper::getProcessComponentContext() ) ); xTrans->parseStrict( aURL ); uno::Reference< frame::XDispatch > xDisp = xProv->queryDispatch( aURL, ::rtl::OUString(), 0 ); if( xDisp.is() ) |