[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - embeddedobj/source

Marco Cecchetti mrcekets at gmail.com
Tue Feb 27 11:00:03 UTC 2018


 embeddedobj/source/commonembedding/embedobj.cxx |   36 ++++++++++++++----------
 1 file changed, 21 insertions(+), 15 deletions(-)

New commits:
commit 9ee412c85066ccb48face646c80f4b6e2e34902d
Author: Marco Cecchetti <mrcekets at gmail.com>
Date:   Tue Feb 27 11:59:15 2018 +0100

    Revert "Revert "lok - chart - state switch issue triggers an OLE general error msg box""
    
    So the reverted commit was not the cause of the seg-fault.
    
    This reverts commit edfafb52d98b99ca04d504d8d00ca9890f0e65d9.
    
    Change-Id: Id8091367bc1c868be7c68d9425a099bb17300842
    Reviewed-on: https://gerrit.libreoffice.org/50418
    Reviewed-by: Marco Cecchetti <mrcekets at gmail.com>
    Tested-by: Marco Cecchetti <mrcekets at gmail.com>

diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx
index 5142871421ff..32974547a50c 100644
--- a/embeddedobj/source/commonembedding/embedobj.cxx
+++ b/embeddedobj/source/commonembedding/embedobj.cxx
@@ -39,6 +39,7 @@
 #include <com/sun/star/embed/EmbedMisc.hpp>
 #include <comphelper/processfactory.hxx>
 #include <cppuhelper/interfacecontainer.hxx>
+#include <comphelper/lok.hxx>
 
 #include <vcl/svapp.hxx>
 
@@ -320,26 +321,31 @@ 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_pDocHolder->ShowUI( xContainerLM, xContainerDP, aModuleName );
-                    xContainerLM->unlock();
-
-                    if ( bOk )
-                    {
-                        m_nObjectState = nNextState;
-                        m_pDocHolder->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_pDocHolder->ShowUI( xContainerLM, xContainerDP, aModuleName );
+                        xContainerLM->unlock();
+
+                        if ( bOk )
+                        {
+                            m_nObjectState = nNextState;
+                            m_pDocHolder->ResizeHatchWindow();
+                        }
+                        else
+                        {
+                            xInplaceClient->deactivatedUI();
+                            throw embed::WrongStateException(); //TODO: can't activate UI
+                        }
                     }
                 }
                 else
+                {
                     throw embed::WrongStateException(); //TODO: can't activate UI
+                }
             }
         }
         else


More information about the Libreoffice-commits mailing list