summaryrefslogtreecommitdiff
path: root/sfx2/source/view/ipclient.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-04-21 10:30:40 +0000
committerKurt Zenker <kz@openoffice.org>2009-04-21 10:30:40 +0000
commitdf74d12d35d39e3ed10fb14cfba7025674221f66 (patch)
tree3f6edf096fe87bf163611982224e5b20962a2118 /sfx2/source/view/ipclient.cxx
parent2b2346f0c11bdee3d7987e8c7a488b793a7a6ec2 (diff)
CWS-TOOLING: integrate CWS mav50
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/source/view/ipclient.cxx')
-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 b6e34f22ac..18fe96ebb0 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& )
{}