24#include <com/sun/star/frame/XDispatchProvider.hpp>
25#include <com/sun/star/util/URL.hpp>
26#include <com/sun/star/frame/DispatchDescriptor.hpp>
27#include <com/sun/star/frame/XFrame.hpp>
28#include <com/sun/star/uno/XComponentContext.hpp>
67class DispatchProvider final :
public ::cppu::WeakImplHelper< css::frame::XDispatchProvider >
72 css::uno::Reference< css::uno::XComponentContext >
m_xContext;
74 css::uno::WeakReference< css::frame::XFrame >
m_xFrame;
77 std::unordered_map<OUString, css::uno::Reference<css::frame::XDispatchProvider>>
83 DispatchProvider( css::uno::Reference< css::uno::XComponentContext > xContext ,
84 const css::uno::Reference< css::frame::XFrame >& xFrame );
86 virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL
queryDispatch (
const css::util::URL& aURL ,
87 const OUString& sTargetFrameName ,
88 sal_Int32 nSearchFlags )
override;
89 virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL
queryDispatches(
const css::uno::Sequence< css::frame::DispatchDescriptor >& lDescriptions )
override;
99 const css::uno::Reference< css::frame::XFrame >& xOwner ,
100 const OUString& sTarget = OUString() ,
101 sal_Int32 nSearchFlags = 0 );
103 css::uno::Reference< css::frame::XDispatch >
implts_queryDesktopDispatch (
const css::uno::Reference< css::frame::XFrame >& xDesktop ,
104 const css::util::URL& aURL ,
105 const OUString& sTargetFrameName ,
106 sal_Int32 nSearchFlags );
107 css::uno::Reference< css::frame::XDispatch >
implts_queryFrameDispatch (
const css::uno::Reference< css::frame::XFrame >& xFrame ,
108 const css::util::URL& aURL ,
109 const OUString& sTargetFrameName ,
110 sal_Int32 nSearchFlags );
implement a helper for XDispatchProvider interface @descr The result of a queryDispatch() call depend...
css::uno::Reference< css::frame::XDispatch > implts_queryDesktopDispatch(const css::uno::Reference< css::frame::XFrame > &xDesktop, const css::util::URL &aURL, const OUString &sTargetFrameName, sal_Int32 nSearchFlags)
helper for queryDispatch() @descr Every member of the frame tree (frame, desktop) must handle such re...
css::uno::Reference< css::frame::XDispatch > implts_getOrCreateDispatchHelper(EDispatchHelper eHelper, const css::uno::Reference< css::frame::XFrame > &xOwner, const OUString &sTarget=OUString(), sal_Int32 nSearchFlags=0)
get or create new dispatch helper @descr Sometimes we need some helper implementations to support dis...
css::uno::Reference< css::frame::XDispatch > implts_searchProtocolHandler(const css::util::URL &aURL)
search for a registered protocol handler and ask him for a dispatch object @descr We search a suitabl...
css::uno::Reference< css::frame::XDispatch > implts_queryFrameDispatch(const css::uno::Reference< css::frame::XFrame > &xFrame, const css::util::URL &aURL, const OUString &sTargetFrameName, sal_Int32 nSearchFlags)
css::uno::WeakReference< css::frame::XFrame > m_xFrame
weakreference to owner frame (Don't use a hard reference. Owner can't delete us then!...
virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches(const css::uno::Sequence< css::frame::DispatchDescriptor > &lDescriptions) override
std::unordered_map< OUString, css::uno::Reference< css::frame::XDispatchProvider > > m_aProtocolHandlers
DispatchProvider(css::uno::Reference< css::uno::XComponentContext > xContext, const css::uno::Reference< css::frame::XFrame > &xFrame)
standard ctor/dtor @descr These initialize a new instance of this class with needed information for w...
HandlerCache m_aProtocolHandlerCache
cache of some other dispatch provider which are registered inside configuration to handle special URL...
bool implts_isLoadableContent(const css::util::URL &aURL)
check URL for support by our used loader or handler @descr If we must return our own dispatch helper ...
virtual ~DispatchProvider() override
protected(!) dtor for deinitializing @descr We made it protected to prevent using of us as base class...
css::uno::Reference< css::uno::XComponentContext > m_xContext
reference to global service manager to create new services
void ClearProtocolHandlers()
virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch(const css::util::URL &aURL, const OUString &sTargetFrameName, sal_Int32 nSearchFlags) override
EDispatchHelper
@descr We know some special dispatch objects with different functionality.
@ E_STARTMODULEDISPATCHER