diff options
Diffstat (limited to 'UnoControls')
-rw-r--r-- | UnoControls/Library_ctl.mk | 1 | ||||
-rw-r--r-- | UnoControls/source/controls/framecontrol.cxx | 25 |
2 files changed, 14 insertions, 12 deletions
diff --git a/UnoControls/Library_ctl.mk b/UnoControls/Library_ctl.mk index 9e7fc16f6d70..1bedad8f1fcc 100644 --- a/UnoControls/Library_ctl.mk +++ b/UnoControls/Library_ctl.mk @@ -39,6 +39,7 @@ $(eval $(call gb_Library_use_api,ctl,\ )) $(eval $(call gb_Library_use_libraries,ctl,\ + comphelper \ cppu \ cppuhelper \ sal \ diff --git a/UnoControls/source/controls/framecontrol.cxx b/UnoControls/source/controls/framecontrol.cxx index 0504a11a354a..1f9838cda3f8 100644 --- a/UnoControls/source/controls/framecontrol.cxx +++ b/UnoControls/source/controls/framecontrol.cxx @@ -37,10 +37,12 @@ // includes of other projects //______________________________________________________________________________________________________________ #include <com/sun/star/frame/XDispatchProvider.hpp> +#include <com/sun/star/util/URLTransformer.hpp> #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/frame/XDispatch.hpp> #include <com/sun/star/frame/FrameSearchFlag.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> +#include <comphelper/componentcontext.hxx> #include <cppuhelper/typeprovider.hxx> #include <osl/diagnose.h> @@ -497,20 +499,19 @@ void FrameControl::impl_createFrame( const Reference< XWindowPeer >& xPee // option //xFrame->setName( "WhatYouWant" ); - Reference< XURLTransformer > xTrans ( impl_getMultiServiceFactory()->createInstance ( "com.sun.star.util.URLTransformer" ), UNO_QUERY ) ; - if(xTrans.is()) - { - // load file - URL aURL ; + Reference< XURLTransformer > xTrans ( + URLTransformer::create( + ::comphelper::ComponentContext( impl_getMultiServiceFactory() ).getUNOContext() ) ); + // load file + URL aURL ; - aURL.Complete = rURL ; - xTrans->parseStrict( aURL ) ; + aURL.Complete = rURL ; + xTrans->parseStrict( aURL ) ; - Reference< XDispatch > xDisp = xDSP->queryDispatch ( aURL, OUString (), FrameSearchFlag::SELF ) ; - if (xDisp.is()) - { - xDisp->dispatch ( aURL, rArguments ) ; - } + Reference< XDispatch > xDisp = xDSP->queryDispatch ( aURL, OUString (), FrameSearchFlag::SELF ) ; + if (xDisp.is()) + { + xDisp->dispatch ( aURL, rArguments ) ; } } |