[Solved] Spacing attribute for Math

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Locked
foreverconfused
Posts: 6
Joined: Wed Sep 25, 2024 11:05 am

[Solved] Spacing attribute for Math

Post by foreverconfused »

So, I have Draw/Impress/Writer documents with many OLE formulas created with Math. I need to mass change the spacing of those formulas.
Image

I have this piece of script that can mass change fonts, their properties and size:

Code: Select all

Sub Spacing()
doc = ThisComponent
sNames = Array(“Spacing”)
values = Array(0)
changeFormulaProperties doc, sNames, values
End Sub
These are the names of the attributes I am aware of:

Code: Select all

**Attribute                Type                            Example**
CustomFontNameFixed       string                       "Liberation Mono"   
CustomFontNameSans        string                       "Liberation Sans"   
CustomFontNameSerif       string                      "Liberation Serif"   
FontFixedIsBold           boolean                                  False   
FontFixedIsItalic         boolean                                  False   
FontFunctionsIsBold       boolean                                  False   
FontFunctionsIsItalic     boolean                                  False   
FontMathIsBold            boolean                                  False   
FontMathIsItalic          boolean                                  False   
FontNameFunctions         string                      "Liberation Serif"   
FontNameMath              string                            "OpenSymbol"   
FontNameNumbers           string                      "Liberation Serif"   
FontNameText              string                      "Liberation Serif"   
FontNameVariables         string                      "Liberation Serif"   
FontNumbersIsBold         boolean                                  False   
FontNumbersIsItalic       boolean                                  False   
FontSansIsBold            boolean                                  False   
FontSansIsItalic          boolean                                  False   
FontSerifIsBold           boolean                                  False   
FontSerifIsItalic         boolean                                  False   
FontTextIsBold            boolean                                  False   
FontTextIsItalic          boolean                                  False   
FontVariablesIsBold       boolean                                  False   
FontVariablesIsItalic     boolean                                   True
Now, where should I find the name of the attribute that controls for spacing?
Thank you in advance.
Last edited by MrProgrammer on Wed Sep 25, 2024 5:43 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved] -- MrProgrammer, forum moderator
OpenOffice 4.1.15 on Linux Mint Cinnamon 22.
JeJe
Volunteer
Posts: 2908
Joined: Wed Mar 09, 2016 2:40 pm

Re: Name of Attributes for Math

Post by JeJe »

Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
foreverconfused
Posts: 6
Joined: Wed Sep 25, 2024 11:05 am

Re: Name of Attributes for Math

Post by foreverconfused »

THANK YOU! It works.
OpenOffice 4.1.15 on Linux Mint Cinnamon 22.
JeJe
Volunteer
Posts: 2908
Joined: Wed Mar 09, 2016 2:40 pm

Re: [Solved] Spacing attribute for Math

Post by JeJe »

Do you use MRI which gives all the properties and methods of an object?

viewtopic.php?t=49294
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
foreverconfused
Posts: 6
Joined: Wed Sep 25, 2024 11:05 am

Re: [Solved] Spacing attribute for Math

Post by foreverconfused »

I do have that extension. However, given that I have the list of all the attributes, it is not necessary, at least for now.
OpenOffice 4.1.15 on Linux Mint Cinnamon 22.
Locked