von komma4 » Mo, 01.12.2008 07:41
Habe ich persönlich noch keinen Kontakt mit, ...
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
Habe ich persönlich noch keinen Kontakt mit, ...
vielleicht hilft Dir das:
ms777 in [url=http://user.services.openoffice.org/en/forum/viewtopic.php?f=45&t=5579&p=27145]Automatic resize of Math formulas[/url]
[code] 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[/code]