[Libreoffice-commits] core.git: 2 commits - embeddedobj/source helpcontent2 sfx2/source

LibreOfficiant (via logerrit) logerrit at kemper.freedesktop.org
Thu Aug 29 16:21:35 UTC 2019


 embeddedobj/source/commonembedding/embedobj.cxx |    7 -------
 helpcontent2                                    |    2 +-
 sfx2/source/view/ipclient.cxx                   |   11 +++++++++++
 3 files changed, 12 insertions(+), 8 deletions(-)

New commits:
commit 338a938c8d6dce09d6f1200c542b46c4442cab6b
Author:     LibreOfficiant <LibreOfficiant at sfr.fr>
AuthorDate: Thu Aug 29 16:30:45 2019 +0200
Commit:     Gerrit Code Review <gerrit at gerrit.libreoffice.org>
CommitDate: Thu Aug 29 18:20:53 2019 +0200

    Update git submodules
    
    * Update helpcontent2 from branch 'master'
      - Insert the description of the change.
    
        Change-Id: I2dba6f76867798d59eae1e1f2d7c6c2734dd6eb4
        Reviewed-on: https://gerrit.libreoffice.org/78276
        Reviewed-by: LibreOfficiant <LibreOfficiant at sfr.fr>
        Tested-by: Jenkins
        Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>

diff --git a/helpcontent2 b/helpcontent2
index 7d89551e9111..f2e96cfcbbdd 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 7d89551e9111b6e53332dc0f8e8427f5ae2cc119
+Subproject commit f2e96cfcbbddb24b02f9e6cdff460757a6814254
commit 9083a07e98a32e3ce7af4bd1a817f2b870df0f55
Author:     Muhammet Kara <muhammet.kara at collabora.com>
AuthorDate: Wed Jul 31 21:41:41 2019 +0300
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Thu Aug 29 18:20:46 2019 +0200

    LOK: Proper use of isMobile() on embedded charts
    
    We are moving the isMobile() check to a higher layer,
    to avoid changing a published API method
    
    This is the follow-up of the commit feae0c186e700f6a48c3fad124fb4795ad1a8f83
    
    Change-Id: Ia84baa36d66d5832e00e6466f5206631df0de443
    Reviewed-on: https://gerrit.libreoffice.org/78277
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins

diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx
index ab91814943bb..3370c273dc6a 100644
--- a/embeddedobj/source/commonembedding/embedobj.cxx
+++ b/embeddedobj/source/commonembedding/embedobj.cxx
@@ -227,13 +227,6 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
         }
         else
         {
-            if(comphelper::LibreOfficeKit::isActive() && comphelper::LibreOfficeKit::isMobile(-1))
-            {
-                // Disable embedded object editing (e.g. chart) on mobile
-                if(nNextState == embed::EmbedStates::INPLACE_ACTIVE || nNextState == embed::EmbedStates::UI_ACTIVE)
-                    return;
-            }
-
             if ( nNextState == embed::EmbedStates::INPLACE_ACTIVE )
             {
                 if ( !m_xClientSite.is() )
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index 5bc642d85be1..f2d6d4e78bcd 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -935,6 +935,17 @@ ErrCode SfxInPlaceClient::DoVerb( long nVerb )
                 {
                     m_xImp->m_xObject->setClientSite( m_xImp->m_xClient );
 
+                    // Disable embedded object editing (e.g. chart) on mobile
+                    if ( comphelper::LibreOfficeKit::isActive() && comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView())
+                            && m_xImp->m_xObject->getCurrentState() == embed::EmbedStates::RUNNING )
+                    {
+                        // Also check next state
+                        // Needs to be embed::EmbedStates::UI_ACTIVE or embed::EmbedStates::INPLACE_ACTIVE
+                        // Conversion table is in embeddedobj/source/commonembedding/miscobj.cxx
+                        if (nVerb != embed::EmbedVerbs::MS_OLEVERB_OPEN && nVerb != embed::EmbedVerbs::MS_OLEVERB_HIDE)
+                            return nError;
+                    }
+
                     m_xImp->m_xObject->doVerb( nVerb );
                 }
                 catch ( embed::UnreachableStateException& )


More information about the Libreoffice-commits mailing list