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

            Bug ID: 92848
           Summary: shape.String gives an exception in TableShape with
                    PyUno
           Product: LibreOffice
           Version: 5.1.0.0.alpha0+ Master
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Impress
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 117348
  --> https://bugs.documentfoundation.org/attachment.cgi?id=117348&action=edit
Presentation with a table shape

com.sun.star.drawing.TableShape has a String attribute but trying to access it
or check that it exists with hasattr(shape, "String")gives an error:
uno.RuntimeException: illegal object given!

I'm not sure if the table should have the String attribute but checking that
the attribute exists shouldn't give an error in any case.

To reproduce, start LibreOffice with:
libreoffice "--accept=pipe,name=test;urp;StarOffice.Servicemanager"

and execute the following python-uno code:

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=test;urp;StarOffice.ComponentContext")
xscriptcontext = ScriptContext(client, None, None)
doc = xscriptcontext .getDocument()

slide = doc.DrawPages[0]
for shape in slide:
  print(hasattr(shape, "String"))

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to