von Axel Richter » So, 20.02.2011 18:58
Hallo Bebelbrox,
siehe Anlage.
Code: Alles auswählen
sub formel_einfuegen
oSelection = thisComponent.CurrentSelection
if not oSelection.supportsService("com.sun.star.text.TextRanges") then exit sub
sFormel = inputbox("Formel eingeben", "Formel eingeben", "nroot a b cdot int (s over t)")
sName = "com.sun.star.text.TextEmbeddedObject"
obj = ThisComponent.createInstance(sName)
obj.CLSID = "078B7ABA-54FC-457F-8551-6147e776a997"
obj.attach(oSelection.getByIndex(0))
oFormula = obj.EmbeddedObject
oFormula.Formula = sFormel
end sub
viele Grüße
Axel
- Dateianhänge
-
- WriterEmbedMath.odt
- (15.19 KiB) 42-mal heruntergeladen
Hallo Bebelbrox,
siehe Anlage.
[code]sub formel_einfuegen
oSelection = thisComponent.CurrentSelection
if not oSelection.supportsService("com.sun.star.text.TextRanges") then exit sub
sFormel = inputbox("Formel eingeben", "Formel eingeben", "nroot a b cdot int (s over t)")
sName = "com.sun.star.text.TextEmbeddedObject"
obj = ThisComponent.createInstance(sName)
obj.CLSID = "078B7ABA-54FC-457F-8551-6147e776a997"
obj.attach(oSelection.getByIndex(0))
oFormula = obj.EmbeddedObject
oFormula.Formula = sFormel
end sub[/code]
viele Grüße
Axel