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

New commits:
commit 7dbeb17da18612df84a4f865057059f7eea8350c
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 11:32: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>

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

Reply via email to