1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef _INTERCEPT_HXX_
30 #define _INTERCEPT_HXX_
32 #include <osl/mutex.hxx>
33 #include <cppuhelper/implbase3.hxx>
34 #include <cppuhelper/interfacecontainer.hxx>
35 #include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
36 #include <com/sun/star/frame/XInterceptorInfo.hpp>
37 #include <com/sun/star/frame/XDispatch.hpp>
40 class StatusChangeListenerContainer
;
43 class Interceptor
: public ::cppu::WeakImplHelper3
< ::com::sun::star::frame::XDispatchProviderInterceptor
,
44 ::com::sun::star::frame::XInterceptorInfo
,
45 ::com::sun::star::frame::XDispatch
>
49 Interceptor( DocumentHolder
* pDocHolder
);
52 void DisconnectDocHolder();
53 // overwritten to release the statuslistner.
58 const com::sun::star::uno::Reference
< com::sun::star::lang::XEventListener
>& xListener
)
59 throw( com::sun::star::uno::RuntimeException
);
62 removeEventListener( const com::sun::star::uno::Reference
< com::sun::star::lang::XEventListener
>& aListener
)
63 throw( com::sun::star::uno::RuntimeException
);
68 const ::com::sun::star::util::URL
& URL
,
69 const ::com::sun::star::uno::Sequence
<
70 ::com::sun::star::beans::PropertyValue
>& Arguments
)
71 throw (::com::sun::star::uno::RuntimeException
);
75 const ::com::sun::star::uno::Reference
<
76 ::com::sun::star::frame::XStatusListener
>& Control
,
77 const ::com::sun::star::util::URL
& URL
)
79 ::com::sun::star::uno::RuntimeException
84 const ::com::sun::star::uno::Reference
<
85 ::com::sun::star::frame::XStatusListener
>& Control
,
86 const ::com::sun::star::util::URL
& URL
)
88 ::com::sun::star::uno::RuntimeException
92 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
>
93 SAL_CALL
getInterceptedURLs( )
95 ::com::sun::star::uno::RuntimeException
98 //XDispatchProvider ( inherited by XDispatchProviderInterceptor )
99 virtual ::com::sun::star::uno::Reference
<
100 ::com::sun::star::frame::XDispatch
> SAL_CALL
102 const ::com::sun::star::util::URL
& URL
,
103 const ::rtl::OUString
& TargetFrameName
,
104 sal_Int32 SearchFlags
)
106 ::com::sun::star::uno::RuntimeException
109 virtual ::com::sun::star::uno::Sequence
<
110 ::com::sun::star::uno::Reference
<
111 ::com::sun::star::frame::XDispatch
> > SAL_CALL
113 const ::com::sun::star::uno::Sequence
<
114 ::com::sun::star::frame::DispatchDescriptor
>& Requests
)
116 ::com::sun::star::uno::RuntimeException
120 //XDispatchProviderInterceptor
121 virtual ::com::sun::star::uno::Reference
<
122 ::com::sun::star::frame::XDispatchProvider
> SAL_CALL
123 getSlaveDispatchProvider( )
125 ::com::sun::star::uno::RuntimeException
128 virtual void SAL_CALL
129 setSlaveDispatchProvider(
130 const ::com::sun::star::uno::Reference
<
131 ::com::sun::star::frame::XDispatchProvider
>& NewDispatchProvider
)
133 ::com::sun::star::uno::RuntimeException
136 virtual ::com::sun::star::uno::Reference
<
137 ::com::sun::star::frame::XDispatchProvider
> SAL_CALL
138 getMasterDispatchProvider( )
140 ::com::sun::star::uno::RuntimeException
143 virtual void SAL_CALL
144 setMasterDispatchProvider(
145 const ::com::sun::star::uno::Reference
<
146 ::com::sun::star::frame::XDispatchProvider
>& NewSupplier
)
148 ::com::sun::star::uno::RuntimeException
156 DocumentHolder
* m_pDocHolder
;
158 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XDispatchProvider
> m_xSlaveDispatchProvider
;
159 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XDispatchProvider
> m_xMasterDispatchProvider
;
161 static ::com::sun::star::uno::Sequence
< ::rtl::OUString
> m_aInterceptedURL
;
163 cppu::OInterfaceContainerHelper
* m_pDisposeEventListeners
;
164 StatusChangeListenerContainer
* m_pStatCL
;
169 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */