LibreOffice Module framework (master) 1
Public Member Functions | Private Attributes | List of all members
framework::DispatchDisabler Class Referencefinal

Implementation of a service to make it easy to disable a whole suite of UNO commands in a batch - and have that act in-process. More...

#include <dispatchdisabler.hxx>

Inheritance diagram for framework::DispatchDisabler:
[legend]
Collaboration diagram for framework::DispatchDisabler:
[legend]

Public Member Functions

 DispatchDisabler (const css::uno::Reference< css::uno::XComponentContext > &rxContext)
 
virtual void SAL_CALL initialize (const ::css::uno::Sequence< ::css::uno::Any > &aArguments) override
 
virtual ::css::uno::Reference< ::css::frame::XDispatch > SAL_CALL queryDispatch (const ::css::util::URL &URL, const OUString &TargetFrameName, ::sal_Int32 SearchFlags) override
 
virtual ::css::uno::Sequence< ::css::uno::Reference< ::css::frame::XDispatch > > SAL_CALL queryDispatches (const ::css::uno::Sequence< ::css::frame::DispatchDescriptor > &Requests) override
 
virtual ::css::uno::Reference< ::css::frame::XDispatchProvider > SAL_CALL getSlaveDispatchProvider () override
 
virtual void SAL_CALL setSlaveDispatchProvider (const ::css::uno::Reference< ::css::frame::XDispatchProvider > &NewDispatchProvider) override
 
virtual ::css::uno::Reference< ::css::frame::XDispatchProvider > SAL_CALL getMasterDispatchProvider () override
 
virtual void SAL_CALL setMasterDispatchProvider (const ::css::uno::Reference< ::css::frame::XDispatchProvider > &NewSupplier) override
 
virtual ::css::uno::Sequence< OUString > SAL_CALL getInterceptedURLs () override
 
virtual ::css::uno::Type SAL_CALL getElementType () override
 
virtual ::sal_Bool SAL_CALL hasElements () override
 
virtual ::css::uno::Any SAL_CALL getByName (const OUString &aName) override
 
virtual ::css::uno::Sequence< OUString > SAL_CALL getElementNames () override
 
virtual sal_Bool SAL_CALL hasByName (const OUString &aName) override
 
virtual void SAL_CALL replaceByName (const OUString &aName, const ::css::uno::Any &aElement) override
 
virtual void SAL_CALL insertByName (const OUString &aName, const ::css::uno::Any &aElement) override
 
virtual void SAL_CALL removeByName (const OUString &Name) override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &sServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 

Private Attributes

std::set< OUString > maDisabledURLs
 
css::uno::Reference< css::frame::XDispatchProvider > mxSlave
 
css::uno::Reference< css::frame::XDispatchProvider > mxMaster
 

Detailed Description

Implementation of a service to make it easy to disable a whole suite of UNO commands in a batch - and have that act in-process.

Often external re-use of LibreOffice wants a very cut-down set of functionality included, and disabling elements remotely one by one performs poorly.

Definition at line 34 of file dispatchdisabler.hxx.

Constructor & Destructor Documentation

◆ DispatchDisabler()

DispatchDisabler::DispatchDisabler ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext)

Definition at line 21 of file dispatchdisabler.cxx.

Member Function Documentation

◆ getByName()

uno::Any SAL_CALL DispatchDisabler::getByName ( const OUString &  aName)
override

Definition at line 111 of file dispatchdisabler.cxx.

◆ getElementNames()

uno::Sequence< OUString > SAL_CALL DispatchDisabler::getElementNames ( )
override

Definition at line 116 of file dispatchdisabler.cxx.

References getInterceptedURLs().

◆ getElementType()

uno::Type SAL_CALL DispatchDisabler::getElementType ( )
override

Definition at line 99 of file dispatchdisabler.cxx.

References cppu::UnoType< typename T >::get().

◆ getImplementationName()

OUString SAL_CALL DispatchDisabler::getImplementationName ( )
overridevirtual

Definition at line 148 of file dispatchdisabler.cxx.

◆ getInterceptedURLs()

uno::Sequence< OUString > SAL_CALL DispatchDisabler::getInterceptedURLs ( )
override

Definition at line 88 of file dispatchdisabler.cxx.

References maDisabledURLs, and n.

Referenced by getElementNames().

◆ getMasterDispatchProvider()

uno::Reference< frame::XDispatchProvider > SAL_CALL DispatchDisabler::getMasterDispatchProvider ( )
override

Definition at line 76 of file dispatchdisabler.cxx.

References mxMaster.

◆ getSlaveDispatchProvider()

uno::Reference< frame::XDispatchProvider > SAL_CALL DispatchDisabler::getSlaveDispatchProvider ( )
override

Definition at line 65 of file dispatchdisabler.cxx.

References mxSlave.

◆ getSupportedServiceNames()

css::uno::Sequence< OUString > SAL_CALL DispatchDisabler::getSupportedServiceNames ( )
overridevirtual

Definition at line 158 of file dispatchdisabler.cxx.

◆ hasByName()

sal_Bool SAL_CALL DispatchDisabler::hasByName ( const OUString &  aName)
overridevirtual

Definition at line 121 of file dispatchdisabler.cxx.

References maDisabledURLs.

◆ hasElements()

sal_Bool SAL_CALL DispatchDisabler::hasElements ( )
override

Definition at line 105 of file dispatchdisabler.cxx.

References maDisabledURLs.

◆ initialize()

void SAL_CALL DispatchDisabler::initialize ( const ::css::uno::Sequence< ::css::uno::Any > &  aArguments)
overridevirtual

Definition at line 26 of file dispatchdisabler.cxx.

References aArguments, and maDisabledURLs.

◆ insertByName()

void DispatchDisabler::insertByName ( const OUString &  aName,
const ::css::uno::Any &  aElement 
)
overridevirtual

Definition at line 134 of file dispatchdisabler.cxx.

References maDisabledURLs.

Referenced by replaceByName().

◆ queryDispatch()

uno::Reference< frame::XDispatch > SAL_CALL DispatchDisabler::queryDispatch ( const ::css::util::URL &  URL,
const OUString &  TargetFrameName,
::sal_Int32  SearchFlags 
)
override

Definition at line 39 of file dispatchdisabler.cxx.

References maDisabledURLs, and mxSlave.

Referenced by queryDispatches().

◆ queryDispatches()

uno::Sequence< uno::Reference< frame::XDispatch > > SAL_CALL DispatchDisabler::queryDispatches ( const ::css::uno::Sequence< ::css::frame::DispatchDescriptor > &  Requests)
override

Definition at line 52 of file dispatchdisabler.cxx.

References i, and queryDispatch().

◆ removeByName()

void DispatchDisabler::removeByName ( const OUString &  Name)
overridevirtual

Definition at line 139 of file dispatchdisabler.cxx.

References maDisabledURLs.

Referenced by replaceByName().

◆ replaceByName()

void SAL_CALL DispatchDisabler::replaceByName ( const OUString &  aName,
const ::css::uno::Any &  aElement 
)
overridevirtual

Definition at line 127 of file dispatchdisabler.cxx.

References insertByName(), and removeByName().

◆ setMasterDispatchProvider()

void SAL_CALL DispatchDisabler::setMasterDispatchProvider ( const ::css::uno::Reference< ::css::frame::XDispatchProvider > &  NewSupplier)
overridevirtual

Definition at line 81 of file dispatchdisabler.cxx.

References mxMaster.

◆ setSlaveDispatchProvider()

void SAL_CALL DispatchDisabler::setSlaveDispatchProvider ( const ::css::uno::Reference< ::css::frame::XDispatchProvider > &  NewDispatchProvider)
overridevirtual

Definition at line 70 of file dispatchdisabler.cxx.

References mxSlave.

◆ supportsService()

sal_Bool SAL_CALL DispatchDisabler::supportsService ( const OUString &  sServiceName)
overridevirtual

Definition at line 153 of file dispatchdisabler.cxx.

References sServiceName, and cppu::supportsService().

Member Data Documentation

◆ maDisabledURLs

std::set<OUString> framework::DispatchDisabler::maDisabledURLs
private

◆ mxMaster

css::uno::Reference< css::frame::XDispatchProvider > framework::DispatchDisabler::mxMaster
private

Definition at line 43 of file dispatchdisabler.hxx.

Referenced by getMasterDispatchProvider(), and setMasterDispatchProvider().

◆ mxSlave

css::uno::Reference< css::frame::XDispatchProvider > framework::DispatchDisabler::mxSlave
private

The documentation for this class was generated from the following files: