Bug 164858 - Import database of words to AutoCorrect
Summary: Import database of words to AutoCorrect
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.7.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval
Depends on:
Blocks: AutoCorrect-Complete
  Show dependency treegraph
 
Reported: 2025-01-26 07:50 UTC by افشین
Modified: 2025-12-03 08:08 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Extension supposed to place acor_en-us.dat at <config>/user/autocorr/ (45.02 KB, application/vnd.openofficeorg.extension)
2025-12-03 08:08 UTC, Heiko Tietze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description افشین 2025-01-26 07:50:19 UTC
Description:
Hello. 
I have added a large number of Persian (Farsi) words to the AutoCorrect database over time, and since I have been very careful in selecting these words, I am sure they will be useful to other users as well.
However, unfortunately, the AutoCorrect feature does not support importing words.
If there were a button to import words, users could easily share their databases. If this feature is added to this section of LibreOffice, specialized and customized databases will be created over time, and each user would be able to easily add the required database to LibreOffice.

Steps to Reproduce:
1.Open LibreOffice Writer
2.Tools --> AutoCorrect --> AutoCorrect Options --> Replace --> With --> New
3.Words are added to the database through step 2.

Actual Results:
There is no way to share the created database.

Expected Results:
If there were a button to import the created database, each user would not have to create their desired database from scratch.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.2.7.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 2; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: fa-IR (en_US.UTF-8); UI: en-US
Ubuntu package version: 4:24.2.7-0ubuntu0.24.04.1
Calc: threaded
Comment 1 افشین 2025-01-27 04:24:18 UTC
Also, if there is a button for exporting the word database, the user can easily obtain a standard and importable output from their word database.
Comment 2 افشین 2025-03-15 08:16:49 UTC
Implement an export feature that allows users to save their AutoCorrect entries to a file in a standardized format (e.g., XML) This file can then be shared with other users and develop an import feature that enables users to load AutoCorrect entries from a file. This would allow users to easily integrate another user's database into their own LibreOffice setup.
Comment 3 V Stuart Foote 2025-11-30 18:20:56 UTC
This is already provided.

The default autocorrections for each locale a user invokes are taken from default templates and written to their user profile.

So, for example on en-US locale I receive a file 'acor_en-US.dat' copied into my LibreOffice profile.  On Windows that directory is %APPDATA%\LibreOffice\4\user\autocorr\

The .dat is a simple Zip archive. The content are simple text XML with simple markup:

<block-list:block 

block-list:abbreviated-name="[pattern]" 

block-list:name="[replacement]"

/>

Similar for the allowed word/sentence exceptions with no replacement, depending on the rules as set in UI. 

You can can edit the Zip archive content of the per-user acor_*.dat save it and copy it to yourown or others LibreOffice profile. 

Does that not suffice for some reason?
Comment 4 افشین 2025-12-01 04:13:06 UTC
Thanks for the clarification. I understand that the AutoCorrect data is technically exportable by copying or editing the `acor_*.dat` files in the user profile.

My original point, however, was about the absence of an accessible import/export mechanism in the UI. For most users, manually locating profile directories, handling ZIP/XML contents, and replacing files is not a practical workflow. From a usability standpoint, this makes sharing or importing AutoCorrect word lists harder than it needs to be.

So while the underlying data is indeed portable, the feature is effectively hidden from users. What I was suggesting is a proper UI-level import/export option, so that users can easily share or load AutoCorrect dictionaries without interacting with profile files.

I hope this clarifies the intention behind the request.
Comment 5 Heiko Tietze 2025-12-03 08:08:39 UTC
Created attachment 204401 [details]
Extension supposed to place acor_en-us.dat at <config>/user/autocorr/

I believe it's not unreasonable that you take the *.dat file and pack it into an extension, which other user can install easily. While this works for autotext [1] it fails in my test for the English auto correction list. Perhaps because of these lines, Mike? 

	<node oor:name="Paths">
        <node oor:name="AutoCorrect" oor:op="fuse">
			<node oor:name="InternalPaths">
                <node oor:name="%origin%/autocorr" oor:op="fuse"/>
			</node>
		</node>
	</node>


[1] https://extensions.libreoffice.org/en/extensions/show/132