Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
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.
15 : : *
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).
21 : : *
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.
26 : : *
27 : : ************************************************************************/
28 : : #ifndef _UNOFRAME_HXX
29 : : #define _UNOFRAME_HXX
30 : :
31 : : #include <com/sun/star/beans/XPropertyState.hpp>
32 : : #include <com/sun/star/container/XNamed.hpp>
33 : : #include <com/sun/star/container/XEnumerationAccess.hpp>
34 : : #include <com/sun/star/document/XEmbeddedObjectSupplier2.hpp>
35 : : #include <com/sun/star/text/XTextFrame.hpp>
36 : : #include <com/sun/star/drawing/XShape.hpp>
37 : : #include <com/sun/star/util/XModifyListener.hpp>
38 : : #include <com/sun/star/frame/XModel.hpp>
39 : : #include <com/sun/star/document/XEventsSupplier.hpp>
40 : :
41 : : #include <cppuhelper/implbase1.hxx>
42 : : #include <cppuhelper/implbase3.hxx>
43 : : #include <cppuhelper/implbase6.hxx>
44 : :
45 : : #include <sfx2/objsh.hxx>
46 : :
47 : : #include <flyenum.hxx>
48 : : #include <frmfmt.hxx>
49 : : #include <unoevtlstnr.hxx>
50 : : #include <unotext.hxx>
51 : :
52 : :
53 : : class SfxItemPropertSet;
54 : : class SdrObject;
55 : : class SwDoc;
56 : : class SwFmt;
57 : : class SwFlyFrmFmt;
58 : :
59 : : class BaseFrameProperties_Impl;
60 : : class SwXFrame : public cppu::WeakImplHelper6
61 : : <
62 : : ::com::sun::star::lang::XServiceInfo,
63 : : ::com::sun::star::beans::XPropertySet,
64 : : ::com::sun::star::beans::XPropertyState,
65 : : ::com::sun::star::drawing::XShape,
66 : : ::com::sun::star::container::XNamed,
67 : : ::com::sun::star::lang::XUnoTunnel
68 : : >,
69 : : public SwClient
70 : : {
71 : : SwEventListenerContainer aLstnrCntnr;
72 : : const SfxItemPropertySet* m_pPropSet;
73 : : SwDoc* m_pDoc;
74 : :
75 : : const FlyCntType eType;
76 : :
77 : : // Descriptor-interface
78 : : BaseFrameProperties_Impl* pProps;
79 : : bool bIsDescriptor;
80 : : String sName;
81 : :
82 : : SwPaM* m_pCopySource;
83 : :
84 : : protected:
85 : : com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > mxStyleData;
86 : : com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > mxStyleFamily;
87 : : virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
88 : :
89 : : virtual ~SwXFrame();
90 : : public:
91 : : SwXFrame(FlyCntType eSet,
92 : : const SfxItemPropertySet* pPropSet,
93 : : SwDoc *pDoc ); //Descriptor-If
94 : : SwXFrame(SwFrmFmt& rFrmFmt, FlyCntType eSet,
95 : : const SfxItemPropertySet* pPropSet);
96 : :
97 : :
98 : : static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
99 : :
100 : : //XUnoTunnel
101 : : virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
102 : :
103 : : TYPEINFO();
104 : :
105 : : //XNamed
106 : : virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException );
107 : : virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException );
108 : :
109 : : //XPropertySet
110 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
111 : : virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
112 : : virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
113 : : virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
114 : : virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
115 : : virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
116 : : virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
117 : :
118 : : //XPropertyState
119 : : virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
120 : : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
121 : : virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
122 : : virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
123 : :
124 : : //XShape
125 : : virtual ::com::sun::star::awt::Point SAL_CALL getPosition( ) throw(::com::sun::star::uno::RuntimeException);
126 : : virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException);
127 : : virtual ::com::sun::star::awt::Size SAL_CALL getSize( ) throw(::com::sun::star::uno::RuntimeException);
128 : : virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException);
129 : :
130 : : //XShapeDescriptor
131 : : virtual rtl::OUString SAL_CALL getShapeType(void) throw( ::com::sun::star::uno::RuntimeException );
132 : :
133 : : //Base implementation
134 : : //XComponent
135 : : virtual void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
136 : : virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
137 : : virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
138 : :
139 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException );
140 : :
141 : : //XServiceInfo
142 : : virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
143 : : virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
144 : : virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
145 : :
146 : : void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
147 : : void attach( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xTextRange ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
148 : :
149 : 4616 : SwFrmFmt* GetFrmFmt() const
150 : : {
151 [ + - ][ + + ]: 4616 : return PTR_CAST ( SwFrmFmt, GetRegisteredIn() );
152 : : }
153 : 0 : FlyCntType GetFlyCntType()const {return eType;}
154 : :
155 : 4365 : bool IsDescriptor() const {return bIsDescriptor;}
156 : : void ResetDescriptor();
157 : : //copy text from a given source PaM
158 : : void SetSelection(SwPaM& rCopySource);
159 : : static SW_DLLPUBLIC SdrObject *GetOrCreateSdrObject( SwFlyFrmFmt *pFmt );
160 : : };
161 : :
162 : : typedef cppu::WeakImplHelper3
163 : : <
164 : : ::com::sun::star::text::XTextFrame,
165 : : ::com::sun::star::container::XEnumerationAccess,
166 : : ::com::sun::star::document::XEventsSupplier
167 : : >
168 : : SwXTextFrameBaseClass;
169 : :
170 : : class SwXTextFrame : public SwXTextFrameBaseClass,
171 : : public SwXText,
172 : : public SwXFrame
173 : : {
174 : : const SfxItemPropertSet* _pPropSet;
175 : :
176 : : protected:
177 : : virtual const SwStartNode *GetStartNode() const;
178 : :
179 : : virtual ::com::sun::star::uno::Reference<
180 : : ::com::sun::star::text::XTextCursor >
181 : : CreateCursor()
182 : : throw (::com::sun::star::uno::RuntimeException);
183 : :
184 : : virtual ~SwXTextFrame();
185 : : public:
186 : : SwXTextFrame(SwDoc *pDoc);
187 : : SwXTextFrame(SwFrmFmt& rFmt);
188 : :
189 : : // FIXME: EVIL HACK: make available for SwXFrame::attachToRange
190 : 117 : void SetDoc(SwDoc *const pDoc) { SwXText::SetDoc(pDoc); };
191 : :
192 : : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
193 : : virtual void SAL_CALL acquire( ) throw();
194 : : virtual void SAL_CALL release( ) throw();
195 : :
196 : : //XTypeProvider
197 : : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
198 : : virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
199 : :
200 : : //XTextFrame
201 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException );
202 : :
203 : : //XText
204 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException );
205 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException );
206 : :
207 : : //XEnumerationAccess - frueher XParagraphEnumerationAccess
208 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
209 : :
210 : : //XElementAccess
211 : : virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
212 : : virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
213 : :
214 : : //XTextContent
215 : : virtual void SAL_CALL attach( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xTextRange ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
216 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException);
217 : :
218 : : //XComponent
219 : : virtual void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
220 : : virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
221 : : virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
222 : :
223 : : //XServiceInfo
224 : : virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
225 : : virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
226 : : virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
227 : :
228 : : // XEventsSupplier
229 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents( ) throw(::com::sun::star::uno::RuntimeException);
230 : :
231 : : //XUnoTunnel
232 : : virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
233 : :
234 : : //XPropertySet
235 : : virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
236 : :
237 : : void * SAL_CALL operator new( size_t ) throw();
238 : : void SAL_CALL operator delete( void * ) throw();
239 : : };
240 : :
241 : : typedef cppu::WeakImplHelper2
242 : : <
243 : : ::com::sun::star::text::XTextContent,
244 : : ::com::sun::star::document::XEventsSupplier
245 : : >
246 : : SwXTextGraphicObjectBaseClass;
247 : : class SwXTextGraphicObject : public SwXTextGraphicObjectBaseClass,
248 : : public SwXFrame
249 : : {
250 : : protected:
251 : : virtual ~SwXTextGraphicObject();
252 : : public:
253 : : SwXTextGraphicObject( SwDoc *pDoc );
254 : : SwXTextGraphicObject(SwFrmFmt& rFmt);
255 : :
256 : :
257 : : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
258 : : virtual void SAL_CALL acquire( ) throw();
259 : : virtual void SAL_CALL release( ) throw();
260 : :
261 : : //XTypeProvider
262 : : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
263 : : virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
264 : :
265 : : //XTextContent
266 : : virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
267 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException );
268 : :
269 : : //XComponent
270 : : virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
271 : : virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
272 : : virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
273 : :
274 : : //XServiceInfo
275 : : virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
276 : : virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
277 : : virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
278 : :
279 : : // XEventsSupplier
280 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents( ) throw(::com::sun::star::uno::RuntimeException);
281 : : void * SAL_CALL operator new( size_t ) throw();
282 : : void SAL_CALL operator delete( void * ) throw();
283 : : };
284 : :
285 : : class SwOLENode;
286 : : typedef cppu::WeakImplHelper3
287 : : <
288 : : ::com::sun::star::text::XTextContent,
289 : : ::com::sun::star::document::XEmbeddedObjectSupplier2,
290 : : ::com::sun::star::document::XEventsSupplier
291 : : >SwXTextEmbeddedObjectBaseClass;
292 : :
293 : : class SwXTextEmbeddedObject : public SwXTextEmbeddedObjectBaseClass,
294 : : public SwXFrame
295 : : {
296 : : protected:
297 : : virtual ~SwXTextEmbeddedObject();
298 : :
299 : : public:
300 : : SwXTextEmbeddedObject( SwDoc *pDoc );
301 : : SwXTextEmbeddedObject(SwFrmFmt& rFmt);
302 : :
303 : :
304 : : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
305 : : virtual void SAL_CALL acquire( ) throw();
306 : : virtual void SAL_CALL release( ) throw();
307 : :
308 : : //XTypeProvider
309 : : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
310 : : virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
311 : :
312 : : //XTextContent
313 : : virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
314 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException );
315 : :
316 : : //XComponent
317 : : virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
318 : : virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
319 : : virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
320 : :
321 : : //XEmbeddedObjectSupplier2
322 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL getEmbeddedObject(void) throw( ::com::sun::star::uno::RuntimeException );
323 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject > SAL_CALL getExtendedControlOverEmbeddedObject(void) throw( ::com::sun::star::uno::RuntimeException );
324 : : virtual ::sal_Int64 SAL_CALL getAspect() throw (::com::sun::star::uno::RuntimeException);
325 : : virtual void SAL_CALL setAspect( ::sal_Int64 _aspect ) throw (::com::sun::star::uno::RuntimeException);
326 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > SAL_CALL getReplacementGraphic() throw (::com::sun::star::uno::RuntimeException);
327 : :
328 : : //XServiceInfo
329 : : virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
330 : : virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
331 : : virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
332 : :
333 : : // XEventsSupplier
334 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents( ) throw(::com::sun::star::uno::RuntimeException);
335 : : void * SAL_CALL operator new( size_t ) throw();
336 : : void SAL_CALL operator delete( void * ) throw();
337 : : };
338 : :
339 : :
340 : :
341 : : class SwXOLEListener : public cppu::WeakImplHelper1
342 : : <
343 : : ::com::sun::star::util::XModifyListener
344 : : >,
345 : : public SwClient
346 : : {
347 : : ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xOLEModel;
348 : :
349 : 0 : SwFmt* GetFmt() const { return (SwFmt*)GetRegisteredIn(); }
350 : : public:
351 : : SwXOLEListener(SwFmt& rOLEFmt, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xOLE);
352 : : ~SwXOLEListener();
353 : : TYPEINFO();
354 : :
355 : : // ::com::sun::star::lang::XEventListener
356 : : virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
357 : :
358 : : // ::com::sun::star::util::XModifyListener
359 : : virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw(::com::sun::star::uno::RuntimeException);
360 : :
361 : : protected:
362 : : virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
363 : : };
364 : :
365 : :
366 : :
367 : : #endif
368 : :
369 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|