Bug 94167 - Modifying section and embed fields turn them into '** Expression is faulty **'
Summary: Modifying section and embed fields turn them into '** Expression is faulty **'
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Regina Henschel
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: HelpAuthoring-Extension
  Show dependency treegraph
 
Reported: 2015-09-12 17:44 UTC by Yousuf Philips (jay) (retired)
Modified: 2015-09-23 00:46 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
screenshot (54.07 KB, image/png)
2015-09-12 17:44 UTC, Yousuf Philips (jay) (retired)
Details
to be applied to dev-tools/helpauthoring/filter/xmlhelp2soffice.xsl (678 bytes, patch)
2015-09-21 22:49 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2015-09-12 17:44:37 UTC
Created attachment 118645 [details]
screenshot

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
Comment 1 Yousuf Philips (jay) (retired) 2015-09-13 22:46:39 UTC
It also happened with the first <var> of a file - text/swriter/01/02150000.xhp
Comment 2 Jan Holesovsky 2015-09-16 17:43:02 UTC
Oh wow, it's the aCalc_Error returned in sw/source/core/fields/fldbas.cxx ; interesting.
Comment 3 Jan Holesovsky 2015-09-16 17:45:05 UTC
Or actually sw/source/core/table/swtable.cxx ; git grep aCalc_Error gives even more places, but they are compared against this.
Comment 4 Regina Henschel 2015-09-18 08:12:44 UTC
The reason is, that the field was generated with a wrong number format. It is "Standard" instead of "Text".
Comment 5 Regina Henschel 2015-09-18 09:37:04 UTC
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.
Comment 6 Regina Henschel 2015-09-21 22:49:32 UTC
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
<office:body><office:text><text:variable-decls>...</text:variable-decls>...</office:text></office:body>

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.
Comment 7 Yousuf Philips (jay) (retired) 2015-09-22 06:22:37 UTC
The patch did solve it.
Comment 8 Adolfo Jayme Barrientos 2015-09-23 00:46:40 UTC
Regina’s patch was pushed: https://gerrit.libreoffice.org/gitweb?p=dev-tools.git;a=commitdiff;h=406a2a01987cd2425b67a0da98ba404c0631cf99