fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / embeddedobj / source / inc / intercept.hxx
blob65782195dc92e94fca1e6095fa75cfeb1ba38639
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_EMBEDDEDOBJ_SOURCE_INC_INTERCEPT_HXX
21 #define INCLUDED_EMBEDDEDOBJ_SOURCE_INC_INTERCEPT_HXX
23 #include <osl/mutex.hxx>
24 #include <cppuhelper/implbase3.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/frame/XDispatch.hpp>
31 class StatusChangeListenerContainer;
32 class DocumentHolder;
34 class Interceptor : public ::cppu::WeakImplHelper3< ::com::sun::star::frame::XDispatchProviderInterceptor,
35 ::com::sun::star::frame::XInterceptorInfo,
36 ::com::sun::star::frame::XDispatch>
38 public:
40 Interceptor( DocumentHolder* pDocHolder );
41 virtual ~Interceptor();
43 void DisconnectDocHolder();
45 //XDispatch
46 virtual void SAL_CALL
47 dispatch(
48 const ::com::sun::star::util::URL& URL,
49 const ::com::sun::star::uno::Sequence<
50 ::com::sun::star::beans::PropertyValue >& Arguments )
51 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
53 virtual void SAL_CALL
54 addStatusListener(
55 const ::com::sun::star::uno::Reference<
56 ::com::sun::star::frame::XStatusListener >& Control,
57 const ::com::sun::star::util::URL& URL )
58 throw (
59 ::com::sun::star::uno::RuntimeException, std::exception
60 ) SAL_OVERRIDE;
62 virtual void SAL_CALL
63 removeStatusListener(
64 const ::com::sun::star::uno::Reference<
65 ::com::sun::star::frame::XStatusListener >& Control,
66 const ::com::sun::star::util::URL& URL )
67 throw (
68 ::com::sun::star::uno::RuntimeException, std::exception
69 ) SAL_OVERRIDE;
71 //XInterceptorInfo
72 virtual ::com::sun::star::uno::Sequence< OUString >
73 SAL_CALL getInterceptedURLs( )
74 throw (
75 ::com::sun::star::uno::RuntimeException, std::exception
76 ) SAL_OVERRIDE;
78 //XDispatchProvider ( inherited by XDispatchProviderInterceptor )
79 virtual ::com::sun::star::uno::Reference<
80 ::com::sun::star::frame::XDispatch > SAL_CALL
81 queryDispatch(
82 const ::com::sun::star::util::URL& URL,
83 const OUString& TargetFrameName,
84 sal_Int32 SearchFlags )
85 throw (
86 ::com::sun::star::uno::RuntimeException, std::exception
87 ) SAL_OVERRIDE;
89 virtual ::com::sun::star::uno::Sequence<
90 ::com::sun::star::uno::Reference<
91 ::com::sun::star::frame::XDispatch > > SAL_CALL
92 queryDispatches(
93 const ::com::sun::star::uno::Sequence<
94 ::com::sun::star::frame::DispatchDescriptor >& Requests )
95 throw (
96 ::com::sun::star::uno::RuntimeException, std::exception
97 ) SAL_OVERRIDE;
100 //XDispatchProviderInterceptor
101 virtual ::com::sun::star::uno::Reference<
102 ::com::sun::star::frame::XDispatchProvider > SAL_CALL
103 getSlaveDispatchProvider( )
104 throw (
105 ::com::sun::star::uno::RuntimeException, std::exception
106 ) SAL_OVERRIDE;
108 virtual void SAL_CALL
109 setSlaveDispatchProvider(
110 const ::com::sun::star::uno::Reference<
111 ::com::sun::star::frame::XDispatchProvider >& NewDispatchProvider )
112 throw (
113 ::com::sun::star::uno::RuntimeException, std::exception
114 ) SAL_OVERRIDE;
116 virtual ::com::sun::star::uno::Reference<
117 ::com::sun::star::frame::XDispatchProvider > SAL_CALL
118 getMasterDispatchProvider( )
119 throw (
120 ::com::sun::star::uno::RuntimeException, std::exception
121 ) SAL_OVERRIDE;
123 virtual void SAL_CALL
124 setMasterDispatchProvider(
125 const ::com::sun::star::uno::Reference<
126 ::com::sun::star::frame::XDispatchProvider >& NewSupplier )
127 throw (
128 ::com::sun::star::uno::RuntimeException, std::exception
129 ) SAL_OVERRIDE;
132 private:
134 osl::Mutex m_aMutex;
136 DocumentHolder* m_pDocHolder;
138 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xSlaveDispatchProvider;
139 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xMasterDispatchProvider;
141 static ::com::sun::star::uno::Sequence< OUString > m_aInterceptedURL;
143 cppu::OInterfaceContainerHelper* m_pDisposeEventListeners;
144 StatusChangeListenerContainer* m_pStatCL;
147 #endif
149 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */