You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2012/06/05 15:56:05 UTC

[Bug 5092] formula styles

https://issues.apache.org/ooo/show_bug.cgi?id=5092

--- Comment #13 from Filip Sund <pu...@gmail.com> ---
I couldn't get(In reply to comment #12)
> Hi,
> I'am pleased to give a macro.
> See here : <http://agnooo.free.fr/pluxml/?article6/nouvel-article>
> You will find a file to test it and the extension.
> 
> It's certainely not a "good macro" but it's "a macro" that I use every day
> for
> my work.
> The macro does only what I need, it could do more if necessary.
> However, there's still a problem, sometimes, with  refreshing the document.
> 
> The macro is in french, as you could suspect from my poor english, but I
> think
> you could easily manage with it.

I couldn't get your macro to work (I get an error message about halfway through
my document), but here is a simpler, more manual macro that does the job:


Sub Main
    embeddedObjects = ThisComponent.getEmbeddedObjects()
    elementNames = embeddedObjects.getElementNames()
    for i=0 to UBOUND(elementNames)
        element = embeddedObjects.getByName(elementNames(i)).Model
        if (not isNull(element)) then
            if
(element.supportsService("com.sun.star.formula.FormulaProperties")) then
                element.BaseFontHeight = 14
                element.FontNameVariables= "Arial"
                element.FontNameFunctions = "Arial"     
                element.FontNameNumbers= "Arial"       
                element.FontNameText= "Arial"       
            endif
        endif
    next i
    ThisComponent.reformat()
End Sub


Replace "Arial" with whatever font you want, and 14 with wanted font size.
Thanks to Brecht Machiels at Superuser.com and the French OpenOffice Wiki.
 -
<http://superuser.com/questions/290197/how-to-change-the-font-of-all-equations-in-libreoffice-writer>
 - <http://wiki.services.openoffice.org/wiki/Fr.openoffice.org/FAQ/Math/102>

-- 
You are receiving this mail because:
You are on the CC list for the bug.