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 : :
29 : : #ifndef _INC_OLEEMBOBJ_HXX_
30 : : #define _INC_OLEEMBOBJ_HXX_
31 : :
32 : : #include <com/sun/star/uno/Sequence.hxx>
33 : : #include <com/sun/star/uno/Reference.hxx>
34 : : #include <com/sun/star/uno/Any.hxx>
35 : : #include <com/sun/star/embed/XEmbeddedObject.hpp>
36 : : #include <com/sun/star/embed/XInplaceObject.hpp>
37 : : #include <com/sun/star/embed/XVisualObject.hpp>
38 : : #include <com/sun/star/embed/XEmbedPersist.hpp>
39 : : #include <com/sun/star/embed/XLinkageSupport.hpp>
40 : : #include <com/sun/star/embed/XClassifiedObject.hpp>
41 : : #include <com/sun/star/embed/XComponentSupplier.hpp>
42 : : #include <com/sun/star/embed/VerbDescriptor.hpp>
43 : : #include <com/sun/star/document/XEventBroadcaster.hpp>
44 : : #include <com/sun/star/container/XChild.hpp>
45 : : #include <com/sun/star/util/XCloseable.hpp>
46 : : #include <com/sun/star/util/XCloseListener.hpp>
47 : : #include <cppuhelper/implbase5.hxx>
48 : :
49 : : #include <osl/thread.h>
50 : :
51 : : namespace cppu {
52 : : class OMultiTypeInterfaceContainerHelper;
53 : : }
54 : :
55 : 0 : class VerbExecutionController
56 : : {
57 : : // the following mutex is allowed to be locked only for variables initialization, so no deadlock can be caused
58 : : ::osl::Mutex m_aVerbExecutionMutex;
59 : :
60 : : sal_Bool m_bVerbExecutionInProgress;
61 : : oslThreadIdentifier m_nVerbExecutionThreadIdentifier;
62 : : sal_Bool m_bChangedOnVerbExecution;
63 : :
64 : : sal_Bool m_bWasEverActive;
65 : : sal_Int32 m_nNotificationLock;
66 : :
67 : : public:
68 : :
69 : 0 : VerbExecutionController()
70 : : : m_bVerbExecutionInProgress( sal_False )
71 : : , m_nVerbExecutionThreadIdentifier( 0 )
72 : : , m_bChangedOnVerbExecution( sal_False )
73 : : , m_bWasEverActive( sal_False )
74 : 0 : , m_nNotificationLock( 0 )
75 : 0 : {}
76 : : #ifdef WNT
77 : : void StartControlExecution();
78 : : sal_Bool EndControlExecution_WasModified();
79 : : void ModificationNotificationIsDone();
80 : : #endif
81 : : void LockNotification();
82 : : void UnlockNotification();
83 : :
84 : : // no need to lock anything to check the value of the numeric members
85 : : sal_Bool CanDoNotification() { return ( !m_bVerbExecutionInProgress && !m_bWasEverActive && !m_nNotificationLock ); }
86 : : // ... or to change it
87 : : void ObjectIsActive() { m_bWasEverActive = sal_True; }
88 : : };
89 : :
90 : : class VerbExecutionControllerGuard
91 : : {
92 : : VerbExecutionController& m_rController;
93 : : public:
94 : :
95 : 0 : VerbExecutionControllerGuard( VerbExecutionController& rController )
96 : 0 : : m_rController( rController )
97 : : {
98 : 0 : m_rController.LockNotification();
99 : 0 : }
100 : :
101 : 0 : ~VerbExecutionControllerGuard()
102 : : {
103 : 0 : m_rController.UnlockNotification();
104 : 0 : }
105 : : };
106 : :
107 : :
108 : : class OleComponent;
109 : : class OwnView_Impl;
110 : : class OleEmbeddedObject : public ::cppu::WeakImplHelper5
111 : : < ::com::sun::star::embed::XEmbeddedObject
112 : : , ::com::sun::star::embed::XEmbedPersist
113 : : , ::com::sun::star::embed::XLinkageSupport
114 : : , ::com::sun::star::embed::XInplaceObject
115 : : , ::com::sun::star::container::XChild >
116 : : {
117 : : friend class OleComponent;
118 : :
119 : : ::osl::Mutex m_aMutex;
120 : :
121 : : OleComponent* m_pOleComponent;
122 : :
123 : : ::cppu::OMultiTypeInterfaceContainerHelper* m_pInterfaceContainer;
124 : :
125 : : sal_Bool m_bReadOnly;
126 : :
127 : : sal_Int32 m_bDisposed;
128 : : sal_Int32 m_nObjectState;
129 : : sal_Int32 m_nTargetState;
130 : : sal_Int32 m_nUpdateMode;
131 : :
132 : : ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory;
133 : :
134 : : ::com::sun::star::uno::Sequence< sal_Int8 > m_aClassID;
135 : : ::rtl::OUString m_aClassName;
136 : :
137 : : ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedClient > m_xClientSite;
138 : :
139 : : ::rtl::OUString m_aContainerName;
140 : :
141 : : ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseListener > m_xClosePreventer;
142 : :
143 : : sal_Bool m_bWaitSaveCompleted;
144 : : sal_Bool m_bNewVisReplInStream;
145 : : ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > m_xNewCachedVisRepl;
146 : : ::rtl::OUString m_aNewEntryName;
147 : : ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > m_xNewParentStorage;
148 : : ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > m_xNewObjectStream;
149 : : sal_Bool m_bStoreLoaded;
150 : :
151 : : ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > m_xCachedVisualRepresentation;
152 : : sal_Bool m_bVisReplInitialized;
153 : : sal_Bool m_bVisReplInStream;
154 : : sal_Bool m_bStoreVisRepl;
155 : :
156 : : sal_Bool m_bIsLink;
157 : :
158 : : // TODO/LATER: may need to cache more than one aspect in future
159 : : sal_Bool m_bHasCachedSize; // the object has cached size
160 : : ::com::sun::star::awt::Size m_aCachedSize;
161 : : sal_Int64 m_nCachedAspect;
162 : :
163 : : sal_Bool m_bHasSizeToSet; // the object has cached size that should be set to OLE component
164 : : ::com::sun::star::awt::Size m_aSizeToSet; // this size might be different from the cached one ( scaling is applied )
165 : : sal_Int64 m_nAspectToSet;
166 : :
167 : :
168 : : // cache the status of the object
169 : : // TODO/LATER: may need to cache more than one aspect in future
170 : : sal_Bool m_bGotStatus;
171 : : sal_Int64 m_nStatus;
172 : : sal_Int64 m_nStatusAspect;
173 : :
174 : : // embedded object related stuff
175 : : ::rtl::OUString m_aEntryName;
176 : : ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > m_xParentStorage;
177 : : ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > m_xObjectStream;
178 : :
179 : : // link related stuff
180 : : ::rtl::OUString m_aLinkURL; // ???
181 : :
182 : : // points to own view provider if the the object has no server
183 : : OwnView_Impl* m_pOwnView;
184 : :
185 : : // whether the object should be initialized from clipboard in case of default initialization
186 : : sal_Bool m_bFromClipboard;
187 : :
188 : : ::rtl::OUString m_aTempURL;
189 : :
190 : : ::rtl::OUString m_aTempDumpURL;
191 : :
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;
195 : :
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;
199 : :
200 : : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xParent;
201 : :
202 : : protected:
203 : :
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 );
207 : :
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();
218 : :
219 : :
220 : : ::com::sun::star::uno::Sequence< sal_Int32 > GetIntermediateVerbsSequence_Impl( sal_Int32 nNewState );
221 : :
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
225 : :
226 : : void CloseComponent();
227 : : void Dispose();
228 : :
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 );
233 : :
234 : : void SwitchOwnPersistence(
235 : : const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xNewParentStorage,
236 : : const ::rtl::OUString& aNewName );
237 : :
238 : : void GetRidOfComponent();
239 : :
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 >& lObjArgs,
244 : : sal_Bool bSaveAs )
245 : : throw ( ::com::sun::star::uno::Exception );
246 : : #ifdef WNT
247 : : void StoreObjectToStream( ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > xOutStream )
248 : : throw ( ::com::sun::star::uno::Exception );
249 : : #endif
250 : : void InsertVisualCache_Impl(
251 : : const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xTargetStream,
252 : : const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xCachedVisualRepresentation )
253 : : throw ( ::com::sun::star::uno::Exception );
254 : :
255 : : void RemoveVisualCache_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xTargetStream )
256 : : throw ( ::com::sun::star::uno::Exception );
257 : :
258 : : void SetVisReplInStream( sal_Bool bExists );
259 : : sal_Bool HasVisReplInStream();
260 : :
261 : : ::com::sun::star::embed::VisualRepresentation GetVisualRepresentationInNativeFormat_Impl(
262 : : const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > xCachedVisRepr )
263 : : throw ( ::com::sun::star::uno::Exception );
264 : :
265 : : ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > TryToRetrieveCachedVisualRepresentation_Impl(
266 : : const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xStream,
267 : : sal_Bool bAllowRepair50 = sal_False )
268 : : throw ();
269 : : #ifdef WNT
270 : : sal_Bool SaveObject_Impl();
271 : : sal_Bool OnShowWindow_Impl( sal_Bool bShow );
272 : : void CreateOleComponent_Impl( OleComponent* pOleComponent = NULL );
273 : : void CreateOleComponentAndLoad_Impl( OleComponent* pOleComponent = NULL );
274 : : void CreateOleComponentFromClipboard_Impl( OleComponent* pOleComponent = NULL );
275 : : #endif
276 : : void SetObjectIsLink_Impl( sal_Bool bIsLink ) { m_bIsLink = bIsLink; }
277 : :
278 : : #ifdef WNT
279 : : ::rtl::OUString CreateTempURLEmpty_Impl();
280 : : ::rtl::OUString GetTempURL_Impl();
281 : : #endif
282 : : ::rtl::OUString GetContainerName_Impl() { return m_aContainerName; }
283 : :
284 : : // the following 4 methods are related to switch to wrapping mode
285 : : void MoveListeners();
286 : : ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > CreateTemporarySubstorage( ::rtl::OUString& o_aStorageName );
287 : : ::rtl::OUString MoveToTemporarySubstream();
288 : : sal_Bool TryToConvertToOOo();
289 : :
290 : : public:
291 : : // in case a new object must be created the class ID must be specified
292 : : OleEmbeddedObject( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory,
293 : : const ::com::sun::star::uno::Sequence< sal_Int8 >& aClassID,
294 : : const ::rtl::OUString& aClassName );
295 : :
296 : : // in case object will be loaded from a persistent entry or from a file the class ID will be detected on loading
297 : : // factory can do it for OOo objects, but for OLE objects OS dependent code is required
298 : : OleEmbeddedObject( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory,
299 : : sal_Bool bLink );
300 : : #ifdef WNT
301 : : // this constructor let object be initialized from clipboard
302 : : OleEmbeddedObject( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
303 : : #endif
304 : :
305 : : virtual ~OleEmbeddedObject();
306 : :
307 : : #ifdef WNT
308 : : void OnIconChanged_Impl();
309 : : void OnViewChanged_Impl();
310 : : void OnClosed_Impl();
311 : : #endif
312 : :
313 : : // XEmbeddedObject
314 : :
315 : : virtual void SAL_CALL changeState( sal_Int32 nNewState )
316 : : throw ( ::com::sun::star::embed::UnreachableStateException,
317 : : ::com::sun::star::embed::WrongStateException,
318 : : ::com::sun::star::uno::Exception,
319 : : ::com::sun::star::uno::RuntimeException );
320 : :
321 : : virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getReachableStates()
322 : : throw ( ::com::sun::star::embed::WrongStateException,
323 : : ::com::sun::star::uno::RuntimeException );
324 : :
325 : : virtual sal_Int32 SAL_CALL getCurrentState()
326 : : throw ( ::com::sun::star::embed::WrongStateException,
327 : : ::com::sun::star::uno::RuntimeException );
328 : :
329 : : virtual void SAL_CALL doVerb( sal_Int32 nVerbID )
330 : : throw ( ::com::sun::star::lang::IllegalArgumentException,
331 : : ::com::sun::star::embed::WrongStateException,
332 : : ::com::sun::star::embed::UnreachableStateException,
333 : : ::com::sun::star::uno::Exception,
334 : : ::com::sun::star::uno::RuntimeException );
335 : :
336 : : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::embed::VerbDescriptor > SAL_CALL getSupportedVerbs()
337 : : throw ( ::com::sun::star::embed::WrongStateException,
338 : : ::com::sun::star::uno::RuntimeException );
339 : :
340 : : virtual void SAL_CALL setClientSite(
341 : : const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedClient >& xClient )
342 : : throw ( ::com::sun::star::embed::WrongStateException,
343 : : ::com::sun::star::uno::RuntimeException );
344 : :
345 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedClient > SAL_CALL getClientSite()
346 : : throw ( ::com::sun::star::embed::WrongStateException,
347 : : ::com::sun::star::uno::RuntimeException );
348 : :
349 : : virtual void SAL_CALL update()
350 : : throw ( ::com::sun::star::embed::WrongStateException,
351 : : ::com::sun::star::uno::Exception,
352 : : ::com::sun::star::uno::RuntimeException );
353 : :
354 : : virtual void SAL_CALL setUpdateMode( sal_Int32 nMode )
355 : : throw ( ::com::sun::star::embed::WrongStateException,
356 : : ::com::sun::star::uno::RuntimeException );
357 : :
358 : : virtual sal_Int64 SAL_CALL getStatus( sal_Int64 nAspect )
359 : : throw ( ::com::sun::star::embed::WrongStateException,
360 : : ::com::sun::star::uno::RuntimeException );
361 : :
362 : : virtual void SAL_CALL setContainerName( const ::rtl::OUString& sName )
363 : : throw ( ::com::sun::star::uno::RuntimeException );
364 : :
365 : :
366 : : // XVisualObject
367 : :
368 : : virtual void SAL_CALL setVisualAreaSize( sal_Int64 nAspect, const ::com::sun::star::awt::Size& aSize )
369 : : throw ( ::com::sun::star::lang::IllegalArgumentException,
370 : : ::com::sun::star::embed::WrongStateException,
371 : : ::com::sun::star::uno::Exception,
372 : : ::com::sun::star::uno::RuntimeException );
373 : :
374 : : virtual ::com::sun::star::awt::Size SAL_CALL getVisualAreaSize( sal_Int64 nAspect )
375 : : throw ( ::com::sun::star::lang::IllegalArgumentException,
376 : : ::com::sun::star::embed::WrongStateException,
377 : : ::com::sun::star::uno::Exception,
378 : : ::com::sun::star::uno::RuntimeException );
379 : :
380 : : virtual ::com::sun::star::embed::VisualRepresentation SAL_CALL getPreferredVisualRepresentation( ::sal_Int64 nAspect )
381 : : throw ( ::com::sun::star::lang::IllegalArgumentException,
382 : : ::com::sun::star::embed::WrongStateException,
383 : : ::com::sun::star::uno::Exception,
384 : : ::com::sun::star::uno::RuntimeException );
385 : :
386 : : virtual sal_Int32 SAL_CALL getMapUnit( sal_Int64 nAspect )
387 : : throw ( ::com::sun::star::uno::Exception,
388 : : ::com::sun::star::uno::RuntimeException);
389 : :
390 : :
391 : : // XEmbedPersist
392 : :
393 : : virtual void SAL_CALL setPersistentEntry(
394 : : const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
395 : : const ::rtl::OUString& sEntName,
396 : : sal_Int32 nEntryConnectionMode,
397 : : const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArguments,
398 : : const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lObjArgs )
399 : : throw ( ::com::sun::star::lang::IllegalArgumentException,
400 : : ::com::sun::star::embed::WrongStateException,
401 : : ::com::sun::star::io::IOException,
402 : : ::com::sun::star::uno::Exception,
403 : : ::com::sun::star::uno::RuntimeException );
404 : :
405 : : 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 )
406 : : throw ( ::com::sun::star::lang::IllegalArgumentException,
407 : : ::com::sun::star::embed::WrongStateException,
408 : : ::com::sun::star::io::IOException,
409 : : ::com::sun::star::uno::Exception,
410 : : ::com::sun::star::uno::RuntimeException );
411 : :
412 : : virtual void SAL_CALL storeAsEntry(
413 : : const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
414 : : const ::rtl::OUString& sEntName,
415 : : const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArguments,
416 : : const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lObjArgs )
417 : : throw ( ::com::sun::star::lang::IllegalArgumentException,
418 : : ::com::sun::star::embed::WrongStateException,
419 : : ::com::sun::star::io::IOException,
420 : : ::com::sun::star::uno::Exception,
421 : : ::com::sun::star::uno::RuntimeException );
422 : :
423 : : virtual void SAL_CALL saveCompleted( sal_Bool bUseNew )
424 : : throw ( ::com::sun::star::embed::WrongStateException,
425 : : ::com::sun::star::uno::Exception,
426 : : ::com::sun::star::uno::RuntimeException );
427 : :
428 : : virtual sal_Bool SAL_CALL hasEntry()
429 : : throw ( ::com::sun::star::embed::WrongStateException,
430 : : ::com::sun::star::uno::RuntimeException );
431 : :
432 : : virtual ::rtl::OUString SAL_CALL getEntryName()
433 : : throw ( ::com::sun::star::embed::WrongStateException,
434 : : ::com::sun::star::uno::RuntimeException );
435 : :
436 : : // XLinkageSupport
437 : :
438 : : virtual void SAL_CALL breakLink( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
439 : : const ::rtl::OUString& sEntName )
440 : : throw ( ::com::sun::star::lang::IllegalArgumentException,
441 : : ::com::sun::star::embed::WrongStateException,
442 : : ::com::sun::star::io::IOException,
443 : : ::com::sun::star::uno::Exception,
444 : : ::com::sun::star::uno::RuntimeException );
445 : :
446 : : virtual sal_Bool SAL_CALL isLink()
447 : : throw ( ::com::sun::star::embed::WrongStateException,
448 : : ::com::sun::star::uno::RuntimeException);
449 : :
450 : : virtual ::rtl::OUString SAL_CALL getLinkURL()
451 : : throw ( ::com::sun::star::embed::WrongStateException,
452 : : ::com::sun::star::uno::Exception,
453 : : ::com::sun::star::uno::RuntimeException);
454 : :
455 : : // XCommonEmbedPersist
456 : : virtual void SAL_CALL storeOwn()
457 : : throw ( ::com::sun::star::embed::WrongStateException,
458 : : ::com::sun::star::io::IOException,
459 : : ::com::sun::star::uno::Exception,
460 : : ::com::sun::star::uno::RuntimeException );
461 : :
462 : : virtual sal_Bool SAL_CALL isReadonly()
463 : : throw ( ::com::sun::star::embed::WrongStateException,
464 : : ::com::sun::star::uno::RuntimeException );
465 : :
466 : : virtual void SAL_CALL reload(
467 : : const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArguments,
468 : : const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lObjArgs )
469 : : throw ( ::com::sun::star::lang::IllegalArgumentException,
470 : : ::com::sun::star::embed::WrongStateException,
471 : : ::com::sun::star::io::IOException,
472 : : ::com::sun::star::uno::Exception,
473 : : ::com::sun::star::uno::RuntimeException );
474 : :
475 : : // XClassifiedObject
476 : :
477 : : virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getClassID()
478 : : throw ( ::com::sun::star::uno::RuntimeException );
479 : :
480 : : virtual ::rtl::OUString SAL_CALL getClassName()
481 : : throw ( ::com::sun::star::uno::RuntimeException );
482 : :
483 : : virtual void SAL_CALL setClassInfo(
484 : : const ::com::sun::star::uno::Sequence< sal_Int8 >& aClassID, const ::rtl::OUString& aClassName )
485 : : throw ( ::com::sun::star::lang::NoSupportException,
486 : : ::com::sun::star::uno::RuntimeException );
487 : :
488 : : // XStateChangeBroadcaster
489 : : virtual void SAL_CALL addStateChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStateChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
490 : : virtual void SAL_CALL removeStateChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStateChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
491 : :
492 : :
493 : : // XComponentSupplier
494 : :
495 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseable > SAL_CALL getComponent()
496 : : throw ( ::com::sun::star::uno::RuntimeException );
497 : :
498 : : // XCloseable
499 : :
500 : : virtual void SAL_CALL close( sal_Bool DeliverOwnership )
501 : : throw ( ::com::sun::star::util::CloseVetoException,
502 : : ::com::sun::star::uno::RuntimeException );
503 : :
504 : : virtual void SAL_CALL addCloseListener(
505 : : const ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseListener >& Listener )
506 : : throw ( ::com::sun::star::uno::RuntimeException );
507 : :
508 : : virtual void SAL_CALL removeCloseListener(
509 : : const ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseListener >& Listener )
510 : : throw ( ::com::sun::star::uno::RuntimeException );
511 : :
512 : : // XEventBroadcaster
513 : : virtual void SAL_CALL addEventListener(
514 : : const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventListener >& Listener )
515 : : throw ( ::com::sun::star::uno::RuntimeException );
516 : :
517 : : virtual void SAL_CALL removeEventListener(
518 : : const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventListener >& Listener )
519 : : throw ( ::com::sun::star::uno::RuntimeException );
520 : :
521 : : // XInplaceObject ( only for wrapping scenario here )
522 : :
523 : : virtual void SAL_CALL setObjectRectangles( const ::com::sun::star::awt::Rectangle& aPosRect,
524 : : const ::com::sun::star::awt::Rectangle& aClipRect )
525 : : throw ( ::com::sun::star::embed::WrongStateException,
526 : : ::com::sun::star::uno::Exception,
527 : : ::com::sun::star::uno::RuntimeException );
528 : :
529 : : virtual void SAL_CALL enableModeless( sal_Bool bEnable )
530 : : throw ( ::com::sun::star::embed::WrongStateException,
531 : : ::com::sun::star::uno::Exception,
532 : : ::com::sun::star::uno::RuntimeException );
533 : :
534 : : virtual void SAL_CALL translateAccelerators(
535 : : const ::com::sun::star::uno::Sequence< ::com::sun::star::awt::KeyEvent >& aKeys )
536 : : throw ( ::com::sun::star::embed::WrongStateException,
537 : : ::com::sun::star::uno::RuntimeException );
538 : :
539 : : // XChild ( only for wrapping scenario here )
540 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent( ) throw (::com::sun::star::uno::RuntimeException);
541 : : 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);
542 : :
543 : : };
544 : :
545 : : #endif
546 : :
547 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|