[Solved] Default math font size?
Posted: Tue Mar 12, 2019 11:36 am
Can i a specify the default math font size?If yes then will be grateful if someone explains me how.Genuine replies are appreciated.
User community support forum for Apache OpenOffice, LibreOffice and all the OpenOffice.org derivatives
https://forum.openoffice.org/en/forum/
Code: Select all
Sub insertFormulaSettingBaseFontHeight(Optional pBFH As Long)
REM You may also want to adjust the position. More insight needed.
REM You can simplify the the parameter handling for use in LibO.
If IsMissing(pBFH) Then
bfh = 8 REM For testing!
Else
bfh = pBFH
End If
doc0 = ThisComponent
doc0Frame = doc0.CurrentController.Frame
dispatchHelper = createUnoService("com.sun.star.frame.DispatchHelper")
dispatchHelper.executeDispatch(doc0Frame, ".uno:InsertObjectStarMath", "", 0, Array())
eos = doc0.EmbeddedObjects
u = eos.Count - 1
eo = eos.getByName(eos.ElementNames(u))
fo = eo.Model
fo.BaseFontHeight = bfh
doc0Frame.activate
End Sub