Bug 136986

Summary: (Writer) Can't edit a field with formula in imported .doc, .docx imported wrong
Product: LibreOffice Reporter: fml2 <al.le>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: dgp-mail
Priority: medium Keywords: filter:doc, filter:docx
Version: Inherited From OOo   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=81736
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 112969, 113200    
Attachments: Showcase .doc file
.docx saved in MSO from .doc
.doc (upper) and .docx (lower) compared in MSO 2016 and LO 7.1+

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+