[Libreoffice-bugs] [Bug 119899] New: Shape.Graphic.OriginURL is empty in Python UNO

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Sep 15 21:14:41 UTC 2018


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

            Bug ID: 119899
           Summary: Shape.Graphic.OriginURL is empty in Python UNO
           Product: LibreOffice
           Version: 6.1.1.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Impress
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: ofirr.dev at gmail.com

Description:
Shape.GraphicURL was replaced in 6.1 with Shape.Graphic.OriginURL but when
accessed with Python UNO it is empty and Shape.Graphic.Linked is False.
It might be related to:
https://bugs.documentfoundation.org/show_bug.cgi?id=117427

Steps to Reproduce:
1. install libreoffice 6.1.x and libreoffice-script-provider-python in Ubuntu
18.04:
sudo add-apt-repository ppa:libreoffice/ppa
sudo apt-get update
sudo apt-get install libreoffice libreoffice-script-provider-python
2. start libreoffice from the command line
libreoffice "--accept=pipe,name=name;urp;StarOffice.Servicemanager"
3. open the attached ODP in libreoffice
4. open Python3 terminal and try to access shape.Graphic.OriginURL with UNO:

import uno
from pythonscript import ScriptContext

localContext = uno.getComponentContext()
resolver = localContext.ServiceManager.createInstanceWithContext(
'com.sun.star.bridge.UnoUrlResolver', localContext )
client = resolver.resolve("uno:pipe,"
"name=name;" 
"urp;"
"StarOffice.ComponentContext")
XSCRIPTCONTEXT = ScriptContext(client, None, None)

doc = XSCRIPTCONTEXT.getDocument()
slide = doc.DrawPages.getByIndex(0)
shape = slide[0]

print(shape.Graphic.OriginURL)
print(shape.Graphic.Linked)

Actual Results:
shape.Graphic.OriginURL is an empty string
shape.Graphic.Linked is False

Expected Results:
shape.Graphic.OriginURL should give us the PNG URL.
shape.Graphic.Linked should be True


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.1.1.2
Build ID: 1:6.1.1~rc2-0ubuntu0.18.04.1~lo3
CPU threads: 1; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-US (en_IL); Calc: group threaded

-- 
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/20180915/67389c9a/attachment.html>


More information about the Libreoffice-bugs mailing list