21 #include <com/sun/star/frame/XDispatchProvider.hpp>
22 #include <com/sun/star/frame/XSynchronousDispatch.hpp>
23 #include <com/sun/star/lang/XComponent.hpp>
24 #include <com/sun/star/util/URLTransformer.hpp>
37 const uno::Reference< uno::XInterface > &xStartPoint,
39 const OUString &sTarget,
40 const uno::Sequence< beans::PropertyValue > &lArguments )
45 xTrans->parseStrict( aURL );
47 uno::Reference < frame::XDispatch > xDispatcher;
48 uno::Reference < frame::XDispatchProvider > xProvider( xStartPoint, uno::UNO_QUERY );
51 xDispatcher = xProvider->queryDispatch( aURL, sTarget, 0 );
53 uno::Reference < lang::XComponent > aComponent;
55 if ( xDispatcher.is() )
60 uno::Reference < frame::XSynchronousDispatch > xSyncDisp( xDispatcher, uno::UNO_QUERY_THROW );
62 aRet = xSyncDisp->dispatchWithReturnValue( aURL, lArguments );
66 catch ( uno::Exception& )
68 SAL_WARN(
"comphelper",
"SynchronousDispatch::dispatch() Error while dispatching!");
static COMPHELPER_DLLPUBLIC css::uno::Reference< css::lang::XComponent > dispatch(const css::uno::Reference< css::uno::XInterface > &xStartPoint, const OUString &sURL, const OUString &sTarget, const css::uno::Sequence< css::beans::PropertyValue > &lArguments)
Reference< XComponentContext > getProcessComponentContext()
This function gets the process service factory's default component context.
#define SAL_WARN(area, stream)