vielleicht hilft Dir das:
ms777 in Automatic resize of Math formulas
Code: Alles auswählen
Sub Main
oShape = ThisComponent.Drawpage.getByIndex(0)
if oShape.supportsService("com.sun.star.text.TextEmbeddedObject") then
oEO = oShape.EmbeddedObject
if oEO.supportsService("com.sun.star.formula.FormulaProperties") then
oXEO = oShape.ExtendedControlOverEmbeddedObject
iCurrentState = oXEO.currentState
oXEO.changeState(com.sun.star.embed.EmbedStates.UI_ACTIVE)
if oEO.BaseFontHeight = 100 then
oEO.BaseFontHeight = 30
else
oEO.BaseFontHeight = 100
endif
wait(200)
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dispatcher.executeDispatch(oEO.CurrentController.Frame, ".uno:Draw", "", 0, Array())
oXEO.changeState(iCurrentState)
endif
endif
End Sub