Version 4.2.0.1, tag libreoffice-4.2.0.1
[LibreOffice.git] / embeddedobj / source / msole / olemisc.cxx
blobd14733a85530f86570b08e05ed25abafc8d34f56
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <com/sun/star/embed/EmbedUpdateModes.hpp>
21 #include <com/sun/star/embed/EmbedStates.hpp>
22 #include <com/sun/star/lang/XComponent.hpp>
23 #include <com/sun/star/lang/DisposedException.hpp>
25 #include <cppuhelper/interfacecontainer.h>
27 #include <oleembobj.hxx>
28 #include <olecomponent.hxx>
30 #include "ownview.hxx"
32 using namespace ::com::sun::star;
34 sal_Bool KillFile_Impl( const OUString& aURL, const uno::Reference< lang::XMultiServiceFactory >& xFactory );
37 //------------------------------------------------------
38 OleEmbeddedObject::OleEmbeddedObject( const uno::Reference< lang::XMultiServiceFactory >& xFactory,
39 const uno::Sequence< sal_Int8 >& aClassID,
40 const OUString& aClassName )
41 : m_pOleComponent( NULL )
42 , m_pInterfaceContainer( NULL )
43 , m_bReadOnly( sal_False )
44 , m_bDisposed( sal_False )
45 , m_nObjectState( -1 )
46 , m_nTargetState( -1 )
47 , m_nUpdateMode ( embed::EmbedUpdateModes::ALWAYS_UPDATE )
48 , m_xFactory( xFactory )
49 , m_aClassID( aClassID )
50 , m_aClassName( aClassName )
51 , m_bWaitSaveCompleted( sal_False )
52 , m_bNewVisReplInStream( sal_True )
53 , m_bStoreLoaded( sal_False )
54 , m_bVisReplInitialized( sal_False )
55 , m_bVisReplInStream( sal_False )
56 , m_bStoreVisRepl( sal_False )
57 , m_bIsLink( sal_False )
58 , m_bHasCachedSize( sal_False )
59 , m_nCachedAspect( 0 )
60 , m_bHasSizeToSet( sal_False )
61 , m_nAspectToSet( 0 )
62 , m_bGotStatus( sal_False )
63 , m_nStatus( 0 )
64 , m_nStatusAspect( 0 )
65 , m_pOwnView( NULL )
66 , m_bFromClipboard( sal_False )
67 , m_bTriedConversion( sal_False )
71 //------------------------------------------------------
72 // In case of loading from persistent entry the classID of the object
73 // will be retrieved from the entry, during construction it is unknown
74 OleEmbeddedObject::OleEmbeddedObject( const uno::Reference< lang::XMultiServiceFactory >& xFactory, sal_Bool bLink )
75 : m_pOleComponent( NULL )
76 , m_pInterfaceContainer( NULL )
77 , m_bReadOnly( sal_False )
78 , m_bDisposed( sal_False )
79 , m_nObjectState( -1 )
80 , m_nTargetState( -1 )
81 , m_nUpdateMode( embed::EmbedUpdateModes::ALWAYS_UPDATE )
82 , m_xFactory( xFactory )
83 , m_bWaitSaveCompleted( sal_False )
84 , m_bNewVisReplInStream( sal_True )
85 , m_bStoreLoaded( sal_False )
86 , m_bVisReplInitialized( sal_False )
87 , m_bVisReplInStream( sal_False )
88 , m_bStoreVisRepl( sal_False )
89 , m_bIsLink( bLink )
90 , m_bHasCachedSize( sal_False )
91 , m_nCachedAspect( 0 )
92 , m_bHasSizeToSet( sal_False )
93 , m_nAspectToSet( 0 )
94 , m_bGotStatus( sal_False )
95 , m_nStatus( 0 )
96 , m_nStatusAspect( 0 )
97 , m_pOwnView( NULL )
98 , m_bFromClipboard( sal_False )
99 , m_bTriedConversion( sal_False )
102 #ifdef WNT
103 //------------------------------------------------------
104 // this constructor let object be initialized from clipboard
105 OleEmbeddedObject::OleEmbeddedObject( const uno::Reference< lang::XMultiServiceFactory >& xFactory )
106 : m_pOleComponent( NULL )
107 , m_pInterfaceContainer( NULL )
108 , m_bReadOnly( sal_False )
109 , m_bDisposed( sal_False )
110 , m_nObjectState( -1 )
111 , m_nTargetState( -1 )
112 , m_nUpdateMode( embed::EmbedUpdateModes::ALWAYS_UPDATE )
113 , m_xFactory( xFactory )
114 , m_bWaitSaveCompleted( sal_False )
115 , m_bNewVisReplInStream( sal_True )
116 , m_bStoreLoaded( sal_False )
117 , m_bVisReplInitialized( sal_False )
118 , m_bVisReplInStream( sal_False )
119 , m_bStoreVisRepl( sal_False )
120 , m_bIsLink( sal_False )
121 , m_bHasCachedSize( sal_False )
122 , m_nCachedAspect( 0 )
123 , m_bHasSizeToSet( sal_False )
124 , m_nAspectToSet( 0 )
125 , m_bGotStatus( sal_False )
126 , m_nStatus( 0 )
127 , m_nStatusAspect( 0 )
128 , m_pOwnView( NULL )
129 , m_bFromClipboard( sal_True )
130 , m_bTriedConversion( sal_False )
133 #endif
134 //------------------------------------------------------
135 OleEmbeddedObject::~OleEmbeddedObject()
137 OSL_ENSURE( !m_pInterfaceContainer && !m_pOleComponent && !m_xObjectStream.is(),
138 "The object is not closed! DISASTER is possible!" );
140 if ( m_pOleComponent || m_pInterfaceContainer || m_xObjectStream.is() )
142 // the component must be cleaned during closing
143 m_refCount++; // to avoid crash
144 try {
145 Dispose();
146 } catch( const uno::Exception& ) {}
149 if ( !m_aTempURL.isEmpty() )
150 KillFile_Impl( m_aTempURL, m_xFactory );
152 if ( !m_aTempDumpURL.isEmpty() )
153 KillFile_Impl( m_aTempDumpURL, m_xFactory );
156 //------------------------------------------------------
157 void OleEmbeddedObject::MakeEventListenerNotification_Impl( const OUString& aEventName )
159 if ( m_pInterfaceContainer )
161 ::cppu::OInterfaceContainerHelper* pContainer =
162 m_pInterfaceContainer->getContainer(
163 ::getCppuType( ( const uno::Reference< document::XEventListener >*) NULL ) );
164 if ( pContainer != NULL )
166 document::EventObject aEvent( static_cast< ::cppu::OWeakObject* >( this ), aEventName );
167 ::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
168 while (pIterator.hasMoreElements())
172 ((document::XEventListener*)pIterator.next())->notifyEvent( aEvent );
174 catch( const uno::RuntimeException& )
181 #ifdef WNT
182 //----------------------------------------------
183 void OleEmbeddedObject::StateChangeNotification_Impl( sal_Bool bBeforeChange, sal_Int32 nOldState, sal_Int32 nNewState )
185 if ( m_pInterfaceContainer )
187 ::cppu::OInterfaceContainerHelper* pContainer = m_pInterfaceContainer->getContainer(
188 ::getCppuType( ( const uno::Reference< embed::XStateChangeListener >*) NULL ) );
189 if ( pContainer != NULL )
191 lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >( this ) );
192 ::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
194 while (pIterator.hasMoreElements())
196 if ( bBeforeChange )
200 ((embed::XStateChangeListener*)pIterator.next())->changingState( aSource, nOldState, nNewState );
202 catch( const uno::Exception& )
204 // even if the listener complains ignore it for now
207 else
211 ((embed::XStateChangeListener*)pIterator.next())->stateChanged( aSource, nOldState, nNewState );
213 catch( const uno::Exception& )
215 // if anything happened it is problem of listener, ignore it
222 #endif
223 //------------------------------------------------------
224 void OleEmbeddedObject::GetRidOfComponent()
226 #ifdef WNT
227 if ( m_pOleComponent )
229 if ( m_nObjectState != -1 && m_nObjectState != embed::EmbedStates::LOADED )
230 SaveObject_Impl();
232 m_pOleComponent->removeCloseListener( m_xClosePreventer );
235 m_pOleComponent->close( sal_False );
237 catch( const uno::Exception& )
239 // TODO: there should be a special listener to wait for component closing
240 // and to notify object, may be object itself can be such a listener
241 m_pOleComponent->addCloseListener( m_xClosePreventer );
242 throw;
245 m_pOleComponent->disconnectEmbeddedObject();
246 m_pOleComponent->release();
247 m_pOleComponent = NULL;
249 #endif
252 //------------------------------------------------------
253 void OleEmbeddedObject::Dispose()
255 if ( m_pInterfaceContainer )
257 lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >( this ) );
258 m_pInterfaceContainer->disposeAndClear( aSource );
259 delete m_pInterfaceContainer;
260 m_pInterfaceContainer = NULL;
263 if ( m_pOwnView )
265 m_pOwnView->Close();
266 m_pOwnView->release();
267 m_pOwnView = NULL;
270 if ( m_pOleComponent )
271 try {
272 GetRidOfComponent();
273 } catch( const uno::Exception& )
275 m_bDisposed = true;
276 throw; // TODO: there should be a special listener that will close object when
277 // component is finally closed
280 if ( m_xObjectStream.is() )
282 uno::Reference< lang::XComponent > xComp( m_xObjectStream, uno::UNO_QUERY );
283 OSL_ENSURE( xComp.is(), "Storage stream doesn't support XComponent!\n" );
285 if ( xComp.is() )
287 try {
288 xComp->dispose();
289 } catch( const uno::Exception& ) {}
291 m_xObjectStream = uno::Reference< io::XStream >();
294 m_xParentStorage = uno::Reference< embed::XStorage >();
296 m_bDisposed = true;
299 //------------------------------------------------------
300 uno::Sequence< sal_Int8 > SAL_CALL OleEmbeddedObject::getClassID()
301 throw ( uno::RuntimeException )
303 // begin wrapping related part ====================
304 uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject;
305 if ( xWrappedObject.is() )
307 // the object was converted to OOo embedded object, the current implementation is now only a wrapper
308 return xWrappedObject->getClassID();
310 // end wrapping related part ====================
312 ::osl::MutexGuard aGuard( m_aMutex );
313 if ( m_bDisposed )
314 throw lang::DisposedException(); // TODO
316 return m_aClassID;
319 //------------------------------------------------------
320 OUString SAL_CALL OleEmbeddedObject::getClassName()
321 throw ( uno::RuntimeException )
323 // begin wrapping related part ====================
324 uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject;
325 if ( xWrappedObject.is() )
327 // the object was converted to OOo embedded object, the current implementation is now only a wrapper
328 return xWrappedObject->getClassName();
330 // end wrapping related part ====================
332 ::osl::MutexGuard aGuard( m_aMutex );
333 if ( m_bDisposed )
334 throw lang::DisposedException(); // TODO
336 return m_aClassName;
339 //------------------------------------------------------
340 void SAL_CALL OleEmbeddedObject::setClassInfo(
341 const uno::Sequence< sal_Int8 >& aClassID, const OUString& aClassName )
342 throw ( lang::NoSupportException,
343 uno::RuntimeException )
345 // begin wrapping related part ====================
346 uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject;
347 if ( xWrappedObject.is() )
349 // the object was converted to OOo embedded object, the current implementation is now only a wrapper
350 xWrappedObject->setClassInfo( aClassID, aClassName );
351 return;
353 // end wrapping related part ====================
355 // the object class info can not be changed explicitly
356 throw lang::NoSupportException(); //TODO:
359 //------------------------------------------------------
360 uno::Reference< util::XCloseable > SAL_CALL OleEmbeddedObject::getComponent()
361 throw ( uno::RuntimeException )
363 // begin wrapping related part ====================
364 uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject;
365 if ( xWrappedObject.is() )
367 // the object was converted to OOo embedded object, the current implementation is now only a wrapper
368 return xWrappedObject->getComponent();
370 // end wrapping related part ====================
372 ::osl::MutexGuard aGuard( m_aMutex );
373 if ( m_bDisposed )
374 throw lang::DisposedException(); // TODO
376 if ( m_nObjectState == -1 ) // || m_nObjectState == embed::EmbedStates::LOADED )
378 // the object is still not running
379 throw embed::WrongStateException( OUString( "The object is not loaded!\n" ),
380 uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
383 if ( !m_pOleComponent )
385 // TODO/LATER: Is it correct???
386 return uno::Reference< util::XCloseable >();
387 // throw uno::RuntimeException(); // TODO
390 return uno::Reference< util::XCloseable >( static_cast< ::cppu::OWeakObject* >( m_pOleComponent ), uno::UNO_QUERY );
393 //----------------------------------------------
394 void SAL_CALL OleEmbeddedObject::addStateChangeListener( const uno::Reference< embed::XStateChangeListener >& xListener )
395 throw ( uno::RuntimeException )
397 // begin wrapping related part ====================
398 uno::Reference< embed::XStateChangeBroadcaster > xWrappedObject( m_xWrappedObject, uno::UNO_QUERY );
399 if ( xWrappedObject.is() )
401 // the object was converted to OOo embedded object, the current implementation is now only a wrapper
402 xWrappedObject->addStateChangeListener( xListener );
403 return;
405 // end wrapping related part ====================
407 ::osl::MutexGuard aGuard( m_aMutex );
408 if ( m_bDisposed )
409 throw lang::DisposedException(); // TODO
411 if ( !m_pInterfaceContainer )
412 m_pInterfaceContainer = new ::cppu::OMultiTypeInterfaceContainerHelper( m_aMutex );
414 m_pInterfaceContainer->addInterface( ::getCppuType( (const uno::Reference< embed::XStateChangeListener >*)0 ),
415 xListener );
418 //----------------------------------------------
419 void SAL_CALL OleEmbeddedObject::removeStateChangeListener(
420 const uno::Reference< embed::XStateChangeListener >& xListener )
421 throw (uno::RuntimeException)
423 // begin wrapping related part ====================
424 uno::Reference< embed::XStateChangeBroadcaster > xWrappedObject( m_xWrappedObject, uno::UNO_QUERY );
425 if ( xWrappedObject.is() )
427 // the object was converted to OOo embedded object, the current implementation is now only a wrapper
428 xWrappedObject->removeStateChangeListener( xListener );
429 return;
431 // end wrapping related part ====================
433 ::osl::MutexGuard aGuard( m_aMutex );
434 if ( m_pInterfaceContainer )
435 m_pInterfaceContainer->removeInterface( ::getCppuType( (const uno::Reference< embed::XStateChangeListener >*)0 ),
436 xListener );
440 //----------------------------------------------
441 void SAL_CALL OleEmbeddedObject::close( sal_Bool bDeliverOwnership )
442 throw ( util::CloseVetoException,
443 uno::RuntimeException )
445 // begin wrapping related part ====================
446 uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject;
447 if ( xWrappedObject.is() )
449 // the object was converted to OOo embedded object, the current implementation is now only a wrapper
450 xWrappedObject->close( bDeliverOwnership );
451 return;
453 // end wrapping related part ====================
455 ::osl::MutexGuard aGuard( m_aMutex );
456 if ( m_bDisposed )
457 throw lang::DisposedException(); // TODO
459 uno::Reference< uno::XInterface > xSelfHold( static_cast< ::cppu::OWeakObject* >( this ) );
460 lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >( this ) );
462 if ( m_pInterfaceContainer )
464 ::cppu::OInterfaceContainerHelper* pContainer =
465 m_pInterfaceContainer->getContainer( ::getCppuType( ( const uno::Reference< util::XCloseListener >*) NULL ) );
466 if ( pContainer != NULL )
468 ::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
469 while (pIterator.hasMoreElements())
473 ((util::XCloseListener*)pIterator.next())->queryClosing( aSource, bDeliverOwnership );
475 catch( const uno::RuntimeException& )
477 pIterator.remove();
482 pContainer = m_pInterfaceContainer->getContainer(
483 ::getCppuType( ( const uno::Reference< util::XCloseListener >*) NULL ) );
484 if ( pContainer != NULL )
486 ::cppu::OInterfaceIteratorHelper pCloseIterator(*pContainer);
487 while (pCloseIterator.hasMoreElements())
491 ((util::XCloseListener*)pCloseIterator.next())->notifyClosing( aSource );
493 catch( const uno::RuntimeException& )
495 pCloseIterator.remove();
501 Dispose();
504 //----------------------------------------------
505 void SAL_CALL OleEmbeddedObject::addCloseListener( const uno::Reference< util::XCloseListener >& xListener )
506 throw ( uno::RuntimeException )
508 // begin wrapping related part ====================
509 uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject;
510 if ( xWrappedObject.is() )
512 // the object was converted to OOo embedded object, the current implementation is now only a wrapper
513 xWrappedObject->addCloseListener( xListener );
514 return;
516 // end wrapping related part ====================
518 ::osl::MutexGuard aGuard( m_aMutex );
519 if ( m_bDisposed )
520 throw lang::DisposedException(); // TODO
522 if ( !m_pInterfaceContainer )
523 m_pInterfaceContainer = new ::cppu::OMultiTypeInterfaceContainerHelper( m_aMutex );
525 m_pInterfaceContainer->addInterface( ::getCppuType( (const uno::Reference< util::XCloseListener >*)0 ), xListener );
528 //----------------------------------------------
529 void SAL_CALL OleEmbeddedObject::removeCloseListener( const uno::Reference< util::XCloseListener >& xListener )
530 throw (uno::RuntimeException)
532 // begin wrapping related part ====================
533 uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject;
534 if ( xWrappedObject.is() )
536 // the object was converted to OOo embedded object, the current implementation is now only a wrapper
537 xWrappedObject->removeCloseListener( xListener );
538 return;
540 // end wrapping related part ====================
542 ::osl::MutexGuard aGuard( m_aMutex );
543 if ( m_bDisposed )
544 throw lang::DisposedException(); // TODO
546 if ( m_pInterfaceContainer )
547 m_pInterfaceContainer->removeInterface( ::getCppuType( (const uno::Reference< util::XCloseListener >*)0 ),
548 xListener );
551 //------------------------------------------------------
552 void SAL_CALL OleEmbeddedObject::addEventListener( const uno::Reference< document::XEventListener >& xListener )
553 throw ( uno::RuntimeException )
555 // begin wrapping related part ====================
556 uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject;
557 if ( xWrappedObject.is() )
559 // the object was converted to OOo embedded object, the current implementation is now only a wrapper
560 xWrappedObject->addEventListener( xListener );
561 return;
563 // end wrapping related part ====================
565 ::osl::MutexGuard aGuard( m_aMutex );
566 if ( m_bDisposed )
567 throw lang::DisposedException(); // TODO
569 if ( !m_pInterfaceContainer )
570 m_pInterfaceContainer = new ::cppu::OMultiTypeInterfaceContainerHelper( m_aMutex );
572 m_pInterfaceContainer->addInterface( ::getCppuType( (const uno::Reference< document::XEventListener >*)0 ), xListener );
575 //------------------------------------------------------
576 void SAL_CALL OleEmbeddedObject::removeEventListener(
577 const uno::Reference< document::XEventListener >& xListener )
578 throw ( uno::RuntimeException )
580 // begin wrapping related part ====================
581 uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject;
582 if ( xWrappedObject.is() )
584 // the object was converted to OOo embedded object, the current implementation is now only a wrapper
585 xWrappedObject->removeEventListener( xListener );
586 return;
588 // end wrapping related part ====================
590 ::osl::MutexGuard aGuard( m_aMutex );
591 if ( m_bDisposed )
592 throw lang::DisposedException(); // TODO
594 if ( m_pInterfaceContainer )
595 m_pInterfaceContainer->removeInterface( ::getCppuType( (const uno::Reference< document::XEventListener >*)0 ),
596 xListener );
599 // XInplaceObject ( wrapper related implementation )
600 //------------------------------------------------------
601 void SAL_CALL OleEmbeddedObject::setObjectRectangles( const awt::Rectangle& aPosRect,
602 const awt::Rectangle& aClipRect )
603 throw ( embed::WrongStateException,
604 uno::Exception,
605 uno::RuntimeException )
607 // begin wrapping related part ====================
608 uno::Reference< embed::XInplaceObject > xWrappedObject( m_xWrappedObject, uno::UNO_QUERY );
609 if ( xWrappedObject.is() )
611 // the object was converted to OOo embedded object, the current implementation is now only a wrapper
612 xWrappedObject->setObjectRectangles( aPosRect, aClipRect );
613 return;
615 // end wrapping related part ====================
617 throw embed::WrongStateException();
620 //------------------------------------------------------
621 void SAL_CALL OleEmbeddedObject::enableModeless( sal_Bool bEnable )
622 throw ( embed::WrongStateException,
623 uno::Exception,
624 uno::RuntimeException )
626 // begin wrapping related part ====================
627 uno::Reference< embed::XInplaceObject > xWrappedObject( m_xWrappedObject, uno::UNO_QUERY );
628 if ( xWrappedObject.is() )
630 // the object was converted to OOo embedded object, the current implementation is now only a wrapper
631 xWrappedObject->enableModeless( bEnable );
632 return;
634 // end wrapping related part ====================
636 throw embed::WrongStateException();
639 //------------------------------------------------------
640 void SAL_CALL OleEmbeddedObject::translateAccelerators(
641 const uno::Sequence< awt::KeyEvent >& aKeys )
642 throw ( embed::WrongStateException,
643 uno::RuntimeException )
645 // begin wrapping related part ====================
646 uno::Reference< embed::XInplaceObject > xWrappedObject( m_xWrappedObject, uno::UNO_QUERY );
647 if ( xWrappedObject.is() )
649 // the object was converted to OOo embedded object, the current implementation is now only a wrapper
650 xWrappedObject->translateAccelerators( aKeys );
651 return;
653 // end wrapping related part ====================
657 // XChild
658 //------------------------------------------------------
659 com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL OleEmbeddedObject::getParent() throw (::com::sun::star::uno::RuntimeException)
661 // begin wrapping related part ====================
662 uno::Reference< container::XChild > xWrappedObject( m_xWrappedObject, uno::UNO_QUERY );
663 if ( xWrappedObject.is() )
665 // the object was converted to OOo embedded object, the current implementation is now only a wrapper
666 return xWrappedObject->getParent();
668 // end wrapping related part ====================
670 return m_xParent;
673 //------------------------------------------------------
674 void SAL_CALL OleEmbeddedObject::setParent( const com::sun::star::uno::Reference< com::sun::star::uno::XInterface >& xParent ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException)
676 // begin wrapping related part ====================
677 uno::Reference< container::XChild > xWrappedObject( m_xWrappedObject, uno::UNO_QUERY );
678 if ( xWrappedObject.is() )
680 // the object was converted to OOo embedded object, the current implementation is now only a wrapper
681 xWrappedObject->setParent( xParent );
682 return;
684 // end wrapping related part ====================
686 m_xParent = xParent;
689 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */