I have a c++ extension based on example LibreOffice\sdk\examples\cpp\complextoolbarcontrols\MyProtocolHandler.h
I want to extend it to intercept all actions from GUI or keyboard. So i`m triing to use XDispatchProviderInterception environment. And made something like this:
class Addin : public cppu::WeakImplHelper5<
css::frame::XDispatch,
css::frame::XDispatchProviderInterceptor,
css::frame::XInterceptorInfo,
css::lang::XInitialization,
css::lang::XServiceInfo>
{
///all interface specific virutal function initialized
private:
css::uno::Reference<css::frame::XDispatchProviderInterception> _xRegistration;
public:
virtual void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& aArguments) throw(css::uno::Exception, css::uno::RuntimeException)
{
css::uno::Reference<css::frame::XFrame> xFrame;
if (aArguments.getLength())
{
aArguments[0] >>= xFrame;
}
_xRegistration = css::uno::Reference<css::frame::XDispatchProviderInterception>(xFrame, css::uno::UNO_QUERY);
_xRegistration->registerDispatchProviderInterceptor(this);
}
}
And after this i see some but not all actions.
Close document window(big X) .uno:CloseFrame - YES
Close document window(small x) .uno:CloseWin - YES
but
File - Close - NO
File - Exit from Libre office - NO
Save button - NO
And many more others do not intercepted.
The question is how to intercept all actions?