Created attachment 118645 [details]
If you open a help file with the authoring tool and modify the first <section> or <embed> entries in the Edit Fields dialog, all fields of that tag will turn into '** Expression is faulty **'
Screenshot is of modifying the <EMBED href="text/shared/01/01010000.xhp#neu"> in /text/swriter/main101.xhp
It also happened with the first <var> of a file - text/swriter/01/02150000.xhp
Oh wow, it's the aCalc_Error returned in sw/source/core/fields/fldbas.cxx ; interesting.
Or actually sw/source/core/table/swtable.cxx ; git grep aCalc_Error gives even more places, but they are compared against this.
The reason is, that the field was generated with a wrong number format. It is "Standard" instead of "Text".
The format is correct in file source and in Insert > Field dialog, but wrong in Edit > Field. I cannot reproduce the problem with a new file, but see it in text/swriter/01/02150000.xhp.
Created attachment 118915 [details]
to be applied to dev-tools/helpauthoring/filter/xmlhelp2soffice.xsl
I think, that the error is, that the filter generates a wrong nesting of elements.
It generates <office:body><text:variable-decls>...</text:variable-decls><office:text>...</office:text></office:body>.
But according to ODF <text:variable-decls> is not a child of <office:body> but of <office:text>.
Therefore the nesting should be
The patch changes the filter accordingly. For me this solves the problem. The variables now get the correct format "text" in the edit dialog and in consequence the new value can be entered without disturbing something.
Please try, whether this works for you too.
The patch did solve it.
Regina’s patch was pushed: https://gerrit.libreoffice.org/gitweb?p=dev-tools.git;a=commitdiff;h=406a2a01987cd2425b67a0da98ba404c0631cf99