Bug 136986 - (Writer) Can't edit a field with formula in imported .doc, .docx imported wrong
Summary: (Writer) Can't edit a field with formula in imported .doc, .docx imported wrong
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:doc, filter:docx
Depends on:
Blocks: DOCX-Fields DOC-Fields
  Show dependency treegraph
 
Reported: 2020-09-23 21:11 UTC by fml2
Modified: 2024-10-05 10:00 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Showcase .doc file (19.00 KB, application/msword)
2020-09-23 21:11 UTC, fml2
Details
.docx saved in MSO from .doc (13.90 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-09-25 12:06 UTC, Timur
Details
.doc (upper) and .docx (lower) compared in MSO 2016 and LO 7.1+ (121.24 KB, image/png)
2020-09-25 12:19 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fml2 2020-09-23 21:11:02 UTC
Description:
I have a .doc file (old Word format). The file has a custom property "TheTestProperty" of type "Number" in its properties.

Then, in the document, I have two fields:
1. Just the value of the document property "TheTestProperty"
2. A formula "the value of the document property "TheTestProperty" + 1"

When I open this .doc document with Writer and press Ctrl+F9 to show the definitions of the fields, I can see the definition of the first field. But I can't see the definition of the second field. It's still displayed as the value.

Steps to Reproduce:
1. Open the attached .doc file in Writer
2. Press Ctrl+F9

Actual Results:
The definition of the field with the formula can't be seen or edited

Expected Results:
Definitions of both fields can be seen and edited.


Reproducible: Always


User Profile Reset: No



Additional Info:
Display the definition of the field with the formula.
Comment 1 fml2 2020-09-23 21:11:54 UTC
Created attachment 165802 [details]
Showcase .doc file
Comment 2 fml2 2020-09-24 05:35:07 UTC
The definition of the first field in Word: { DOCPROPERTY "TheTestProperty" }

The definition of the second field in Word: { = { DOCPROPERTY "TheTestProperty" } + 1 }
Comment 3 Dieter 2020-09-25 06:37:54 UTC
I confirm the described behaviour, but I could also see, that you can't edit the second filed with MS Word 2016. So I would say there's a problem with that field in the original document and it's not a LO bug => RESOLVED NOTABUG

Feel free to change it back to UNCONFIRMED with a short reasoning, if you disagree.
Comment 4 fml2 2020-09-25 09:14:54 UTC
I can edit the second field with Word 2000 and with Word 2016 just fine.
Comment 5 fml2 2020-09-25 09:17:14 UTC
I press Alt+F9, then I see the definition of the field as text. I go to this text with the cursor and edit it.

In LO, I even don't see the definition of the field.
Comment 6 Timur 2020-09-25 12:06:39 UTC
Created attachment 165837 [details]
.docx saved in MSO from .doc

I reproduce this for .DOC. Property cannot be edited properly (to change custom DocProperty), Property + 1 cannot be edited at all. 
Fileopen .DOCX has different behavior: can be edited (not properly), but is imported wrong (doubled). 

Normally we split different filters, but I don't do it immediately, rather wait to see if something would be fixed here. 
Rule of thumb is search for existing bugs first, but I couldn't find one.

Note that TheTestProperty value can be changed in LO (File-Properties).
Comment 7 Timur 2020-09-25 12:19:48 UTC
Created attachment 165839 [details]
.doc (upper) and .docx (lower) compared in MSO 2016 and LO 7.1+
Comment 8 QA Administrators 2024-09-05 03:17:16 UTC Comment hidden (obsolete)
Comment 9 fml2 2024-09-08 10:23:44 UTC
I confirm that the bug still exists in LO 24.8.0.3 (X86_64).

For the document in .DOCX format, the behaviour is as follows:

1. The result of the "simple formula" (e.g. the one that just displays the value of the user defined property) is correct but the formula can't be edited. It is recognized as a computed field, I can display it but can't change anything in its definition.

2. The result of the more complex formula ("user defined property + 1") is displayed wrong ("100101" instead of "101") but the formula can't be edited. Actually, the one formula (in Word) is recognized as _two_ formulae in LO. Each of them can somehow be displayed but not edited.


For the document in .DOC format, the behaviour is as follows:

1. for "simple formula" is the same as for .docx (see above).

2. The "complex formula" is displayed with the correct result and grey background. But, when I select it, no context menu entry for editing a formula is present.