1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: intercept.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _INTERCEPT_HXX_
32 #define _INTERCEPT_HXX_
34 #include <osl/mutex.hxx>
35 #include <cppuhelper/implbase3.hxx>
36 #include <cppuhelper/interfacecontainer.hxx>
37 #include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
38 #include <com/sun/star/frame/XInterceptorInfo.hpp>
39 #include <com/sun/star/frame/XDispatch.hpp>
41 #include <rtl/ref.hxx>
42 #include "embeddocaccess.hxx"
45 class StatusChangeListenerContainer
;
46 class EmbedDocument_Impl
;
50 : public ::cppu::WeakImplHelper3
<
51 ::com::sun::star::frame::XDispatchProviderInterceptor
,
52 ::com::sun::star::frame::XInterceptorInfo
,
53 ::com::sun::star::frame::XDispatch
>
58 const ::rtl::Reference
< EmbeddedDocumentInstanceAccess_Impl
>& xOleAccess
,
59 DocumentHolder
* pDocH
,
64 void DisconnectDocHolder();
66 void generateFeatureStateEvent();
68 // overwritten to release the statuslistner.
74 const com::sun::star::uno::Reference
< com::sun::star::lang::XEventListener
>& xListener
)
75 throw( com::sun::star::uno::RuntimeException
);
78 removeEventListener( const com::sun::star::uno::Reference
< com::sun::star::lang::XEventListener
>& aListener
)
79 throw( com::sun::star::uno::RuntimeException
);
82 dispose() throw(::com::sun::star::uno::RuntimeException
);
89 const ::com::sun::star::util::URL
& URL
,
90 const ::com::sun::star::uno::Sequence
<
91 ::com::sun::star::beans::PropertyValue
>& Arguments
)
92 throw (::com::sun::star::uno::RuntimeException
);
96 const ::com::sun::star::uno::Reference
<
97 ::com::sun::star::frame::XStatusListener
>& Control
,
98 const ::com::sun::star::util::URL
& URL
)
100 ::com::sun::star::uno::RuntimeException
103 virtual void SAL_CALL
104 removeStatusListener(
105 const ::com::sun::star::uno::Reference
<
106 ::com::sun::star::frame::XStatusListener
>& Control
,
107 const ::com::sun::star::util::URL
& URL
)
109 ::com::sun::star::uno::RuntimeException
113 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
>
114 SAL_CALL
getInterceptedURLs( )
116 ::com::sun::star::uno::RuntimeException
120 //XDispatchProvider ( inherited by XDispatchProviderInterceptor )
121 virtual ::com::sun::star::uno::Reference
<
122 ::com::sun::star::frame::XDispatch
> SAL_CALL
124 const ::com::sun::star::util::URL
& URL
,
125 const ::rtl::OUString
& TargetFrameName
,
126 sal_Int32 SearchFlags
)
128 ::com::sun::star::uno::RuntimeException
131 virtual ::com::sun::star::uno::Sequence
<
132 ::com::sun::star::uno::Reference
<
133 ::com::sun::star::frame::XDispatch
> > SAL_CALL
135 const ::com::sun::star::uno::Sequence
<
136 ::com::sun::star::frame::DispatchDescriptor
>& Requests
)
138 ::com::sun::star::uno::RuntimeException
142 //XDispatchProviderInterceptor
143 virtual ::com::sun::star::uno::Reference
<
144 ::com::sun::star::frame::XDispatchProvider
> SAL_CALL
145 getSlaveDispatchProvider( )
147 ::com::sun::star::uno::RuntimeException
150 virtual void SAL_CALL
151 setSlaveDispatchProvider(
152 const ::com::sun::star::uno::Reference
<
153 ::com::sun::star::frame::XDispatchProvider
>& NewDispatchProvider
)
155 ::com::sun::star::uno::RuntimeException
158 virtual ::com::sun::star::uno::Reference
<
159 ::com::sun::star::frame::XDispatchProvider
> SAL_CALL
160 getMasterDispatchProvider( )
162 ::com::sun::star::uno::RuntimeException
165 virtual void SAL_CALL
166 setMasterDispatchProvider(
167 const ::com::sun::star::uno::Reference
<
168 ::com::sun::star::frame::XDispatchProvider
>& NewSupplier
)
170 ::com::sun::star::uno::RuntimeException
178 ::rtl::Reference
< EmbeddedDocumentInstanceAccess_Impl
> m_xOleAccess
;
180 ::com::sun::star::uno::WeakReference
< ::com::sun::star::uno::XInterface
> m_xDocHLocker
;
181 DocumentHolder
* m_pDocH
;
183 ::com::sun::star::uno::Reference
<
184 ::com::sun::star::frame::XDispatchProvider
> m_xSlaveDispatchProvider
;
186 ::com::sun::star::uno::Reference
<
187 ::com::sun::star::frame::XDispatchProvider
> m_xMasterDispatchProvider
;
189 static ::com::sun::star::uno::Sequence
< ::rtl::OUString
>
192 cppu::OInterfaceContainerHelper
* m_pDisposeEventListeners
;
193 StatusChangeListenerContainer
* m_pStatCL
;