"To Automatically Hyphenate Text in a Paragraph" in the oxt file

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
dziglo
Posts: 11
Joined: Wed May 24, 2023 2:36 pm

"To Automatically Hyphenate Text in a Paragraph" in the oxt file

Post by dziglo »

Good afternoon. How can I specify in the oxt file that LibreOffice checks the box here:
"To Automatically Hyphenate Text in a Paragraph".

I tried in the following way.

In the Linguistic.xcu file I wrote:

Code: Select all

 <node oor:name="Hyphenation">
         <prop oor:name="IsHyphAuto" oor:finalized="true" >
             <value>true</value>
         </prop>
     </node>
And it didn't work out. After installing the oxt file, there is no checkmark.
OpenOffice 3.1 on Windows 10
User avatar
Zizi64
Volunteer
Posts: 11514
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: "To Automatically Hyphenate Text in a Paragraph" in the oxt file

Post by Zizi64 »

Which .oxt file (what extension) do you mean?
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
dziglo
Posts: 11
Joined: Wed May 24, 2023 2:36 pm

Re: "To Automatically Hyphenate Text in a Paragraph" in the oxt file

Post by dziglo »

The usual installation oxt file. I have oxt file. When it is installed, a spell check in the Ossetian language is added, and a button appears on the panel that launches the macro.
I want to correct this oxt file so that when it is installed, a checkmark is checked here:
"To Automatically Hyphenate Text in a Paragraph".

Image
OpenOffice 3.1 on Windows 10
User avatar
Zizi64
Volunteer
Posts: 11514
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: "To Automatically Hyphenate Text in a Paragraph" in the oxt file

Post by Zizi64 »

You can adjust the default paragraph properties in the styles. For example in the Default paragraph style. Every paragraph styles has its own property vaule: True or False. It is inherited from the parent style ot it is set by the user.

If you want to set this property in the Default Template (for all of the new documents), then you must manage it in the Templates.
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
dziglo
Posts: 11
Joined: Wed May 24, 2023 2:36 pm

Re: "To Automatically Hyphenate Text in a Paragraph" in the oxt file

Post by dziglo »

Zizi64 wrote: Sat Jun 17, 2023 9:01 am If you want to set this property in the Default Template (for all of the new documents), then you must manage it in the Templates.
Thank you. And within the framework of the installation oxt file, can this be done? For example, with its help to make corrections to the template?
OpenOffice 3.1 on Windows 10
User avatar
Zizi64
Volunteer
Posts: 11514
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: "To Automatically Hyphenate Text in a Paragraph" in the oxt file

Post by Zizi64 »

For example, with its help to make corrections to the template?
The language tool type extensions are not related to the template settings. The language tool can/try to hyphenate the words CORRECTLY in the actual language.


The option/switch "do you want to use the hyphenate function the words in a specific paragraph, or not" is related to the Styles.
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
dziglo
Posts: 11
Joined: Wed May 24, 2023 2:36 pm

Re: "To Automatically Hyphenate Text in a Paragraph" in the oxt file

Post by dziglo »

Maybe there's something I don't understand. Look here.
There is also a parameter Minimum word length in characters (see screenshot).
I was able to change its value using the setup oxt file.
To do this, I wrote in the Linguistic.xcu file:

Code: Select all

</prop>
        <prop oor:name="MinWordLength" oor:type="xs:short">
           <value>4</value>
   </prop>
By default, in LibreOffice this parameter is 5. I changed it to 4 in this way.
Why in this way (i.e. in the oxt-file) it is impossible to check the box "Automatically"

Image
OpenOffice 3.1 on Windows 10
User avatar
Zizi64
Volunteer
Posts: 11514
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: "To Automatically Hyphenate Text in a Paragraph" in the oxt file

Post by Zizi64 »

The attached image is related to the settings of the Paragraph styles. These setting may be different for the different paragraph styles. Therefore athe actual values of these settings are stored in the Styles, but not in the .oxt file.
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Post Reply