[Solved] How To Obtain Default PAra Style Name
Posted: Fri Jun 26, 2015 1:24 am
Hello,
I've spent the last couple of years creating a Writer Template that contains a good deal of OO Basic Macros that help create a chess document. One of the features is the ability to select a number of chess moves in the Writer document, then click on an icon to have those moves played out on an internal board. Now that the board position is in an internal structure, the user only has to click on another icon to have a chess diagram inserted into the document at the cursor.
All of this works just fine so long as the user is using an English version of the Open Office program itself, but it does not work for any of the non-English versions.
I know what the problem is, but I don't know how to go about fixing it. Before the diagram position is inserted, the paragraph style must be set to Default:
Now, that works for English versions. But what i need to use for the Portuguese version is:
My question is, then: How do I go about obtaining the name of the Default paragraph style using OO Basic so that it works for all language versions of Open Office? What I'd like to do is get this Default para style name and store it in a variable at the start-up of the Template. (I've already got a Sub that gets called at start-up, so it shouldn't be a problem to add whatever code I need.)
I believe that I read something to the effect that some of these para styles have a universal name that works for all language versions of Open Office, but that may be something that was implemented for an older version ans has be deprecated since then.
Any help that I can get for this problem would be greatly appreciated.
Thanks!
cando
I've spent the last couple of years creating a Writer Template that contains a good deal of OO Basic Macros that help create a chess document. One of the features is the ability to select a number of chess moves in the Writer document, then click on an icon to have those moves played out on an internal board. Now that the board position is in an internal structure, the user only has to click on another icon to have a chess diagram inserted into the document at the cursor.
All of this works just fine so long as the user is using an English version of the Open Office program itself, but it does not work for any of the non-English versions.
I know what the problem is, but I don't know how to go about fixing it. Before the diagram position is inserted, the paragraph style must be set to Default:
Code: Select all
mySelection.ParaStyleName = "Default"
Code: Select all
mySelection.ParaStyleName = "Predefinição"
I believe that I read something to the effect that some of these para styles have a universal name that works for all language versions of Open Office, but that may be something that was implemented for an older version ans has be deprecated since then.
Any help that I can get for this problem would be greatly appreciated.
Thanks!
cando