summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-04-23 13:48:24 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-04-23 13:48:24 +0000
commit600b7c043d4e082432e5c63f74bdb5948b9767bc (patch)
treeac8be4b7b3767f2a8d0a65d43a17e4b12590e217 /sfx2
parent726701315f0f5a0a411975c745ef0764f73eef3e (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 'sfx2')
-rw-r--r--sfx2/source/view/ipclient.cxx19
1 files changed, 17 insertions, 2 deletions
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index 340df5ecd475..a8b57be6714b 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -44,6 +44,7 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/embed/XStateChangeListener.hpp>
#include <com/sun/star/embed/StateChangeInProgressException.hpp>
+#include <com/sun/star/embed/XLinkageSupport.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
#include <com/sun/star/task/XStatusIndicator.hpp>
@@ -1105,7 +1106,14 @@ void SfxInPlaceClient::DeactivateObject()
m_pViewSh->GetWindow()->GrabFocus();
}
else
- m_pImp->m_xObject->changeState( embed::EmbedStates::RUNNING );
+ {
+ // the links should not stay in running state for long time because of locking
+ uno::Reference< embed::XLinkageSupport > xLink( m_pImp->m_xObject, uno::UNO_QUERY );
+ if ( xLink.is() && xLink->isLink() )
+ m_pImp->m_xObject->changeState( embed::EmbedStates::LOADED );
+ else
+ m_pImp->m_xObject->changeState( embed::EmbedStates::RUNNING );
+ }
if ( m_pViewSh )
{
@@ -1130,7 +1138,14 @@ void SfxInPlaceClient::ResetObject()
if ( m_pImp->m_xObject->getStatus( m_pImp->m_nAspect ) & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE )
m_pImp->m_xObject->changeState( embed::EmbedStates::INPLACE_ACTIVE );
else
- m_pImp->m_xObject->changeState( embed::EmbedStates::RUNNING );
+ {
+ // the links should not stay in running state for long time because of locking
+ uno::Reference< embed::XLinkageSupport > xLink( m_pImp->m_xObject, uno::UNO_QUERY );
+ if ( xLink.is() && xLink->isLink() )
+ m_pImp->m_xObject->changeState( embed::EmbedStates::LOADED );
+ else
+ m_pImp->m_xObject->changeState( embed::EmbedStates::RUNNING );
+ }
}
catch (com::sun::star::uno::Exception& )
{}