summaryrefslogtreecommitdiff
path: root/sfx2/source/view
diff options
context:
space:
mode:
authorMuhammet Kara <muhammet.kara@collabora.com>2019-07-31 21:41:41 +0300
committerMiklos Vajna <vmiklos@collabora.com>2019-08-29 18:20:46 +0200
commit9083a07e98a32e3ce7af4bd1a817f2b870df0f55 (patch)
tree2bedfe6b45b1edc8992f8835996ad9f148068c99 /sfx2/source/view
parentf8b2a27365b858ab5653edad75fd089b39d016d8 (diff)
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@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sfx2/source/view')
-rw-r--r--sfx2/source/view/ipclient.cxx11
1 files changed, 11 insertions, 0 deletions
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& )