nss: upgrade to release 3.73
[LibreOffice.git] / sw / source / uibase / inc / unodispatch.hxx
blob316bcf0152a4b0fbf55073071bee2674880dfaf3
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_UNODISPATCH_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_INC_UNODISPATCH_HXX
22 #include <com/sun/star/frame/XDispatchProviderInterception.hpp>
23 #include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
24 #include <com/sun/star/view/XSelectionChangeListener.hpp>
25 #include <com/sun/star/lang/XUnoTunnel.hpp>
26 #include <com/sun/star/frame/XDispatch.hpp>
27 #include <com/sun/star/frame/XInterceptorInfo.hpp>
28 #include <cppuhelper/implbase.hxx>
29 #include <vector>
30 #include <vcl/svapp.hxx>
32 class SwView;
34 class SwXDispatchProviderInterceptor : public cppu::WeakImplHelper
36 css::frame::XDispatchProviderInterceptor,
37 css::lang::XEventListener,
38 css::lang::XUnoTunnel,
39 css::frame::XInterceptorInfo
42 class DispatchMutexLock_Impl
44 //::osl::MutexGuard aGuard; #102295# solar mutex has to be used currently
45 SolarMutexGuard aGuard;
46 public:
47 DispatchMutexLock_Impl();
48 ~DispatchMutexLock_Impl();
50 friend class DispatchMutexLock_Impl;
52 // ::osl::Mutex m_aMutex;#102295# solar mutex has to be used currently
54 // the component which's dispatches we're intercepting
55 css::uno::Reference< css::frame::XDispatchProviderInterception> m_xIntercepted;
57 // chaining
58 css::uno::Reference< css::frame::XDispatchProvider> m_xSlaveDispatcher;
59 css::uno::Reference< css::frame::XDispatchProvider> m_xMasterDispatcher;
61 css::uno::Reference< css::frame::XDispatch> m_xDispatch;
63 SwView* m_pView;
65 public:
66 SwXDispatchProviderInterceptor(SwView& rView);
67 virtual ~SwXDispatchProviderInterceptor() override;
69 //XDispatchProvider
70 virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch( const css::util::URL& aURL, const OUString& aTargetFrameName, sal_Int32 nSearchFlags ) override;
71 virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches( const css::uno::Sequence< css::frame::DispatchDescriptor >& aDescripts ) override;
73 //XDispatchProviderInterceptor
74 virtual css::uno::Reference< css::frame::XDispatchProvider > SAL_CALL getSlaveDispatchProvider( ) override;
75 virtual void SAL_CALL setSlaveDispatchProvider( const css::uno::Reference< css::frame::XDispatchProvider >& xNewDispatchProvider ) override;
76 virtual css::uno::Reference< css::frame::XDispatchProvider > SAL_CALL getMasterDispatchProvider( ) override;
77 virtual void SAL_CALL setMasterDispatchProvider( const css::uno::Reference< css::frame::XDispatchProvider >& xNewSupplier ) override;
79 // XEventListener
80 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
82 //XUnoTunnel
83 static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
84 virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
86 // XInterceptorInfo
87 virtual css::uno::Sequence<OUString> SAL_CALL getInterceptedURLs() override;
89 // view destroyed
90 void Invalidate();
93 struct StatusStruct_Impl
95 css::uno::Reference< css::frame::XStatusListener> xListener;
96 css::util::URL aURL;
98 class SwXDispatch : public cppu::WeakImplHelper
100 css::frame::XDispatch,
101 css::view::XSelectionChangeListener
104 SwView* m_pView;
105 std::vector< StatusStruct_Impl > m_aStatusListenerVector;
106 bool m_bOldEnable;
107 bool m_bListenerAdded;
108 public:
109 SwXDispatch(SwView& rView);
110 virtual ~SwXDispatch() override;
112 virtual void SAL_CALL dispatch( const css::util::URL& aURL, const css::uno::Sequence< css::beans::PropertyValue >& aArgs ) override;
113 virtual void SAL_CALL addStatusListener( const css::uno::Reference< css::frame::XStatusListener >& xControl, const css::util::URL& aURL ) override;
114 virtual void SAL_CALL removeStatusListener( const css::uno::Reference< css::frame::XStatusListener >& xControl, const css::util::URL& aURL ) override;
116 //XSelectionChangeListener
117 virtual void SAL_CALL selectionChanged( const css::lang::EventObject& aEvent ) override;
119 //XEventListener
120 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
122 static const char* GetDBChangeURL();
125 #endif
127 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */