diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2010-12-03 12:58:20 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2010-12-03 12:58:20 +0100 |
commit | c64ee3cc7ea4251b18ed75c3ace45e4c58eb1e5b (patch) | |
tree | 2523602c58bbcc58b1ec28ca59a29a38ca988891 /embeddedobj | |
parent | d5a671a4b0a5fd7c33f7faf77c30790777ccf800 (diff) | |
parent | d63890542329e089e5a596622276f290c4f97e8b (diff) |
undoapi: merge after pulling selected changeset from CWS fwk162
Diffstat (limited to 'embeddedobj')
-rw-r--r-- | embeddedobj/source/commonembedding/embedobj.cxx | 20 | ||||
-rw-r--r-- | embeddedobj/source/commonembedding/miscobj.cxx | 14 |
2 files changed, 16 insertions, 18 deletions
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx index ae5c0043153e..a459c0ad9bd3 100644 --- a/embeddedobj/source/commonembedding/embedobj.cxx +++ b/embeddedobj/source/commonembedding/embedobj.cxx @@ -165,7 +165,7 @@ void OCommonEmbeddedObject::StateChangeNotification_Impl( sal_Bool bBeforeChange void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) { // TODO: may be needs interaction handler to detect wherether the object state - // can be changed even after errors + // can be changed even after errors if ( m_nObjectState == embed::EmbedStates::LOADED ) { @@ -238,7 +238,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) throw embed::WrongStateException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "client site not set, yet" ) ), *this - ); + ); uno::Reference< embed::XInplaceClient > xInplaceClient( m_xClientSite, uno::UNO_QUERY ); if ( xInplaceClient.is() && xInplaceClient->canInplaceActivate() ) @@ -488,14 +488,19 @@ void SAL_CALL OCommonEmbeddedObject::changeState( sal_Int32 nNewState ) { if ( nOldState != m_nObjectState ) // notify listeners that the object has changed the state - StateChangeNotification_Impl( sal_False, nOldState, m_nObjectState ,aGuard); + StateChangeNotification_Impl( sal_False, nOldState, m_nObjectState, aGuard ); throw; } } // notify listeners that the object has changed the state - StateChangeNotification_Impl( sal_False, nOldState, nNewState,aGuard ); + StateChangeNotification_Impl( sal_False, nOldState, nNewState, aGuard ); + + // let the object window be shown + if ( nNewState == embed::EmbedStates::UI_ACTIVE || nNewState == embed::EmbedStates::INPLACE_ACTIVE ) + PostEvent_Impl( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnVisAreaChanged" ) ), + uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } } @@ -504,7 +509,6 @@ uno::Sequence< sal_Int32 > SAL_CALL OCommonEmbeddedObject::getReachableStates() throw ( embed::WrongStateException, uno::RuntimeException ) { - ::osl::MutexGuard aGuard( m_aMutex ); if ( m_bDisposed ) throw lang::DisposedException(); // TODO @@ -520,7 +524,6 @@ sal_Int32 SAL_CALL OCommonEmbeddedObject::getCurrentState() throw ( embed::WrongStateException, uno::RuntimeException ) { - ::osl::MutexGuard aGuard( m_aMutex ); if ( m_bDisposed ) throw lang::DisposedException(); // TODO @@ -541,7 +544,7 @@ void SAL_CALL OCommonEmbeddedObject::doVerb( sal_Int32 nVerbID ) { RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OCommonEmbeddedObject::doVerb" ); - ::osl::ClearableMutexGuard aGuard( m_aMutex ); + ::osl::ResettableMutexGuard aGuard( m_aMutex ); if ( m_bDisposed ) throw lang::DisposedException(); // TODO @@ -575,7 +578,6 @@ uno::Sequence< embed::VerbDescriptor > SAL_CALL OCommonEmbeddedObject::getSuppor throw ( embed::WrongStateException, uno::RuntimeException ) { - ::osl::MutexGuard aGuard( m_aMutex ); if ( m_bDisposed ) throw lang::DisposedException(); // TODO @@ -612,7 +614,6 @@ uno::Reference< embed::XEmbeddedClient > SAL_CALL OCommonEmbeddedObject::getClie throw ( embed::WrongStateException, uno::RuntimeException ) { - ::osl::MutexGuard aGuard( m_aMutex ); if ( m_bDisposed ) throw lang::DisposedException(); // TODO @@ -665,7 +666,6 @@ sal_Int64 SAL_CALL OCommonEmbeddedObject::getStatus( sal_Int64 ) throw ( embed::WrongStateException, uno::RuntimeException ) { - ::osl::MutexGuard aGuard( m_aMutex ); if ( m_bDisposed ) throw lang::DisposedException(); // TODO diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx index 97cc5d2d499b..9aa7df919e3e 100644 --- a/embeddedobj/source/commonembedding/miscobj.cxx +++ b/embeddedobj/source/commonembedding/miscobj.cxx @@ -333,7 +333,7 @@ void OCommonEmbeddedObject::PostEvent_Impl( const ::rtl::OUString& aEventName, aEvent.Source = uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ); // For now all the events are sent as object events // aEvent.Source = ( xSource.is() ? xSource - // : uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ) ); + // : uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ) ); ::cppu::OInterfaceIteratorHelper aIt( *pIC ); while( aIt.hasMoreElements() ) { @@ -467,9 +467,8 @@ uno::Sequence< sal_Int8 > SAL_CALL OCommonEmbeddedObject::getImplementationId() uno::Sequence< sal_Int8 > SAL_CALL OCommonEmbeddedObject::getClassID() throw ( uno::RuntimeException ) { - ::osl::MutexGuard aGuard( m_aMutex ); if ( m_bDisposed ) - throw lang::DisposedException(); // TODO + throw lang::DisposedException(); return m_aClassID; } @@ -478,9 +477,8 @@ uno::Sequence< sal_Int8 > SAL_CALL OCommonEmbeddedObject::getClassID() ::rtl::OUString SAL_CALL OCommonEmbeddedObject::getClassName() throw ( uno::RuntimeException ) { - ::osl::MutexGuard aGuard( m_aMutex ); if ( m_bDisposed ) - throw lang::DisposedException(); // TODO + throw lang::DisposedException(); return m_aClassName; } @@ -512,9 +510,9 @@ uno::Reference< util::XCloseable > SAL_CALL OCommonEmbeddedObject::getComponent( } // if ( m_bWaitSaveCompleted ) - // throw embed::WrongStateException( - // ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), - // uno::Reference< uno::XInterface >( reinterpret_cast< ::cppu::OWeakObject* >(this) ) ); + // throw embed::WrongStateException( + // ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + // uno::Reference< uno::XInterface >( reinterpret_cast< ::cppu::OWeakObject* >(this) ) ); return uno::Reference< util::XCloseable >( m_pDocHolder->GetComponent(), uno::UNO_QUERY ); } |