summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlhan Yesil <ilhanyesil@gmx.de>2019-07-08 12:45:14 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2019-08-13 13:14:51 +0200
commit1ac02ebd93cfaccc4fc7fee27d44dcbce5b57677 (patch)
treef0d7af5e422299fb09f5395f34a4372be642a054
parentd659308e68431eca64d0d7482c7d7a02f2dec372 (diff)
tdf#125100 After insert of calc document as OLE object, content is shown
After inserting an OLE object, the object has to be shown with the preview of it's content. The flag for this is set in the InsertObject method. Change-Id: I9f0f362190bb9ab0bc36987cf0a6f969932544ec Reviewed-on: https://gerrit.libreoffice.org/75207 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit 7dbeb17da18612df84a4f865057059f7eea8350c) Reviewed-on: https://gerrit.libreoffice.org/77391 Tested-by: Jenkins
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 16acb2c7cc5f..1fde6f925dc4 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -463,6 +463,11 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrameFormat **pFlyFrameFormat )
{
+ //tdf#125100 Ensure that ole object is initially shown as pictogram
+ comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = mxDoc->GetDocShell()->getEmbeddedObjectContainer();
+ bool bSaveUserAllowsLinkUpdate = rEmbeddedObjectContainer.getUserAllowsLinkUpdate();
+ rEmbeddedObjectContainer.setUserAllowsLinkUpdate(true);
+
ResetCursorStack();
StartAllAction();
@@ -583,6 +588,8 @@ bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrame
EndUndo(SwUndoId::INSERT, &aRewriter);
+ rEmbeddedObjectContainer.setUserAllowsLinkUpdate(bSaveUserAllowsLinkUpdate);
+
return bActivate;
}