undoapi: merge after pulling selected changeset from CWS fwk162

This commit is contained in:
Frank Schoenheit [fs]
2010-12-03 12:58:20 +01:00
2 changed files with 16 additions and 18 deletions

View File

@@ -165,7 +165,7 @@ void OCommonEmbeddedObject::StateChangeNotification_Impl( sal_Bool bBeforeChange
void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
{ {
// TODO: may be needs interaction handler to detect wherether the object state // 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 ) if ( m_nObjectState == embed::EmbedStates::LOADED )
{ {
@@ -238,7 +238,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
throw embed::WrongStateException( throw embed::WrongStateException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "client site not set, yet" ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "client site not set, yet" ) ),
*this *this
); );
uno::Reference< embed::XInplaceClient > xInplaceClient( m_xClientSite, uno::UNO_QUERY ); uno::Reference< embed::XInplaceClient > xInplaceClient( m_xClientSite, uno::UNO_QUERY );
if ( xInplaceClient.is() && xInplaceClient->canInplaceActivate() ) if ( xInplaceClient.is() && xInplaceClient->canInplaceActivate() )
@@ -488,14 +488,19 @@ void SAL_CALL OCommonEmbeddedObject::changeState( sal_Int32 nNewState )
{ {
if ( nOldState != m_nObjectState ) if ( nOldState != m_nObjectState )
// notify listeners that the object has changed the state // 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; throw;
} }
} }
// notify listeners that the object has changed the state // 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, throw ( embed::WrongStateException,
uno::RuntimeException ) uno::RuntimeException )
{ {
::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed ) if ( m_bDisposed )
throw lang::DisposedException(); // TODO throw lang::DisposedException(); // TODO
@@ -520,7 +524,6 @@ sal_Int32 SAL_CALL OCommonEmbeddedObject::getCurrentState()
throw ( embed::WrongStateException, throw ( embed::WrongStateException,
uno::RuntimeException ) uno::RuntimeException )
{ {
::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed ) if ( m_bDisposed )
throw lang::DisposedException(); // TODO throw lang::DisposedException(); // TODO
@@ -541,7 +544,7 @@ void SAL_CALL OCommonEmbeddedObject::doVerb( sal_Int32 nVerbID )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OCommonEmbeddedObject::doVerb" ); RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OCommonEmbeddedObject::doVerb" );
::osl::ClearableMutexGuard aGuard( m_aMutex ); ::osl::ResettableMutexGuard aGuard( m_aMutex );
if ( m_bDisposed ) if ( m_bDisposed )
throw lang::DisposedException(); // TODO throw lang::DisposedException(); // TODO
@@ -575,7 +578,6 @@ uno::Sequence< embed::VerbDescriptor > SAL_CALL OCommonEmbeddedObject::getSuppor
throw ( embed::WrongStateException, throw ( embed::WrongStateException,
uno::RuntimeException ) uno::RuntimeException )
{ {
::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed ) if ( m_bDisposed )
throw lang::DisposedException(); // TODO throw lang::DisposedException(); // TODO
@@ -612,7 +614,6 @@ uno::Reference< embed::XEmbeddedClient > SAL_CALL OCommonEmbeddedObject::getClie
throw ( embed::WrongStateException, throw ( embed::WrongStateException,
uno::RuntimeException ) uno::RuntimeException )
{ {
::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed ) if ( m_bDisposed )
throw lang::DisposedException(); // TODO throw lang::DisposedException(); // TODO
@@ -665,7 +666,6 @@ sal_Int64 SAL_CALL OCommonEmbeddedObject::getStatus( sal_Int64 )
throw ( embed::WrongStateException, throw ( embed::WrongStateException,
uno::RuntimeException ) uno::RuntimeException )
{ {
::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed ) if ( m_bDisposed )
throw lang::DisposedException(); // TODO throw lang::DisposedException(); // TODO

View File

@@ -333,7 +333,7 @@ void OCommonEmbeddedObject::PostEvent_Impl( const ::rtl::OUString& aEventName,
aEvent.Source = uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ); aEvent.Source = uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) );
// For now all the events are sent as object events // For now all the events are sent as object events
// aEvent.Source = ( xSource.is() ? xSource // 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 ); ::cppu::OInterfaceIteratorHelper aIt( *pIC );
while( aIt.hasMoreElements() ) while( aIt.hasMoreElements() )
{ {
@@ -467,9 +467,8 @@ uno::Sequence< sal_Int8 > SAL_CALL OCommonEmbeddedObject::getImplementationId()
uno::Sequence< sal_Int8 > SAL_CALL OCommonEmbeddedObject::getClassID() uno::Sequence< sal_Int8 > SAL_CALL OCommonEmbeddedObject::getClassID()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed ) if ( m_bDisposed )
throw lang::DisposedException(); // TODO throw lang::DisposedException();
return m_aClassID; return m_aClassID;
} }
@@ -478,9 +477,8 @@ uno::Sequence< sal_Int8 > SAL_CALL OCommonEmbeddedObject::getClassID()
::rtl::OUString SAL_CALL OCommonEmbeddedObject::getClassName() ::rtl::OUString SAL_CALL OCommonEmbeddedObject::getClassName()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed ) if ( m_bDisposed )
throw lang::DisposedException(); // TODO throw lang::DisposedException();
return m_aClassName; return m_aClassName;
} }
@@ -512,9 +510,9 @@ uno::Reference< util::XCloseable > SAL_CALL OCommonEmbeddedObject::getComponent(
} }
// if ( m_bWaitSaveCompleted ) // if ( m_bWaitSaveCompleted )
// throw embed::WrongStateException( // throw embed::WrongStateException(
// ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), // ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ),
// uno::Reference< uno::XInterface >( reinterpret_cast< ::cppu::OWeakObject* >(this) ) ); // uno::Reference< uno::XInterface >( reinterpret_cast< ::cppu::OWeakObject* >(this) ) );
return uno::Reference< util::XCloseable >( m_pDocHolder->GetComponent(), uno::UNO_QUERY ); return uno::Reference< util::XCloseable >( m_pDocHolder->GetComponent(), uno::UNO_QUERY );
} }