15#include <com/sun/star/frame/DispatchDescriptor.hpp>
21DispatchDisabler::DispatchDisabler(
const uno::Reference< uno::XComponentContext >& )
28 uno::Sequence< OUString > aDisabledURLs;
32 for( OUString
const & url : std::as_const(aDisabledURLs) )
38uno::Reference< frame::XDispatch > SAL_CALL
40 const OUString& rTargetFrameName,
41 ::sal_Int32 nSearchFlags )
46 return uno::Reference< frame::XDispatch >();
48 return mxSlave->queryDispatch(rURL, rTargetFrameName, nSearchFlags);
51uno::Sequence< uno::Reference< frame::XDispatch > > SAL_CALL
54 uno::Sequence< uno::Reference< frame::XDispatch > > aResult(rRequests.getLength());
55 auto aResultRange = asNonConstRange(aResult);
56 for( sal_Int32
i = 0;
i < rRequests.getLength(); ++
i )
58 rRequests[
i].FrameName,
59 rRequests[
i].SearchFlags);
64uno::Reference< frame::XDispatchProvider > SAL_CALL
75uno::Reference< frame::XDispatchProvider > SAL_CALL
87uno::Sequence< OUString > SAL_CALL
91 auto aDisabledURLsRange = asNonConstRange(aDisabledURLs);
94 aDisabledURLsRange[
n++] = disabledURL;
150 return "com.sun.star.comp.framework.services.DispatchDisabler";
160 return {
"com.sun.star.frame.DispatchDisabler" };
163extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
165 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any>
const& )
constexpr OUStringLiteral sServiceName
css::uno::Type const & get()
Implementation of a service to make it easy to disable a whole suite of UNO commands in a batch - and...
css::uno::Reference< css::frame::XDispatchProvider > mxMaster
virtual void SAL_CALL initialize(const ::css::uno::Sequence< ::css::uno::Any > &aArguments) override
virtual ::css::uno::Sequence< OUString > SAL_CALL getElementNames() 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::Any SAL_CALL getByName(const OUString &aName) override
virtual ::css::uno::Sequence< OUString > SAL_CALL getInterceptedURLs() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Bool SAL_CALL supportsService(const OUString &sServiceName) override
virtual void SAL_CALL insertByName(const OUString &aName, const ::css::uno::Any &aElement) override
virtual void SAL_CALL removeByName(const OUString &Name) override
std::set< OUString > maDisabledURLs
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 sal_Bool SAL_CALL hasByName(const OUString &aName) override
virtual void SAL_CALL replaceByName(const OUString &aName, const ::css::uno::Any &aElement) override
virtual OUString SAL_CALL getImplementationName() override
virtual ::sal_Bool SAL_CALL hasElements() override
css::uno::Reference< css::frame::XDispatchProvider > mxSlave
virtual ::css::uno::Reference< ::css::frame::XDispatchProvider > SAL_CALL getMasterDispatchProvider() override
virtual ::css::uno::Type SAL_CALL getElementType() override
virtual ::css::uno::Sequence< ::css::uno::Reference< ::css::frame::XDispatch > > SAL_CALL queryDispatches(const ::css::uno::Sequence< ::css::frame::DispatchDescriptor > &Requests) override
virtual void SAL_CALL setMasterDispatchProvider(const ::css::uno::Reference< ::css::frame::XDispatchProvider > &NewSupplier) override
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * framework_DispatchDisabler_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
Sequence< PropertyValue > aArguments
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)