stanheer wrote: ↑Sat Jan 05, 2019 3:12 am
Plus, my curiosity has been piqued.
Thank you for the interesting question.
stanheer wrote: ↑Sat Jan 05, 2019 3:12 am
[The label templates that I created] do not appear in the Options/Paths/Templates list. Are they actually templates (.ott)?
No, they are not stored as Writer templates (file extension OTT).
miasma.gajs wrote: ↑Wed Aug 03, 2022 1:20 pm
I have created a number of test label templates and want to delete or just re-name them - any help please?
User-defined label templates are stored as settings in
registrymodifications.xcu in the user profile. This large file (mine is about a megabyte) contains
thousands of OpenOffice settings. I do not know of any
supported OpenOffice procedure to remove the label template settings except a profile reset. The user profile is the folder ending in
/user/ that is shown in option OpenOffice → Paths. Options are set with OpenOffice → Preferences on a Mac, Tools → Options on other platforms.
- 202304202103.gif (65.62 KiB) Viewed 2962 times
After terminating OpenOffice I was successful removing only my user-defined labels from
registrymodifications.xcu using UNIX tools on my system. Disclaimer: This procedure has had minimal testing. It looks simple, but I spent many hours researching how to accomplish this. Be sure to observe the distinction between - and ~ in the
sed command.
cd "location-of-user-profile" # From above, blue box
xcu=registrymodifications.xcu; old=registrymodifications.old # Set file name variables
key="//item[@*[1]='/org.openoffice.Office.Labels/Manufacturer']" # Key of item for user-defined labels
cp $xcu $old # Create backup of registrymodifications.xcu
sed "s~$(xmllint --xpath $key $old)~~" $old >$xcu # Remove item from registrymodifications.xcu
If you want to retain some of your user-defined label templates you would need to run the
xmllint command, examine the output, edit it to remove the items you want to retain, and then pass that string of data to
sed for deletion. Unless you are experienced with UNIX tools and with XML this will not be easy. But you can use File → New → Labels, note the attributes of the label templates you want to keep, delete all of them, and then re-define the ones you wanted to keep.