[Libreoffice-commits] core.git: sw/source

Ilhan Yesil (via logerrit) logerrit at kemper.freedesktop.org
Tue Aug 13 09:33:29 UTC 2019


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

New commits:
commit 7dbeb17da18612df84a4f865057059f7eea8350c
Author:     Ilhan Yesil <ilhanyesil at gmx.de>
AuthorDate: Mon Jul 8 12:45:14 2019 +0200
Commit:     Michael Stahl <Michael.Stahl at 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.Stahl at cib.de>
    Tested-by: Michael Stahl <Michael.Stahl at 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;
 }
 


More information about the Libreoffice-commits mailing list