fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / dbaccess / source / core / dataaccess / intercept.hxx
blob85b6482008a779b00ac7d056ae7a41a14b4e08f2
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 .
20 #ifndef INCLUDED_DBACCESS_SOURCE_CORE_DATAACCESS_INTERCEPT_HXX
21 #define INCLUDED_DBACCESS_SOURCE_CORE_DATAACCESS_INTERCEPT_HXX
23 #include <osl/mutex.hxx>
24 #include <cppuhelper/implbase4.hxx>
25 #include <cppuhelper/interfacecontainer.hxx>
26 #include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
27 #include <com/sun/star/frame/XInterceptorInfo.hpp>
28 #include <com/sun/star/document/XDocumentEventListener.hpp>
29 #include <com/sun/star/frame/XDispatch.hpp>
30 #include "documentdefinition.hxx"
31 #include <vcl/svapp.hxx>
33 namespace dbaccess
37 class OInterceptor : public ::cppu::WeakImplHelper4< ::com::sun::star::frame::XDispatchProviderInterceptor,
38 ::com::sun::star::frame::XInterceptorInfo,
39 ::com::sun::star::frame::XDispatch,
40 ::com::sun::star::document::XDocumentEventListener>
42 DECL_LINK( OnDispatch, void* _aURL );
43 protected:
44 virtual ~OInterceptor();
45 public:
47 OInterceptor( ODocumentDefinition* _pContentHolder );
49 void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
51 //XDispatch
52 virtual void SAL_CALL
53 dispatch(
54 const ::com::sun::star::util::URL& URL,
55 const ::com::sun::star::uno::Sequence<
56 ::com::sun::star::beans::PropertyValue >& Arguments )
57 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
59 virtual void SAL_CALL
60 addStatusListener(
61 const ::com::sun::star::uno::Reference<
62 ::com::sun::star::frame::XStatusListener >& Control,
63 const ::com::sun::star::util::URL& URL )
64 throw (
65 ::com::sun::star::uno::RuntimeException, std::exception
66 ) SAL_OVERRIDE;
68 virtual void SAL_CALL
69 removeStatusListener(
70 const ::com::sun::star::uno::Reference<
71 ::com::sun::star::frame::XStatusListener >& Control,
72 const ::com::sun::star::util::URL& URL )
73 throw (
74 ::com::sun::star::uno::RuntimeException, std::exception
75 ) SAL_OVERRIDE;
77 //XInterceptorInfo
78 virtual ::com::sun::star::uno::Sequence< OUString >
79 SAL_CALL getInterceptedURLs( )
80 throw (
81 ::com::sun::star::uno::RuntimeException, std::exception
82 ) SAL_OVERRIDE;
84 //XDispatchProvider ( inherited by XDispatchProviderInterceptor )
85 virtual ::com::sun::star::uno::Reference<
86 ::com::sun::star::frame::XDispatch > SAL_CALL
87 queryDispatch(
88 const ::com::sun::star::util::URL& URL,
89 const OUString& TargetFrameName,
90 sal_Int32 SearchFlags )
91 throw (
92 ::com::sun::star::uno::RuntimeException, std::exception
93 ) SAL_OVERRIDE;
95 virtual ::com::sun::star::uno::Sequence<
96 ::com::sun::star::uno::Reference<
97 ::com::sun::star::frame::XDispatch > > SAL_CALL
98 queryDispatches(
99 const ::com::sun::star::uno::Sequence<
100 ::com::sun::star::frame::DispatchDescriptor >& Requests )
101 throw (
102 ::com::sun::star::uno::RuntimeException, std::exception
103 ) SAL_OVERRIDE;
105 //XDispatchProviderInterceptor
106 virtual ::com::sun::star::uno::Reference<
107 ::com::sun::star::frame::XDispatchProvider > SAL_CALL
108 getSlaveDispatchProvider( )
109 throw (
110 ::com::sun::star::uno::RuntimeException, std::exception
111 ) SAL_OVERRIDE;
113 virtual void SAL_CALL
114 setSlaveDispatchProvider(
115 const ::com::sun::star::uno::Reference<
116 ::com::sun::star::frame::XDispatchProvider >& NewDispatchProvider )
117 throw (
118 ::com::sun::star::uno::RuntimeException, std::exception
119 ) SAL_OVERRIDE;
121 virtual ::com::sun::star::uno::Reference<
122 ::com::sun::star::frame::XDispatchProvider > SAL_CALL
123 getMasterDispatchProvider( )
124 throw (
125 ::com::sun::star::uno::RuntimeException, std::exception
126 ) SAL_OVERRIDE;
128 virtual void SAL_CALL
129 setMasterDispatchProvider(
130 const ::com::sun::star::uno::Reference<
131 ::com::sun::star::frame::XDispatchProvider >& NewSupplier )
132 throw (
133 ::com::sun::star::uno::RuntimeException, std::exception
134 ) SAL_OVERRIDE;
136 // XDocumentEventListener
137 virtual void SAL_CALL documentEventOccured( const ::com::sun::star::document::DocumentEvent& Event ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
138 virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
140 private:
142 osl::Mutex m_aMutex;
144 ODocumentDefinition* m_pContentHolder;
146 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xSlaveDispatchProvider;
147 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xMasterDispatchProvider;
149 ::com::sun::star::uno::Sequence< OUString > m_aInterceptedURL;
151 cppu::OInterfaceContainerHelper* m_pDisposeEventListeners;
152 PropertyChangeListenerContainer* m_pStatCL;
155 } // namespace dbaccess
157 #endif // INCLUDED_DBACCESS_SOURCE_CORE_DATAACCESS_INTERCEPT_HXX
159 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */