summaryrefslogtreecommitdiff
path: root/embeddedobj
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2018-02-26 13:55:21 +0100
committerMarco Cecchetti <mrcekets@gmail.com>2018-03-02 11:56:40 +0100
commita3646b25ac4c976b891d69759035345630c4f1a2 (patch)
tree091ebcbced6d0823bfe4fbe2baaca338b405d289 /embeddedobj
parent82d38099a3f152590074851fe28401709a10a48f (diff)
lok - chart - state switch issue triggers an OLE general error msg box
Change-Id: I6addd95d1ad3461b6e21328512cbd1301a36cd19 Reviewed-on: https://gerrit.libreoffice.org/50368 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/50482 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Diffstat (limited to 'embeddedobj')
-rw-r--r--embeddedobj/source/commonembedding/embedobj.cxx34
1 files changed, 19 insertions, 15 deletions
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx
index 9aefab91ae79..5357d21a88e6 100644
--- a/embeddedobj/source/commonembedding/embedobj.cxx
+++ b/embeddedobj/source/commonembedding/embedobj.cxx
@@ -40,6 +40,7 @@
#include <com/sun/star/embed/EmbedMisc.hpp>
#include <comphelper/processfactory.hxx>
#include <cppuhelper/interfacecontainer.hxx>
+#include <comphelper/lok.hxx>
#include <vcl/svapp.hxx>
@@ -312,22 +313,25 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
catch( const uno::Exception& )
{}
- // if currently another object is UIactive it will be deactivated; usually this will activate the LM of
- // the container. Locking the LM will prevent flicker.
- xContainerLM->lock();
- xInplaceClient->activatingUI();
- bool bOk = m_xDocHolder->ShowUI( xContainerLM, xContainerDP, aModuleName );
- xContainerLM->unlock();
-
- if ( bOk )
- {
- m_nObjectState = nNextState;
- m_xDocHolder->ResizeHatchWindow();
- }
- else
+ if (!comphelper::LibreOfficeKit::isActive())
{
- xInplaceClient->deactivatedUI();
- throw embed::WrongStateException(); //TODO: can't activate UI
+ // if currently another object is UIactive it will be deactivated; usually this will activate the LM of
+ // the container. Locking the LM will prevent flicker.
+ xContainerLM->lock();
+ xInplaceClient->activatingUI();
+ bool bOk = m_xDocHolder->ShowUI( xContainerLM, xContainerDP, aModuleName );
+ xContainerLM->unlock();
+
+ if ( bOk )
+ {
+ m_nObjectState = nNextState;
+ m_xDocHolder->ResizeHatchWindow();
+ }
+ else
+ {
+ xInplaceClient->deactivatedUI();
+ throw embed::WrongStateException(); //TODO: can't activate UI
+ }
}
}
}