programmatically set "tab stops" options value to mitigate bug

asked 2020-09-17 07:28:43 +0200

blashrkh gravatar image

Is it possible to manipulate some base level option values programmatically via macro, basic, javascript or python? Can you point me in the right direction?

Specifically is there any way to set the value of the tab stop options programmatically?
The value is located in Tools menu → Options... (alt+F12) → LibreOffice Writer *tree entry → General tree submenu → *Tab stops

It seems likely that this bug is going to take a year or more to fix so I really need a way to programmatically set the tab stop size preiodically, upon change or upon paste (see bug description and subsequent bug report).

Not sure how often LO polls any configuration or registry files for changes or whether it is only once per session - if this is the case editing any configuration files by an external utility might be mechanism but then LO might not read such a file regularly enough (or only on startup) for any externally initiated changes to take effect.

I am not a coder or programmer but I can piece things together so please point me in the right direction.

edit retag flag offensive close merge delete


Appears to be edited in registrymodifications.xcu

Try changing the following line from 1270 (1.27cm) to 499 (0.5cm). LO seems to do some rounding once you enter values into the GUI.

May be able to use UNO or some other to change these registry values if changing in the file does not work.

<item oor:path="/org.openoffice.Office.Writer/Layout/Other/TabStop"><value xml:lang="en GB">1270</value></item>

<item oor:path="/org.openoffice.Office.Writer/Layout/Other/TabStop"><value xml:lang="en-GB">499</value></item>

blashrkh gravatar imageblashrkh ( 2020-09-17 11:23:15 +0200 )edit

also came across the following behaviour - where when working with your 0.5cm tab stop distance and manually changing tab stop distance in options this can be reversed by using the undo action (ctrl+Z). This suggests that somehow that one or more configured options are indeed available through the clipboard / data recognition mechanism.

Wonder if it's possible to peek more into exactly what code LO is executing. It appears under the edit menu as Undo/Redo: Modify default values.

blashrkh gravatar imageblashrkh ( 2020-09-22 04:18:13 +0200 )edit