update dev300-m58
[ooovba.git] / embeddedobj / source / inc / oleembobj.hxx
blob16e27ab54c8e8d205359c616d342a3c172a05047
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: oleembobj.hxx,v $
10 * $Revision: 1.30 $
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 _INC_OLEEMBOBJ_HXX_
32 #define _INC_OLEEMBOBJ_HXX_
34 #include <com/sun/star/uno/Sequence.hxx>
35 #include <com/sun/star/uno/Reference.hxx>
36 #include <com/sun/star/uno/Any.hxx>
37 #include <com/sun/star/embed/XEmbeddedObject.hpp>
38 #include <com/sun/star/embed/XInplaceObject.hpp>
39 #include <com/sun/star/embed/XVisualObject.hpp>
40 #include <com/sun/star/embed/XEmbedPersist.hpp>
41 #include <com/sun/star/embed/XLinkageSupport.hpp>
42 #include <com/sun/star/embed/XClassifiedObject.hpp>
43 #include <com/sun/star/embed/XComponentSupplier.hpp>
44 #include <com/sun/star/embed/VerbDescriptor.hpp>
45 #include <com/sun/star/document/XEventBroadcaster.hpp>
46 #include <com/sun/star/container/XChild.hpp>
47 #include <com/sun/star/util/XCloseable.hpp>
48 #include <com/sun/star/util/XCloseListener.hpp>
49 #include <cppuhelper/implbase5.hxx>
51 #include <osl/thread.h>
53 namespace cppu {
54 class OMultiTypeInterfaceContainerHelper;
57 class VerbExecutionController
59 // the following mutex is allowed to be locked only for variables initialization, so no deadlock can be caused
60 ::osl::Mutex m_aVerbExecutionMutex;
62 sal_Bool m_bVerbExecutionInProgress;
63 oslThreadIdentifier m_nVerbExecutionThreadIdentifier;
64 sal_Bool m_bChangedOnVerbExecution;
66 sal_Bool m_bWasEverActive;
67 sal_Int32 m_nNotificationLock;
69 public:
71 VerbExecutionController()
72 : m_bVerbExecutionInProgress( sal_False )
73 , m_nVerbExecutionThreadIdentifier( 0 )
74 , m_bChangedOnVerbExecution( sal_False )
75 , m_bWasEverActive( sal_False )
76 , m_nNotificationLock( 0 )
78 #ifdef WNT
79 void StartControlExecution();
80 sal_Bool EndControlExecution_WasModified();
81 void ModificationNotificationIsDone();
82 #endif
83 void LockNotification();
84 void UnlockNotification();
86 // no need to lock anything to check the value of the numeric members
87 sal_Bool CanDoNotification() { return ( !m_bVerbExecutionInProgress && !m_bWasEverActive && !m_nNotificationLock ); }
88 // ... or to change it
89 void ObjectIsActive() { m_bWasEverActive = sal_True; }
92 class VerbExecutionControllerGuard
94 VerbExecutionController& m_rController;
95 public:
97 VerbExecutionControllerGuard( VerbExecutionController& rController )
98 : m_rController( rController )
100 m_rController.LockNotification();
103 ~VerbExecutionControllerGuard()
105 m_rController.UnlockNotification();
110 class OleComponent;
111 class OwnView_Impl;
112 class OleEmbeddedObject : public ::cppu::WeakImplHelper5
113 < ::com::sun::star::embed::XEmbeddedObject
114 , ::com::sun::star::embed::XEmbedPersist
115 , ::com::sun::star::embed::XLinkageSupport
116 , ::com::sun::star::embed::XInplaceObject
117 , ::com::sun::star::container::XChild >
119 friend class OleComponent;
121 ::osl::Mutex m_aMutex;
123 OleComponent* m_pOleComponent;
125 ::cppu::OMultiTypeInterfaceContainerHelper* m_pInterfaceContainer;
127 sal_Bool m_bReadOnly;
129 sal_Int32 m_bDisposed;
130 sal_Int32 m_nObjectState;
131 sal_Int32 m_nTargetState;
132 sal_Int32 m_nUpdateMode;
134 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory;
136 ::com::sun::star::uno::Sequence< sal_Int8 > m_aClassID;
137 ::rtl::OUString m_aClassName;
139 ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedClient > m_xClientSite;
141 ::rtl::OUString m_aContainerName;
143 ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseListener > m_xClosePreventer;
145 sal_Bool m_bWaitSaveCompleted;
146 sal_Bool m_bNewVisReplInStream;
147 ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > m_xNewCachedVisRepl;
148 ::rtl::OUString m_aNewEntryName;
149 ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > m_xNewParentStorage;
150 ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > m_xNewObjectStream;
151 sal_Bool m_bStoreLoaded;
153 ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > m_xCachedVisualRepresentation;
154 sal_Bool m_bVisReplInitialized;
155 sal_Bool m_bVisReplInStream;
156 sal_Bool m_bStoreVisRepl;
158 sal_Bool m_bIsLink;
160 // TODO/LATER: may need to cache more than one aspect in future
161 sal_Bool m_bHasCachedSize; // the object has cached size
162 ::com::sun::star::awt::Size m_aCachedSize;
163 sal_Int64 m_nCachedAspect;
165 sal_Bool m_bHasSizeToSet; // the object has cached size that should be set to OLE component
166 ::com::sun::star::awt::Size m_aSizeToSet; // this size might be different from the cached one ( scaling is applied )
167 sal_Int64 m_nAspectToSet;
170 // cache the status of the object
171 // TODO/LATER: may need to cache more than one aspect in future
172 sal_Bool m_bGotStatus;
173 sal_Int64 m_nStatus;
174 sal_Int64 m_nStatusAspect;
176 // embedded object related stuff
177 ::rtl::OUString m_aEntryName;
178 ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > m_xParentStorage;
179 ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > m_xObjectStream;
181 // link related stuff
182 ::rtl::OUString m_aLinkURL; // ???
184 // points to own view provider if the the object has no server
185 OwnView_Impl* m_pOwnView;
187 // whether the object should be initialized from clipboard in case of default initialization
188 sal_Bool m_bFromClipboard;
190 ::rtl::OUString m_aTempURL;
192 // STAMPIT solution
193 // the following member is used during verb execution to detect whether the verb execution modifies the object
194 VerbExecutionController m_aVerbExecutionController;
196 // if the following member is set, the object works in wrapper mode
197 ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject > m_xWrappedObject;
198 sal_Bool m_bTriedConversion;
200 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xParent;
202 protected:
204 ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > TryToGetAcceptableFormat_Impl(
205 const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xStream )
206 throw ( ::com::sun::star::uno::Exception );
208 ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > GetNewFilledTempStream_Impl(
209 const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInStream )
210 throw( ::com::sun::star::io::IOException );
211 #ifdef WNT
212 void SwitchComponentToRunningState_Impl();
213 #endif
214 void MakeEventListenerNotification_Impl( const ::rtl::OUString& aEventName );
215 #ifdef WNT
216 void StateChangeNotification_Impl( sal_Bool bBeforeChange, sal_Int32 nOldState, sal_Int32 nNewState );
217 ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > GetStreamForSaving();
220 ::com::sun::star::uno::Sequence< sal_Int32 > GetIntermediateVerbsSequence_Impl( sal_Int32 nNewState );
222 ::com::sun::star::uno::Sequence< sal_Int32 > GetReachableStatesList_Impl(
223 const ::com::sun::star::uno::Sequence< ::com::sun::star::embed::VerbDescriptor >& aVerbList );
224 #endif
226 void CloseComponent();
227 void Dispose();
229 void SwitchOwnPersistence(
230 const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xNewParentStorage,
231 const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xNewObjectStream,
232 const ::rtl::OUString& aNewName );
234 void SwitchOwnPersistence(
235 const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xNewParentStorage,
236 const ::rtl::OUString& aNewName );
238 void GetRidOfComponent();
240 void StoreToLocation_Impl(
241 const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
242 const ::rtl::OUString& sEntName,
243 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArguments,
244 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lObjArgs,
245 sal_Bool bSaveAs )
246 throw ( ::com::sun::star::uno::Exception );
247 #ifdef WNT
248 void StoreObjectToStream( ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > xOutStream )
249 throw ( ::com::sun::star::uno::Exception );
250 #endif
251 void InsertVisualCache_Impl(
252 const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xTargetStream,
253 const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xCachedVisualRepresentation )
254 throw ( ::com::sun::star::uno::Exception );
256 void RemoveVisualCache_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xTargetStream )
257 throw ( ::com::sun::star::uno::Exception );
259 void SetVisReplInStream( sal_Bool bExists );
260 sal_Bool HasVisReplInStream();
262 ::com::sun::star::embed::VisualRepresentation GetVisualRepresentationInNativeFormat_Impl(
263 const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > xCachedVisRepr )
264 throw ( ::com::sun::star::uno::Exception );
266 ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > TryToRetrieveCachedVisualRepresentation_Impl(
267 const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xStream,
268 sal_Bool bAllowRepair50 = sal_False )
269 throw ();
270 #ifdef WNT
271 sal_Bool SaveObject_Impl();
272 sal_Bool OnShowWindow_Impl( sal_Bool bShow );
273 void CreateOleComponent_Impl( OleComponent* pOleComponent = NULL );
274 void CreateOleComponentAndLoad_Impl( OleComponent* pOleComponent = NULL );
275 void CreateOleComponentFromClipboard_Impl( OleComponent* pOleComponent = NULL );
276 #endif
277 void SetObjectIsLink_Impl( sal_Bool bIsLink ) { m_bIsLink = bIsLink; }
279 #ifdef WNT
280 ::rtl::OUString CreateTempURLEmpty_Impl();
281 ::rtl::OUString GetTempURL_Impl();
282 #endif
283 ::rtl::OUString GetContainerName_Impl() { return m_aContainerName; }
285 // the following 4 methods are related to switch to wrapping mode
286 void MoveListeners();
287 ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > CreateTemporarySubstorage( ::rtl::OUString& o_aStorageName );
288 ::rtl::OUString MoveToTemporarySubstream();
289 sal_Bool TryToConvertToOOo();
291 public:
292 // in case a new object must be created the class ID must be specified
293 OleEmbeddedObject( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory,
294 const ::com::sun::star::uno::Sequence< sal_Int8 >& aClassID,
295 const ::rtl::OUString& aClassName );
297 // in case object will be loaded from a persistent entry or from a file the class ID will be detected on loading
298 // factory can do it for OOo objects, but for OLE objects OS dependent code is required
299 OleEmbeddedObject( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory,
300 sal_Bool bLink );
301 #ifdef WNT
302 // this constructor let object be initialized from clipboard
303 OleEmbeddedObject( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
304 #endif
306 virtual ~OleEmbeddedObject();
308 #ifdef WNT
309 void OnIconChanged_Impl();
310 void OnViewChanged_Impl();
311 void OnClosed_Impl();
312 #endif
314 // XEmbeddedObject
316 virtual void SAL_CALL changeState( sal_Int32 nNewState )
317 throw ( ::com::sun::star::embed::UnreachableStateException,
318 ::com::sun::star::embed::WrongStateException,
319 ::com::sun::star::uno::Exception,
320 ::com::sun::star::uno::RuntimeException );
322 virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getReachableStates()
323 throw ( ::com::sun::star::embed::WrongStateException,
324 ::com::sun::star::uno::RuntimeException );
326 virtual sal_Int32 SAL_CALL getCurrentState()
327 throw ( ::com::sun::star::embed::WrongStateException,
328 ::com::sun::star::uno::RuntimeException );
330 virtual void SAL_CALL doVerb( sal_Int32 nVerbID )
331 throw ( ::com::sun::star::lang::IllegalArgumentException,
332 ::com::sun::star::embed::WrongStateException,
333 ::com::sun::star::embed::UnreachableStateException,
334 ::com::sun::star::uno::Exception,
335 ::com::sun::star::uno::RuntimeException );
337 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::embed::VerbDescriptor > SAL_CALL getSupportedVerbs()
338 throw ( ::com::sun::star::embed::WrongStateException,
339 ::com::sun::star::uno::RuntimeException );
341 virtual void SAL_CALL setClientSite(
342 const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedClient >& xClient )
343 throw ( ::com::sun::star::embed::WrongStateException,
344 ::com::sun::star::uno::RuntimeException );
346 virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedClient > SAL_CALL getClientSite()
347 throw ( ::com::sun::star::embed::WrongStateException,
348 ::com::sun::star::uno::RuntimeException );
350 virtual void SAL_CALL update()
351 throw ( ::com::sun::star::embed::WrongStateException,
352 ::com::sun::star::uno::Exception,
353 ::com::sun::star::uno::RuntimeException );
355 virtual void SAL_CALL setUpdateMode( sal_Int32 nMode )
356 throw ( ::com::sun::star::embed::WrongStateException,
357 ::com::sun::star::uno::RuntimeException );
359 virtual sal_Int64 SAL_CALL getStatus( sal_Int64 nAspect )
360 throw ( ::com::sun::star::embed::WrongStateException,
361 ::com::sun::star::uno::RuntimeException );
363 virtual void SAL_CALL setContainerName( const ::rtl::OUString& sName )
364 throw ( ::com::sun::star::uno::RuntimeException );
367 // XVisualObject
369 virtual void SAL_CALL setVisualAreaSize( sal_Int64 nAspect, const ::com::sun::star::awt::Size& aSize )
370 throw ( ::com::sun::star::lang::IllegalArgumentException,
371 ::com::sun::star::embed::WrongStateException,
372 ::com::sun::star::uno::Exception,
373 ::com::sun::star::uno::RuntimeException );
375 virtual ::com::sun::star::awt::Size SAL_CALL getVisualAreaSize( sal_Int64 nAspect )
376 throw ( ::com::sun::star::lang::IllegalArgumentException,
377 ::com::sun::star::embed::WrongStateException,
378 ::com::sun::star::uno::Exception,
379 ::com::sun::star::uno::RuntimeException );
381 virtual ::com::sun::star::embed::VisualRepresentation SAL_CALL getPreferredVisualRepresentation( ::sal_Int64 nAspect )
382 throw ( ::com::sun::star::lang::IllegalArgumentException,
383 ::com::sun::star::embed::WrongStateException,
384 ::com::sun::star::uno::Exception,
385 ::com::sun::star::uno::RuntimeException );
387 virtual sal_Int32 SAL_CALL getMapUnit( sal_Int64 nAspect )
388 throw ( ::com::sun::star::uno::Exception,
389 ::com::sun::star::uno::RuntimeException);
392 // XEmbedPersist
394 virtual void SAL_CALL setPersistentEntry(
395 const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
396 const ::rtl::OUString& sEntName,
397 sal_Int32 nEntryConnectionMode,
398 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArguments,
399 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lObjArgs )
400 throw ( ::com::sun::star::lang::IllegalArgumentException,
401 ::com::sun::star::embed::WrongStateException,
402 ::com::sun::star::io::IOException,
403 ::com::sun::star::uno::Exception,
404 ::com::sun::star::uno::RuntimeException );
406 virtual void SAL_CALL storeToEntry( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, const ::rtl::OUString& sEntName, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArguments, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lObjArgs )
407 throw ( ::com::sun::star::lang::IllegalArgumentException,
408 ::com::sun::star::embed::WrongStateException,
409 ::com::sun::star::io::IOException,
410 ::com::sun::star::uno::Exception,
411 ::com::sun::star::uno::RuntimeException );
413 virtual void SAL_CALL storeAsEntry(
414 const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
415 const ::rtl::OUString& sEntName,
416 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArguments,
417 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lObjArgs )
418 throw ( ::com::sun::star::lang::IllegalArgumentException,
419 ::com::sun::star::embed::WrongStateException,
420 ::com::sun::star::io::IOException,
421 ::com::sun::star::uno::Exception,
422 ::com::sun::star::uno::RuntimeException );
424 virtual void SAL_CALL saveCompleted( sal_Bool bUseNew )
425 throw ( ::com::sun::star::embed::WrongStateException,
426 ::com::sun::star::uno::Exception,
427 ::com::sun::star::uno::RuntimeException );
429 virtual sal_Bool SAL_CALL hasEntry()
430 throw ( ::com::sun::star::embed::WrongStateException,
431 ::com::sun::star::uno::RuntimeException );
433 virtual ::rtl::OUString SAL_CALL getEntryName()
434 throw ( ::com::sun::star::embed::WrongStateException,
435 ::com::sun::star::uno::RuntimeException );
437 // XLinkageSupport
439 virtual void SAL_CALL breakLink( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
440 const ::rtl::OUString& sEntName )
441 throw ( ::com::sun::star::lang::IllegalArgumentException,
442 ::com::sun::star::embed::WrongStateException,
443 ::com::sun::star::io::IOException,
444 ::com::sun::star::uno::Exception,
445 ::com::sun::star::uno::RuntimeException );
447 virtual sal_Bool SAL_CALL isLink()
448 throw ( ::com::sun::star::embed::WrongStateException,
449 ::com::sun::star::uno::RuntimeException);
451 virtual ::rtl::OUString SAL_CALL getLinkURL()
452 throw ( ::com::sun::star::embed::WrongStateException,
453 ::com::sun::star::uno::Exception,
454 ::com::sun::star::uno::RuntimeException);
456 // XCommonEmbedPersist
457 virtual void SAL_CALL storeOwn()
458 throw ( ::com::sun::star::embed::WrongStateException,
459 ::com::sun::star::io::IOException,
460 ::com::sun::star::uno::Exception,
461 ::com::sun::star::uno::RuntimeException );
463 virtual sal_Bool SAL_CALL isReadonly()
464 throw ( ::com::sun::star::embed::WrongStateException,
465 ::com::sun::star::uno::RuntimeException );
467 virtual void SAL_CALL reload(
468 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArguments,
469 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lObjArgs )
470 throw ( ::com::sun::star::lang::IllegalArgumentException,
471 ::com::sun::star::embed::WrongStateException,
472 ::com::sun::star::io::IOException,
473 ::com::sun::star::uno::Exception,
474 ::com::sun::star::uno::RuntimeException );
476 // XClassifiedObject
478 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getClassID()
479 throw ( ::com::sun::star::uno::RuntimeException );
481 virtual ::rtl::OUString SAL_CALL getClassName()
482 throw ( ::com::sun::star::uno::RuntimeException );
484 virtual void SAL_CALL setClassInfo(
485 const ::com::sun::star::uno::Sequence< sal_Int8 >& aClassID, const ::rtl::OUString& aClassName )
486 throw ( ::com::sun::star::lang::NoSupportException,
487 ::com::sun::star::uno::RuntimeException );
489 // XStateChangeBroadcaster
490 virtual void SAL_CALL addStateChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStateChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
491 virtual void SAL_CALL removeStateChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStateChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
494 // XComponentSupplier
496 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseable > SAL_CALL getComponent()
497 throw ( ::com::sun::star::uno::RuntimeException );
499 // XCloseable
501 virtual void SAL_CALL close( sal_Bool DeliverOwnership )
502 throw ( ::com::sun::star::util::CloseVetoException,
503 ::com::sun::star::uno::RuntimeException );
505 virtual void SAL_CALL addCloseListener(
506 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseListener >& Listener )
507 throw ( ::com::sun::star::uno::RuntimeException );
509 virtual void SAL_CALL removeCloseListener(
510 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseListener >& Listener )
511 throw ( ::com::sun::star::uno::RuntimeException );
513 // XEventBroadcaster
514 virtual void SAL_CALL addEventListener(
515 const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventListener >& Listener )
516 throw ( ::com::sun::star::uno::RuntimeException );
518 virtual void SAL_CALL removeEventListener(
519 const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventListener >& Listener )
520 throw ( ::com::sun::star::uno::RuntimeException );
522 // XInplaceObject ( only for wrapping scenario here )
524 virtual void SAL_CALL setObjectRectangles( const ::com::sun::star::awt::Rectangle& aPosRect,
525 const ::com::sun::star::awt::Rectangle& aClipRect )
526 throw ( ::com::sun::star::embed::WrongStateException,
527 ::com::sun::star::uno::Exception,
528 ::com::sun::star::uno::RuntimeException );
530 virtual void SAL_CALL enableModeless( sal_Bool bEnable )
531 throw ( ::com::sun::star::embed::WrongStateException,
532 ::com::sun::star::uno::Exception,
533 ::com::sun::star::uno::RuntimeException );
535 virtual void SAL_CALL translateAccelerators(
536 const ::com::sun::star::uno::Sequence< ::com::sun::star::awt::KeyEvent >& aKeys )
537 throw ( ::com::sun::star::embed::WrongStateException,
538 ::com::sun::star::uno::RuntimeException );
540 // XChild ( only for wrapping scenario here )
541 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent( ) throw (::com::sun::star::uno::RuntimeException);
542 virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Parent ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
546 #endif