incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 5092] formula styles
Date Tue, 05 Jun 2012 13:56:05 GMT

--- Comment #13 from Filip Sund <> ---
I couldn't get(In reply to comment #12)
> Hi,
> I'am pleased to give a macro.
> See here : <>
> 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
(element.supportsService("")) then
                element.BaseFontHeight = 14
                element.FontNameVariables= "Arial"
                element.FontNameFunctions = "Arial"     
                element.FontNameNumbers= "Arial"       
                element.FontNameText= "Arial"       
    next i
End Sub

Replace "Arial" with whatever font you want, and 14 with wanted font size.
Thanks to Brecht Machiels at and the French OpenOffice Wiki.
 - <>

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

View raw message