Authomatic recorded macro using "record macro" gives such a result:
Code: Select all
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:InsertObjectStarMath", "", 0, Array())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:InsertObjectStarMath", "", 0, Array())
In Writer it is easy. It's only needed to use o >>CLSID = "078B7ABA-54FC-457F-8551-6147e776a997"<< formula to an object.
Then I set the "formula" property of my object which is EmbeddedObjcet (for example: oObj.EmbeddedObject.formula = "My formula") and then it works good. But it's in Writer. How to get it in Calc? Is there any equivalent of "EmbeddedObject" object from Writer's document in Calc Spreadsheets? Can anyone help me?
Sorry for my complicated explanation and poor english.... And thank You very much for every suggestion.