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