OOo Basic und Mathtype-Objekte

Programmierung unter AOO/LO (StarBasic, Python, Java, ...)

Moderator: Moderatoren

Benutzeravatar
komma4
********
Beiträge: 5332
Registriert: Mi, 03.05.2006 23:29
Wohnort: Chon Buri Thailand Asia
Kontaktdaten:

Re: OOo Basic und Mathtype-Objekte

Beitrag von komma4 »

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
Cheers
Winfried
aktuell: LO 5.3.5.2 30m0(Build:2) SUSE rpm, unter Linux openSuSE Leap 42.3 x86_64/KDE5
DateTime2 Einfügen von Datum/Zeit/Zeitstempel (als OOo Extension)