4

Is there a way to change Libre Office settings through command line or some configuration file?

We would want to change the measurement units from imperial to metric while converting to HTML in headless mode on a remote VPS.

Using LibreOffice 4.2.6.3 on Ubuntu 14.04

Denzeli
  • 51
  • 1
  • 5

2 Answers2

1

If it is possible to use a template file then you can create one with the required parameters and then use it with the "-n" option of the libreoffice command to get what you need.

And as for the configuration files of Libre Office the details of it can be found here.

You can take a look at this post if you want to edit the configuration file to do what you are trying to do.

Ayan
  • 2,951
  • 3
  • 19
  • 22
1

Thanks to Ayan Patra, I found the solution.

Measurement units can be changed in libreoffice/4/user/registrymodifications.xcu

For calc it was set in:

<item oor:path="/org.openoffice.Office.Calc/Layout/Other/MeasureUnit"><prop oor:name="Metric" oor:op="fuse"><value>8</value></prop></item>

For writer it's in

<item oor:path="/org.openoffice.Office.Writer/Layout/Other"><prop oor:name="MeasureUnit" oor:op="fuse"><value>8</value></prop></item>

The values as far as I tested were millimeters: 1 centimeters: 2 inch: 8

Tested these with the gui on local machine and the oor:name in the calc config stays metric when changing to imperial units... Doesn't seem to matter thou.

Denzeli
  • 51
  • 1
  • 5