1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _INC_COMMONEMBOBJ_HXX_
29 #define _INC_COMMONEMBOBJ_HXX_
30 
31 #include <com/sun/star/uno/Sequence.hxx>
32 #include <com/sun/star/uno/Reference.hxx>
33 #include <com/sun/star/uno/Any.hxx>
34 #include <com/sun/star/container/XChild.hpp>
35 #include <com/sun/star/document/XStorageBasedDocument.hpp>
36 #include <com/sun/star/embed/XEmbeddedObject.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/XInplaceObject.hpp>
43 #include <com/sun/star/embed/XStateChangeBroadcaster.hpp>
44 #include <com/sun/star/awt/XWindow.hpp>
45 #include <com/sun/star/awt/Rectangle.hpp>
46 #include <com/sun/star/document/XEventBroadcaster.hpp>
47 #include <com/sun/star/util/XCloseable.hpp>
48 #include <com/sun/star/chart2/XDefaultSizeTransmitter.hpp>
49 #include <cppuhelper/weak.hxx>
50 
51 namespace com { namespace sun { namespace star {
52     namespace embed {
53         class XStorage;
54     }
55     namespace frame {
56         class XModel;
57         class XFrame;
58     }
59     namespace lang {
60         class XMultiServiceFactory;
61     }
62     namespace util {
63         class XCloseListener;
64     }
65     namespace beans {
66         struct PropertyValue;
67         struct NamedValue;
68     }
69 }}}
70 
71 namespace cppu {
72     class OMultiTypeInterfaceContainerHelper;
73 }
74 
75 namespace comphelper {
76     class NamedValueCollection;
77 }
78 
79 #define NUM_SUPPORTED_STATES 5
80 // #define NUM_SUPPORTED_VERBS 5
81 
82 #include "docholder.hxx"
83 
84 class Interceptor;
85 
86 class OCommonEmbeddedObject : public ::com::sun::star::embed::XEmbeddedObject
87                             , public ::com::sun::star::embed::XEmbedPersist
88                             , public ::com::sun::star::embed::XLinkageSupport
89                             , public ::com::sun::star::embed::XInplaceObject
90                             , public ::com::sun::star::container::XChild
91                             , public ::com::sun::star::chart2::XDefaultSizeTransmitter
92                             , public ::cppu::OWeakObject
93 {
94 protected:
95     ::osl::Mutex    m_aMutex;
96 
97     DocumentHolder* m_pDocHolder;
98 
99     ::cppu::OMultiTypeInterfaceContainerHelper* m_pInterfaceContainer;
100 
101     sal_Bool m_bReadOnly;
102 
103     sal_Bool m_bDisposed;
104     sal_Bool m_bClosed;
105 
106     sal_Int32 m_nObjectState;
107     sal_Int32 m_nTargetState; // should be -1 exept during state changing
108     sal_Int32 m_nUpdateMode;
109 
110     ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory;
111 
112     ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > m_aDocMediaDescriptor;
113 
114     ::com::sun::star::uno::Sequence< sal_Int8 > m_aClassID;
115     ::rtl::OUString m_aClassName;
116 
117     ::rtl::OUString m_aDocServiceName;
118     ::rtl::OUString m_aPresetFilterName;
119 
120     sal_Int64 m_nMiscStatus;
121 
122     ::com::sun::star::uno::Sequence< ::com::sun::star::embed::VerbDescriptor > m_aObjectVerbs;
123 
124     ::com::sun::star::uno::Sequence< sal_Int32 > m_aAcceptedStates;
125     ::com::sun::star::uno::Sequence< sal_Int32 > m_pIntermediateStatesSeqs[NUM_SUPPORTED_STATES][NUM_SUPPORTED_STATES];
126     ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< sal_Int32 > > m_aVerbTable;
127 
128     ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedClient > m_xClientSite;
129 
130     ::rtl::OUString m_aContainerName;
131     ::rtl::OUString m_aDefaultParentBaseURL;
132     ::rtl::OUString m_aModuleName;
133     sal_Bool        m_bEmbeddedScriptSupport;
134     sal_Bool        m_bDocumentRecoverySupport;
135 
136     Interceptor* m_pInterceptor;
137 
138     // following information will be used between SaveAs and SaveCompleted
139     sal_Bool m_bWaitSaveCompleted;
140     ::rtl::OUString m_aNewEntryName;
141     ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > m_xNewParentStorage;
142     ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > m_xNewObjectStorage;
143     ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > m_aNewDocMediaDescriptor;
144 
145     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xClientWindow; // ???
146     ::com::sun::star::awt::Rectangle m_aOwnRectangle;
147     ::com::sun::star::awt::Rectangle m_aClipRectangle;
148 
149     sal_Bool m_bIsLink;
150 
151     // embedded object related stuff
152     ::rtl::OUString m_aEntryName;
153     ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > m_xParentStorage;
154     ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > m_xObjectStorage;
155     ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > m_xRecoveryStorage;
156 
157     // link related stuff
158     ::rtl::OUString m_aLinkURL;
159     ::rtl::OUString m_aLinkFilterName;
160     sal_Bool        m_bLinkHasPassword;
161     ::rtl::OUString m_aLinkPassword;
162 
163     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xParent;
164 
165     sal_Bool m_bHasClonedSize; // the object has cached size
166     ::com::sun::star::awt::Size m_aClonedSize;
167     sal_Int32 m_nClonedMapUnit;
168     ::com::sun::star::awt::Size m_aDefaultSizeForChart_In_100TH_MM;//#i103460# charts do not necessaryly have an own size within ODF files, in this case they need to use the size settings from the surrounding frame, which is made available with this member
169 
170 private:
171     void CommonInit_Impl( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aObjectProps );
172 
173     void LinkInit_Impl( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aObjectProps,
174                         const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aMediaDescr,
175                         const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aObjectDescr );
176 
177 
178     void SwitchOwnPersistence(
179                 const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xNewParentStorage,
180                 const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xNewObjectStorage,
181                 const ::rtl::OUString& aNewName );
182 
183     void SwitchOwnPersistence(
184                 const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xNewParentStorage,
185                 const ::rtl::OUString& aNewName );
186 
187     ::rtl::OUString GetDocumentServiceName() const { return m_aDocServiceName; }
188     ::rtl::OUString GetPresetFilterName() const { return m_aPresetFilterName; }
189 
190     ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >
191         StoreDocumentToTempStream_Impl( sal_Int32 nStorageFormat,
192                                         const ::rtl::OUString& aBaseURL,
193                                         const ::rtl::OUString& aHierarchName );
194 
195     sal_Int32 ConvertVerbToState_Impl( sal_Int32 nVerb );
196 
197     void Deactivate();
198 
199     void StateChangeNotification_Impl( sal_Bool bBeforeChange, sal_Int32 nOldState, sal_Int32 nNewState,::osl::ResettableMutexGuard& _rGuard );
200 
201     void SwitchStateTo_Impl( sal_Int32 nNextState );
202 
203     ::com::sun::star::uno::Sequence< sal_Int32 > GetIntermediateStatesSequence_Impl( sal_Int32 nNewState );
204 
205     ::rtl::OUString GetFilterName( sal_Int32 nVersion ) const;
206     ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseable > LoadDocumentFromStorage_Impl();
207 
208     ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseable > LoadLink_Impl();
209 
210     ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseable > InitNewDocument_Impl();
211 
212     void StoreDocToStorage_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
213                                 sal_Int32 nStorageVersion,
214                                 const ::rtl::OUString& aBaseURL,
215                                 const ::rtl::OUString& aHierarchName,
216                                 sal_Bool bAttachToStorage );
217 
218     void SwitchDocToStorage_Impl(
219             const ::com::sun::star::uno::Reference< ::com::sun::star::document::XStorageBasedDocument >& xDoc,
220             const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
221 
222     void FillDefaultLoadArgs_Impl(
223             const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& i_rxStorage,
224                   ::comphelper::NamedValueCollection& o_rLoadArgs
225         ) const;
226 
227     void EmbedAndReparentDoc_Impl(
228             const ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseable >& i_rxDocument
229         ) const;
230 
231     ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseable > CreateDocFromMediaDescr_Impl(
232                         const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aMedDescr );
233 
234     ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseable > CreateTempDocFromLink_Impl();
235 
236     ::rtl::OUString GetBaseURL_Impl() const;
237     ::rtl::OUString GetBaseURLFrom_Impl(
238                     const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArguments,
239                     const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lObjArgs );
240 
241 public:
242     OCommonEmbeddedObject(
243         const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory,
244         const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aObjectProps );
245 
246     // no persistance for linked objects, so the descriptors are provided in constructor
247     OCommonEmbeddedObject(
248         const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory,
249         const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aObjectProps,
250         const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aMediaDescr,
251         const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aObjectDescr );
252 
253     virtual ~OCommonEmbeddedObject();
254 
255     void SaveObject_Impl();
256 
257     void requestPositioning( const ::com::sun::star::awt::Rectangle& aRect );
258 
259     // not a real listener and should not be
260     void PostEvent_Impl( const ::rtl::OUString& aEventName,
261                          const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xSource =
262                                             ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
263 
264 // XInterface
265 
266     virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& rType )
267         throw( ::com::sun::star::uno::RuntimeException ) ;
268 
269     virtual void SAL_CALL acquire()
270         throw();
271 
272     virtual void SAL_CALL release()
273         throw();
274 
275 // XTypeProvider
276 
277     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
278         throw( ::com::sun::star::uno::RuntimeException ) ;
279 
280     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
281         throw( ::com::sun::star::uno::RuntimeException ) ;
282 
283 // XEmbeddedObject
284 
285     virtual void SAL_CALL changeState( sal_Int32 nNewState )
286         throw ( ::com::sun::star::embed::UnreachableStateException,
287                 ::com::sun::star::embed::WrongStateException,
288                 ::com::sun::star::uno::Exception,
289                 ::com::sun::star::uno::RuntimeException );
290 
291     virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getReachableStates()
292         throw ( ::com::sun::star::embed::WrongStateException,
293                 ::com::sun::star::uno::RuntimeException );
294 
295     virtual sal_Int32 SAL_CALL getCurrentState()
296         throw ( ::com::sun::star::embed::WrongStateException,
297                 ::com::sun::star::uno::RuntimeException );
298 
299     virtual void SAL_CALL doVerb( sal_Int32 nVerbID )
300         throw ( ::com::sun::star::lang::IllegalArgumentException,
301                 ::com::sun::star::embed::WrongStateException,
302                 ::com::sun::star::embed::UnreachableStateException,
303                 ::com::sun::star::uno::Exception,
304                 ::com::sun::star::uno::RuntimeException );
305 
306     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::embed::VerbDescriptor > SAL_CALL getSupportedVerbs()
307         throw ( ::com::sun::star::embed::WrongStateException,
308                 ::com::sun::star::uno::RuntimeException );
309 
310     virtual void SAL_CALL setClientSite(
311                 const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedClient >& xClient )
312         throw ( ::com::sun::star::embed::WrongStateException,
313                 ::com::sun::star::uno::RuntimeException );
314 
315     virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedClient > SAL_CALL getClientSite()
316         throw ( ::com::sun::star::embed::WrongStateException,
317                 ::com::sun::star::uno::RuntimeException );
318 
319     virtual void SAL_CALL update()
320         throw ( ::com::sun::star::embed::WrongStateException,
321                 ::com::sun::star::uno::Exception,
322                 ::com::sun::star::uno::RuntimeException );
323 
324     virtual void SAL_CALL setUpdateMode( sal_Int32 nMode )
325         throw ( ::com::sun::star::embed::WrongStateException,
326                 ::com::sun::star::uno::RuntimeException );
327 
328     virtual sal_Int64 SAL_CALL getStatus( sal_Int64 nAspect )
329         throw ( ::com::sun::star::embed::WrongStateException,
330                 ::com::sun::star::uno::RuntimeException );
331 
332     virtual void SAL_CALL setContainerName( const ::rtl::OUString& sName )
333         throw ( ::com::sun::star::uno::RuntimeException );
334 
335 
336 // XVisualObject
337 
338     virtual void SAL_CALL setVisualAreaSize( sal_Int64 nAspect, const ::com::sun::star::awt::Size& aSize )
339         throw ( ::com::sun::star::lang::IllegalArgumentException,
340                 ::com::sun::star::embed::WrongStateException,
341                 ::com::sun::star::uno::Exception,
342                 ::com::sun::star::uno::RuntimeException );
343 
344     virtual ::com::sun::star::awt::Size SAL_CALL getVisualAreaSize( sal_Int64 nAspect )
345         throw ( ::com::sun::star::lang::IllegalArgumentException,
346                 ::com::sun::star::embed::WrongStateException,
347                 ::com::sun::star::uno::Exception,
348                 ::com::sun::star::uno::RuntimeException );
349 
350     virtual ::com::sun::star::embed::VisualRepresentation SAL_CALL getPreferredVisualRepresentation( ::sal_Int64 nAspect )
351         throw ( ::com::sun::star::lang::IllegalArgumentException,
352                 ::com::sun::star::embed::WrongStateException,
353                 ::com::sun::star::uno::Exception,
354                 ::com::sun::star::uno::RuntimeException );
355 
356     virtual sal_Int32 SAL_CALL getMapUnit( sal_Int64 nAspect )
357         throw ( ::com::sun::star::uno::Exception,
358                 ::com::sun::star::uno::RuntimeException);
359 
360 // XEmbedPersist
361 
362     virtual void SAL_CALL setPersistentEntry(
363                     const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
364                     const ::rtl::OUString& sEntName,
365                     sal_Int32 nEntryConnectionMode,
366                     const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArguments,
367                     const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lObjArgs )
368         throw ( ::com::sun::star::lang::IllegalArgumentException,
369                 ::com::sun::star::embed::WrongStateException,
370                 ::com::sun::star::io::IOException,
371                 ::com::sun::star::uno::Exception,
372                 ::com::sun::star::uno::RuntimeException );
373 
374     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 )
375         throw ( ::com::sun::star::lang::IllegalArgumentException,
376                 ::com::sun::star::embed::WrongStateException,
377                 ::com::sun::star::io::IOException,
378                 ::com::sun::star::uno::Exception,
379                 ::com::sun::star::uno::RuntimeException );
380 
381     virtual void SAL_CALL storeAsEntry(
382                 const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
383                 const ::rtl::OUString& sEntName,
384                 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArguments,
385                 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lObjArgs )
386         throw ( ::com::sun::star::lang::IllegalArgumentException,
387                 ::com::sun::star::embed::WrongStateException,
388                 ::com::sun::star::io::IOException,
389                 ::com::sun::star::uno::Exception,
390                 ::com::sun::star::uno::RuntimeException );
391 
392     virtual void SAL_CALL saveCompleted( sal_Bool bUseNew )
393         throw ( ::com::sun::star::embed::WrongStateException,
394                 ::com::sun::star::uno::Exception,
395                 ::com::sun::star::uno::RuntimeException );
396 
397     virtual sal_Bool SAL_CALL hasEntry()
398         throw ( ::com::sun::star::embed::WrongStateException,
399                 ::com::sun::star::uno::RuntimeException );
400 
401     virtual ::rtl::OUString SAL_CALL getEntryName()
402         throw ( ::com::sun::star::embed::WrongStateException,
403                 ::com::sun::star::uno::RuntimeException );
404 
405 // XLinkageSupport
406 
407     virtual void SAL_CALL breakLink( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
408                                      const ::rtl::OUString& sEntName )
409         throw ( ::com::sun::star::lang::IllegalArgumentException,
410                 ::com::sun::star::embed::WrongStateException,
411                 ::com::sun::star::io::IOException,
412                 ::com::sun::star::uno::Exception,
413                 ::com::sun::star::uno::RuntimeException );
414 
415     virtual sal_Bool SAL_CALL isLink()
416         throw ( ::com::sun::star::embed::WrongStateException,
417                 ::com::sun::star::uno::RuntimeException);
418 
419     virtual ::rtl::OUString SAL_CALL getLinkURL()
420         throw ( ::com::sun::star::embed::WrongStateException,
421                 ::com::sun::star::uno::Exception,
422                 ::com::sun::star::uno::RuntimeException);
423 
424 
425 // XCommonEmbedPersist
426 
427     virtual void SAL_CALL storeOwn()
428         throw ( ::com::sun::star::embed::WrongStateException,
429                 ::com::sun::star::io::IOException,
430                 ::com::sun::star::uno::Exception,
431                 ::com::sun::star::uno::RuntimeException );
432 
433     virtual sal_Bool SAL_CALL isReadonly()
434         throw ( ::com::sun::star::embed::WrongStateException,
435                 ::com::sun::star::uno::RuntimeException );
436 
437     virtual void SAL_CALL reload(
438                 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArguments,
439                 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lObjArgs )
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 
447 // XInplaceObject
448 
449     virtual void SAL_CALL setObjectRectangles( const ::com::sun::star::awt::Rectangle& aPosRect,
450                                           const ::com::sun::star::awt::Rectangle& aClipRect )
451         throw ( ::com::sun::star::embed::WrongStateException,
452                 ::com::sun::star::uno::Exception,
453                 ::com::sun::star::uno::RuntimeException );
454 
455     virtual void SAL_CALL enableModeless( sal_Bool bEnable )
456         throw ( ::com::sun::star::embed::WrongStateException,
457                 ::com::sun::star::uno::Exception,
458                 ::com::sun::star::uno::RuntimeException );
459 
460     virtual void SAL_CALL translateAccelerators(
461                     const ::com::sun::star::uno::Sequence< ::com::sun::star::awt::KeyEvent >& aKeys )
462         throw ( ::com::sun::star::embed::WrongStateException,
463                 ::com::sun::star::uno::RuntimeException );
464 
465 // XClassifiedObject
466 
467     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getClassID()
468         throw ( ::com::sun::star::uno::RuntimeException );
469 
470     virtual ::rtl::OUString SAL_CALL getClassName()
471         throw ( ::com::sun::star::uno::RuntimeException );
472 
473     virtual void SAL_CALL setClassInfo(
474                 const ::com::sun::star::uno::Sequence< sal_Int8 >& aClassID, const ::rtl::OUString& aClassName )
475         throw ( ::com::sun::star::lang::NoSupportException,
476                 ::com::sun::star::uno::RuntimeException );
477 
478 
479 // XComponentSupplier
480 
481     virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseable > SAL_CALL getComponent()
482         throw ( ::com::sun::star::uno::RuntimeException );
483 
484 // XStateChangeBroadcaster
485     virtual void SAL_CALL addStateChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStateChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
486     virtual void SAL_CALL removeStateChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStateChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
487 
488 // XCloseable
489 
490     virtual void SAL_CALL close( sal_Bool DeliverOwnership )
491         throw ( ::com::sun::star::util::CloseVetoException,
492                 ::com::sun::star::uno::RuntimeException );
493 
494     virtual void SAL_CALL addCloseListener(
495                 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseListener >& Listener )
496         throw ( ::com::sun::star::uno::RuntimeException );
497 
498     virtual void SAL_CALL removeCloseListener(
499                 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseListener >& Listener )
500         throw ( ::com::sun::star::uno::RuntimeException );
501 
502 // XEventBroadcaster
503     virtual void SAL_CALL addEventListener(
504                 const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventListener >& Listener )
505         throw ( ::com::sun::star::uno::RuntimeException );
506 
507     virtual void SAL_CALL removeEventListener(
508                 const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventListener >& Listener )
509         throw ( ::com::sun::star::uno::RuntimeException );
510 
511     // XChild
512     virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent(  ) throw (::com::sun::star::uno::RuntimeException);
513     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);
514 
515     // XDefaultSizeTransmitter
516     //#i103460# charts do not necessaryly have an own size within ODF files, in this case they need to use the size settings from the surrounding frame, which is made available with this method
517     virtual void SAL_CALL setDefaultSize( const ::com::sun::star::awt::Size& rSize_100TH_MM ) throw (::com::sun::star::uno::RuntimeException);
518 };
519 
520 #endif
521 
522