« Return to Thread: How to find the "Default" paragraph style

Re: How to find the "Default" paragraph style

by Bernard Marcelly :: Rate this Message:

Reply to Author | View in Thread

Hi Andrew,
A style has an internal name and a localized display name.
A custom style has the same internal name and display name.

Built-in styles may have a display name different from the internal name.

The built-in paragraph style with internal name : "Standard" has a
display name "Default" in english locale.
In french locale, the display name is "Standard" ...

Method getName() returns the internal name of a style.
Property DisplayName contains the displayed name.


Dim paragStyles As Object, aStyle As Object
paragStyles = ThisComponent.StyleFamilies.getByName("ParagraphStyles")
aStyle = paragStyles.getByName("Standard")
MsgBox(aStyle.DisplayName, 0, "Displayed style name")

Regards
   Bernard



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...

 « Return to Thread: How to find the "Default" paragraph style