[Libreoffice] export mathml

Александр Лаврущенко kpykcb at gmail.com
Wed Mar 30 16:23:42 PDT 2011

Hi all,

i want to export mathml from python script. I saw at the forum Basic
code snippet:


which looks like:

for nObjectCounter = 0 to oDoc.embeddedObjects.count - 1
oEmbeddedObject = oEmbeddedObjects.getByIndex(nObjectCounter)
if oEmbeddedObject.clsid = "078B7ABA-54FC-457F-8551-6147e776a997" then
nMathObjects = nMathObjects + 1
oMathObject = oEmbeddedObject.embeddedObject
mathml = oMathObject.getMathML
end if

I translated this to python code, but seems that  oMathObject here
dont have any method named getMathML.

So question is, what changed in API and how i can get mathml from
formula object:

>doc = desktop.loadComponentFromURL(url, "_blank", 0, ())
     <58> u'{ 9x + 14 =17}'
>x.EmbeddedObject.getMathML                 # no such method

Thanks for help.

P.S. Provided Basic code give the same result.

More information about the LibreOffice mailing list