How can we add label formats to Libreoffice

I work for a UK based Label Manufacturer and I am investigating how to add our formats into Libreoffice. Our computer labels are sold UK wide under our own brand and are also branded on behalf of our customers. Ideally we would both our own codes and those of our branded customers.

I am afraid your question doesn’t even reveal what do you mean by “formats”. Are they like paper formats (size) or something else, since you say they are “codes” as well. Please be more specific.

Format has the meaning suggested by bencomp, code refers to our product codes. i.e. I want our customers to be able to be able print to the label we produce by looking for our product code under the mailings function in Writer.

Submitted to Bugzilla per Regina’s suggestion

How about posting a link to that report?

If by ‘format’ you mean the dimensions of sheets of labels and the labels, you could suggest that the source file that lists all brand+type combinations with their dimensions be changed. This file can be found in the source code repository on GitHub.com: https://github.com/LibreOffice/core/blob/master/extras/source/labels/labels.xml.

If you know your way around XML and Git/GitHub, you could add the dimensions of your labels and send a pull request. The meaning of the codes in the elements is explained at the top of the file. Alternatively you could contact other developers for additional help and proceeding to add your labels.

That’s great, thanks. I did years ago start this process on Openoffice, but never completed it. So I should be able to find my way round the xml.

Write an issue in Bugzilla, that you want your labels to be added and/or ask on the developer mailing list or IRC, whether they agree, that it should be added to LibreOffice. When you get an OK, you can provide a patch to change the source.

Start with an installation of LibreOffice. The label definitions are in the file /share/labels/labels.xml. Find the comment at the beginning of the file, which explains the file format. You can edit the file labels.xml using an editor. Close LibreOffice (quickstarter too) before editing.

You can first create such labels as user defined labels using the wizard in File > New > Labels. The result is inside the file registrymodifications.xcu in the node /org.openoffice.Office.Labels/Manufacturer. Especially the Measure property is useful.

The file itself is /core/extras/source/labels/labels.xml in the source.
The corresponding schema is /core/officecfg/registry/schema/org/openoffice/Office/Labels.xcs in the source.
You need to make a diff against the file labels.xml from the source and put it in Git for review.

I don’t know, whether it is possible to define localized labels.

/share/labels/labels.xml
Hmm, that’s the file name I’ve been looking for, can’t find it under the Program files or Appdata folders (Win 7 pro) also have no folder named labels in the share folder. I’m on version 3.5, so I’ll try an update to the latest version and see if that makes a difference.

Thanks for the link to the schema, that’ll be very useful!