diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-23 13:48:24 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-23 13:48:24 +0000 |
commit | 600b7c043d4e082432e5c63f74bdb5948b9767bc (patch) | |
tree | ac8be4b7b3767f2a8d0a65d43a17e4b12590e217 /svx | |
parent | 726701315f0f5a0a411975c745ef0764f73eef3e (diff) |
CWS-TOOLING: integrate CWS mav50_DEV300
2009-04-16 17:54:43 +0200 mav r270901 : #i100993# let the links stay in loaded state if possible
2009-04-16 17:50:44 +0200 mav r270900 : #i100993# let the links stay in loaded state if possible
2009-04-16 17:46:45 +0200 mav r270899 : #i100993# let the links stay in loaded state if possible
2009-04-16 17:44:47 +0200 mav r270898 : #i100993# let the links stay in loaded state if possible#
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdoole2.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index e45f6438a4d3..595b31b5207e 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -415,7 +415,14 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::activatingUI() if ( xObject->getStatus( pObj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE ) xObject->changeState( embed::EmbedStates::INPLACE_ACTIVE ); else - xObject->changeState( embed::EmbedStates::RUNNING ); + { + // the links should not stay in running state for long time because of locking + uno::Reference< embed::XLinkageSupport > xLink( xObject, uno::UNO_QUERY ); + if ( xLink.is() && xLink->isLink() ) + xObject->changeState( embed::EmbedStates::LOADED ); + else + xObject->changeState( embed::EmbedStates::RUNNING ); + } } catch (com::sun::star::uno::Exception& ) {} @@ -650,9 +657,7 @@ void SdrEmbedObjectLink::DataChanged( const String& /*rMimeType*/, try { sal_Int32 nState = xObject->getCurrentState(); - if ( nState == embed::EmbedStates::LOADED ) - xObject->changeState( embed::EmbedStates::RUNNING ); - else + if ( nState != embed::EmbedStates::LOADED ) { // in some cases the linked file probably is not locked so it could be changed xObject->changeState( embed::EmbedStates::LOADED ); |