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

How to find the "Default" paragraph style

by pitonyak :: Rate this Message:

Reply to Author | View in Thread

I want to know the name of the "Default" paragraph style. I would also
like to find the "Default" paragraph style.

I am using "en" language in the USA.

Consider code such as the following:

  oStyles = oDoc.StyleFamilies.getByName("ParagraphStyles")
  sss = "Default"
  sss = "Standard"
  If oStyles.hasByName(sss) Then
    Print "is the name " & sss & " = " & oStyles.getByName(sss).Name
  End If

This prints:

is the name Default = Standard

OK, so the the GUI uses the name Default, the container is able to find
a style named Default, but the returned style is really named Standard.
If I check the names, it says Standard, not Default.

How do I find the name of the Default paragraph style? My inclination is
to use oStyles.getByIndex(0)

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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

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