summaryrefslogtreecommitdiff
path: root/sw
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 11:32:51 +0200
commit7dbeb17da18612df84a4f865057059f7eea8350c (patch)
treeea7d9a2043f0a3d1ca13cd8fcce9c905e497998a /sw
parentc56ae6454a7ac6ac6f2c10efd128d1e3ab1dc013 (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>
Diffstat (limited to 'sw')
-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 1bf28c2f8c54..c81e41d25c2a 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -470,6 +470,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();
@@ -590,6 +595,8 @@ bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrame
EndUndo(SwUndoId::INSERT, &aRewriter);
+ rEmbeddedObjectContainer.setUserAllowsLinkUpdate(bSaveUserAllowsLinkUpdate);
+
return bActivate;
}