1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
;
34 class Interceptor
: public ::cppu::WeakImplHelper3
< ::com::sun::star::frame::XDispatchProviderInterceptor
,
35 ::com::sun::star::frame::XInterceptorInfo
,
36 ::com::sun::star::frame::XDispatch
>
40 Interceptor( DocumentHolder
* pDocHolder
);
41 virtual ~Interceptor();
43 void DisconnectDocHolder();
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
;
55 const ::com::sun::star::uno::Reference
<
56 ::com::sun::star::frame::XStatusListener
>& Control
,
57 const ::com::sun::star::util::URL
& URL
)
59 ::com::sun::star::uno::RuntimeException
, std::exception
64 const ::com::sun::star::uno::Reference
<
65 ::com::sun::star::frame::XStatusListener
>& Control
,
66 const ::com::sun::star::util::URL
& URL
)
68 ::com::sun::star::uno::RuntimeException
, std::exception
72 virtual ::com::sun::star::uno::Sequence
< OUString
>
73 SAL_CALL
getInterceptedURLs( )
75 ::com::sun::star::uno::RuntimeException
, std::exception
78 //XDispatchProvider ( inherited by XDispatchProviderInterceptor )
79 virtual ::com::sun::star::uno::Reference
<
80 ::com::sun::star::frame::XDispatch
> SAL_CALL
82 const ::com::sun::star::util::URL
& URL
,
83 const OUString
& TargetFrameName
,
84 sal_Int32 SearchFlags
)
86 ::com::sun::star::uno::RuntimeException
, std::exception
89 virtual ::com::sun::star::uno::Sequence
<
90 ::com::sun::star::uno::Reference
<
91 ::com::sun::star::frame::XDispatch
> > SAL_CALL
93 const ::com::sun::star::uno::Sequence
<
94 ::com::sun::star::frame::DispatchDescriptor
>& Requests
)
96 ::com::sun::star::uno::RuntimeException
, std::exception
100 //XDispatchProviderInterceptor
101 virtual ::com::sun::star::uno::Reference
<
102 ::com::sun::star::frame::XDispatchProvider
> SAL_CALL
103 getSlaveDispatchProvider( )
105 ::com::sun::star::uno::RuntimeException
, std::exception
108 virtual void SAL_CALL
109 setSlaveDispatchProvider(
110 const ::com::sun::star::uno::Reference
<
111 ::com::sun::star::frame::XDispatchProvider
>& NewDispatchProvider
)
113 ::com::sun::star::uno::RuntimeException
, std::exception
116 virtual ::com::sun::star::uno::Reference
<
117 ::com::sun::star::frame::XDispatchProvider
> SAL_CALL
118 getMasterDispatchProvider( )
120 ::com::sun::star::uno::RuntimeException
, std::exception
123 virtual void SAL_CALL
124 setMasterDispatchProvider(
125 const ::com::sun::star::uno::Reference
<
126 ::com::sun::star::frame::XDispatchProvider
>& NewSupplier
)
128 ::com::sun::star::uno::RuntimeException
, std::exception
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
;
149 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */