[Libreoffice-bugs] [Bug 119519] New: Basic: insert graphicobject via ThisComponent.createInstance("com.sun.star.text.GraphicObject") not working in 6.1.0.3

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Aug 26 19:24:54 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=119519

            Bug ID: 119519
           Summary: Basic: insert graphicobject via
                    ThisComponent.createInstance("com.sun.star.text.Graphi
                    cObject") not working in 6.1.0.3
           Product: LibreOffice
           Version: 6.1.0.3 release
          Hardware: All
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: struckkai at gmx.net

Description:
Tying to insert a linked graphicobject via
ThisComponent.createInstance("com.sun.star.text.GraphicObject")
and 
oText.insertTextContent(oCursor, oGraph, False)
leads to an empty image frame (loading error)

Steps to Reproduce:
Customize the image url and run this Basic code:
Sub InsertGraphicObject
 Dim oDoc
 Dim sURL
 Dim oCursor
 Dim oGraph
 Dim oText

 sURL= ConvertToUrl("C:\Users\username\image.jpg")
 oDoc = ThisComponent
 oText = oDoc.getText()
 oCursor = oText.createTextCursor()
 oCursor.gotoStart(False)
 oGraph = oDoc.createInstance("com.sun.star.text.GraphicObject")

 With oGraph
 .GraphicURL = sURL
 .Width = 6000
 .Height = 8000
 End With

 oText.insertTextContent(oCursor, oGraph, False)
End Sub

Actual Results:
An empty image frame appears saying "Loading Error"

Expected Results:
The image should be inserted correctly and appear.


Reproducible: Always


User Profile Reset: No



Additional Info:

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180826/d696b384/attachment.html>


More information about the Libreoffice-bugs mailing list