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

--- Comment #5 from Ofir <[email protected]> ---
The python script expects LibreOffice 5.1.

To test with LO < 5.0 and below use this:

#!/usr/bin/python3
# -*- coding: utf-8 -*-

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()

## new API in LibreOffice 5.1
#slide = doc.DrawPages[0]
#for shape in slide:
#  print(hasattr(shape, "String"))

slide = doc.DrawPages.getByIndex(0)
for i in range(slide.Count):
  shape = slide.getByIndex(i)
  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