tdf#127673 lok: On double-click, don't enter the embedded objects in Writer.
There are all sorts of problems when we'd try to edit the embedded
objects, like that that LOK thinks it is a separate view etc., so better
to disable it for now, before we really need to edit embedded objects.
Change-Id: Ie8c0249cb0ca8b25a2ac97c1ccec4a5a62cbb770
Reviewed-on: https://gerrit.libreoffice.org/79555
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 52f30e8..013da21 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -626,6 +626,12 @@
svt::EmbeddedObjectRef& xRef = GetOLEObject();
OSL_ENSURE( xRef.is(), "OLE not found" );
// LOK: we don't want to handle any other embedded objects than
// charts, there are too many problems with eg. embedded spreadsheets
// (like it creates a separate view for the calc sheet)
if (comphelper::LibreOfficeKit::isActive() && !SotExchange::IsChart(xRef->getClassID()))
return;
SfxInPlaceClient* pCli = GetView().FindIPClient( xRef.GetObject(), &GetView().GetEditWin() );
if ( !pCli )
pCli = new SwOleClient( &GetView(), &GetView().GetEditWin(), xRef );