sw/source/uibase/wrtsh/wrtsh1.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 1ac02ebd93cfaccc4fc7fee27d44dcbce5b57677
Author:     Ilhan Yesil <ilhanye...@gmx.de>
AuthorDate: Mon Jul 8 12:45:14 2019 +0200
Commit:     Michael Stahl <michael.st...@cib.de>
CommitDate: Tue Aug 13 13:14:51 2019 +0200

    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.st...@cib.de>
    Tested-by: Michael Stahl <michael.st...@cib.de>
    (cherry picked from commit 7dbeb17da18612df84a4f865057059f7eea8350c)
    Reviewed-on: https://gerrit.libreoffice.org/77391
    Tested-by: Jenkins

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;
 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to