LibreOffice Module svx (master) 1
formdispatchinterceptor.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#ifndef INCLUDED_SVX_SOURCE_INC_FORMDISPATCHINTERCEPTOR_HXX
21#define INCLUDED_SVX_SOURCE_INC_FORMDISPATCHINTERCEPTOR_HXX
22
23#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
24#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
25
27
28
29namespace svxform
30{
31
33 {
34 public:
36 virtual css::uno::Reference< css::frame::XDispatch> interceptedQueryDispatch(
37 const css::util::URL& aURL, const OUString& aTargetFrameName, sal_Int32 nSearchFlags) = 0;
38
39 virtual ::osl::Mutex* getInterceptorMutex() = 0;
40
41 protected:
43
45 };
46
47
48 //=
49
50 typedef ::cppu::WeakComponentImplHelper< css::frame::XDispatchProviderInterceptor
51 , css::lang::XEventListener
53
55 {
56 public:
57 css::uno::Reference< css::frame::XDispatchProviderInterception> getIntercepted() const { return m_xIntercepted; }
58
60 const css::uno::Reference< css::frame::XDispatchProviderInterception>& _rToIntercept,
61 DispatchInterceptor* _pMaster
62 );
63
64 // css::frame::XDispatchProvider
65 virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch( const css::util::URL& aURL, const OUString& aTargetFrameName, sal_Int32 nSearchFlags ) override;
66 virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches( const css::uno::Sequence< css::frame::DispatchDescriptor >& aDescripts ) override;
67
68 // css::frame::XDispatchProviderInterceptor
69 virtual css::uno::Reference< css::frame::XDispatchProvider > SAL_CALL getSlaveDispatchProvider( ) override;
70 virtual void SAL_CALL setSlaveDispatchProvider( const css::uno::Reference< css::frame::XDispatchProvider >& xNewDispatchProvider ) override;
71 virtual css::uno::Reference< css::frame::XDispatchProvider > SAL_CALL getMasterDispatchProvider( ) override;
72 virtual void SAL_CALL setMasterDispatchProvider( const css::uno::Reference< css::frame::XDispatchProvider >& xNewSupplier ) override;
73
74 // css::lang::XEventListener
75 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
76
77 // OComponentHelper
78 virtual void SAL_CALL disposing() override;
79
80 private:
81 virtual ~DispatchInterceptionMultiplexer() override;
82
83 void ImplDetach();
84
85 ::osl::Mutex m_aFallback;
86 ::osl::Mutex* m_pMutex;
87
88 // the component which's dispatches we're intercepting
89 css::uno::WeakReference< css::frame::XDispatchProviderInterception >
92
93 // the real interceptor
95
96 // chaining
97 css::uno::Reference< css::frame::XDispatchProvider> m_xSlaveDispatcher;
98 css::uno::Reference< css::frame::XDispatchProvider> m_xMasterDispatcher;
99 };
100
101
102}
103
104
105#endif // INCLUDED_SVX_SOURCE_INC_FORMDISPATCHINTERCEPTOR_HXX
106
107/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch(const css::util::URL &aURL, const OUString &aTargetFrameName, sal_Int32 nSearchFlags) override
virtual css::uno::Reference< css::frame::XDispatchProvider > SAL_CALL getMasterDispatchProvider() override
virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches(const css::uno::Sequence< css::frame::DispatchDescriptor > &aDescripts) override
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
css::uno::Reference< css::frame::XDispatchProviderInterception > getIntercepted() const
virtual void SAL_CALL setMasterDispatchProvider(const css::uno::Reference< css::frame::XDispatchProvider > &xNewSupplier) override
css::uno::Reference< css::frame::XDispatchProvider > m_xMasterDispatcher
css::uno::WeakReference< css::frame::XDispatchProviderInterception > m_xIntercepted
virtual void SAL_CALL setSlaveDispatchProvider(const css::uno::Reference< css::frame::XDispatchProvider > &xNewDispatchProvider) override
virtual css::uno::Reference< css::frame::XDispatchProvider > SAL_CALL getSlaveDispatchProvider() override
css::uno::Reference< css::frame::XDispatchProvider > m_xSlaveDispatcher
DispatchInterceptionMultiplexer(const css::uno::Reference< css::frame::XDispatchProviderInterception > &_rToIntercept, DispatchInterceptor *_pMaster)
virtual css::uno::Reference< css::frame::XDispatch > interceptedQueryDispatch(const css::util::URL &aURL, const OUString &aTargetFrameName, sal_Int32 nSearchFlags)=0
virtual ::osl::Mutex * getInterceptorMutex()=0
class FmSearchEngine - Impl class for FmSearchDialog
::cppu::WeakComponentImplHelper< css::frame::XDispatchProviderInterceptor, css::lang::XEventListener > DispatchInterceptionMultiplexer_BASE