-2

I followed all instructions mentioned here:

https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=33297

The file "dict-en_US_private.zip" is working as expected.

But custom dict "en_US_private" does not show up anywhere in spelling options. Is the file hidden or not editable?


Update:

The file is working as expected means - after installing this dictionary, if I type a word “abactinal” it is not underlined. (because it is the part of that custom dict). The locale of this extension is “en-us” and it nicely integrates with current wordlist. The file works in Libre office without any modifications even after 10 years. It is a miracle in itself considering the fast-paced development of modern software. It shows very strong support for backward compatibility and that is very important in my opinion. If you want to try, download the file, rename it to xyz.oxt using windows command prompt and double click to run or unzip to open. The question is - there is no way to remove or add a word to this. For e.g. if I need to remove a single word “abactinal” then the only option is to uninstall, modify the source and reinstall the extension. Right? Why does it not show up when I go to Tools – Spelling – Options? Is there any option to make sure that it does not go into the unknown default location and instead is installed in my custom dict folder (..\AppData\Roaming\LibreOffice\4\user\wordbook) ? And by the way what is that “unknown default location” where I can see this file “en_US_private.dic”?


Update 2:

Is it possible to save the file en_US_private.dic (and .aff) to ..\LibreOffice\4\user\wordbook using an extension but without writing a script? If the answer is No, then where can I get a sample script?

shantanuo
  • 31,689
  • 78
  • 245
  • 403
  • Can you further explain 'The file "dict-en_US_private.zip" is working as expected.'? How is the file working as expected if the custom dict is not showing up in the spelling options? I'm confused. – leanne Dec 30 '22 at 16:24
  • Also, where have you put the dict? Is it in the local path or have you placed it in a custom path? – leanne Dec 30 '22 at 16:25
  • Also, since you don't provide the exact steps you followed, we can't tell if you missed one. – leanne Dec 30 '22 at 16:28
  • Might this [answer (2018) to "How to make custom dictionary for Hunspell"](https://stackoverflow.com/a/50776529/1107226) help? – leanne Dec 30 '22 at 16:38
  • I don't see how this is on-topic at all. It's about using OpenOffice rather than anything to do with programming. – DavidW Jan 07 '23 at 09:28

1 Answers1

1

To be clear I am using OpenOffice, not LibreOffice but results are consistent with your description above.

The custom dictionary 'en_US_private.dic' should be found in the following folder

'..\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\uno_packages\<random>.tmp_\dict-en_US_private.oxt\'

You may not be aware the error log '..\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\log.txt' shows the following error while installing the dictionary extension. It appears to have issues.

###### Progress log entry 2023-01-08 16:08:40 ######
ERROR: (com.sun.star.lang.IllegalArgumentException) { { Message = "There is no such extension deployed: en_US_private", Context = (com.sun.star.uno.XInterface) @7d51170 }, ArgumentPosition = (short) -1 }
ERROR: (com.sun.star.lang.IllegalArgumentException) { { Message = "There is no such extension deployed: en_US_private", Context = (com.sun.star.uno.XInterface) @7d51170 }, ArgumentPosition = (short) -1 }
ERROR: (com.sun.star.lang.IllegalArgumentException) { { Message = "There is no such extension deployed: en_US_private", Context = (com.sun.star.uno.XInterface) @7d51170 }, ArgumentPosition = (short) -1 }
Copying: dict-en_US_private.oxt

But that doesn't really help you, since only user defined dictionaries can be edited within the program. You are correct that you need a wordlist in ..\LibreOffice\4\user\wordbook

Are you aware you can just copy a UTF-8 text file with the extension '.dic' in the following format to that directory then restart the program?

OOoUserDict1 
lang: <none> 
type: positive
--- 
abactinal
abambulacral
abapertural

After restarting go to 'user-defined dictionaries' and check it to enable. This enables you to easily add entries in bulk with a text editor and remove entries via the LibreOffice settings.

dno
  • 971
  • 6
  • 13
  • Is it possible to save the file en_US_private.dic (and .aff) to ..\LibreOffice\4\user\wordbook using an extension without using a script? – shantanuo Jan 08 '23 at 07:16
  • From what I can tell .aff is only useful in a complete dictionary, which you can't easily edit. It also seems a script cannot be run on extension install, an option would be to provide a toolbar button that could check if the file existed in \wordbook and copy if required. Neither solution is perfect. Documentation IMHO is badly lacking. – dno Jan 08 '23 at 08:11
  • Update 2: Sorry, I have spent quite some time unsuccessfully trying to do both, and was unable to find any sample scripts that might achieve what you ask. Suggest asking in LibreOffice forum. – dno Jan 09 '23 at 04:38