Bug 121784 - FILEOPEN DOCX Footnote and endnote changes are not opened as change in change control
Summary: FILEOPEN DOCX Footnote and endnote changes are not opened as change in change...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.0.beta1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.3.0
Keywords:
Depends on:
Blocks: DOCX-Footnote-Endnote DOCX-Track-Changes
  Show dependency treegraph
 
Reported: 2018-11-29 08:27 UTC by NISZ LibreOffice Team
Modified: 2019-07-23 13:01 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the problem in Writer. (203.04 KB, image/png)
2018-11-29 08:27 UTC, NISZ LibreOffice Team
Details
Example odt file from Writer. (9.25 KB, application/binary)
2018-11-29 08:28 UTC, NISZ LibreOffice Team
Details
Example docx file from Writer. (15.08 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-11-29 08:30 UTC, NISZ LibreOffice Team
Details
Screenshot of Writer and Word side by side after rejecting changes (95.83 KB, image/png)
2018-11-29 12:50 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the odt and docx side by side after rejecting all changes (141.25 KB, image/png)
2018-11-29 12:57 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2018-11-29 08:27:35 UTC
Description:
The footnote and the endnote objects themselves are not tracked as change in change control, when we save the document as DOCX, only their text.

Steps to Reproduce:
    1. Create a new document in Writer.
    2. Enable track changes with Edit->Track Changes->Record.
    3. Insert a footnote or an endnote.
    4. Save the document as ODT.
    5. Save the document as DOCX and reload.
    6. Reject the changes.
    7. Open the odt file and reject the changes.

Actual Results:
The footnote and the endnote stay in the docx file without text, while they completely disappear from ODT.

Expected Results:
The docx file should behave equal to the odt file.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 NISZ LibreOffice Team 2018-11-29 08:27:59 UTC
Created attachment 147117 [details]
Screenshot of the problem in Writer.
Comment 2 NISZ LibreOffice Team 2018-11-29 08:28:52 UTC
Created attachment 147118 [details]
Example odt file from Writer.
Comment 3 NISZ LibreOffice Team 2018-11-29 08:30:04 UTC
Created attachment 147119 [details]
Example docx file from Writer.
Comment 4 Dieter 2018-11-29 11:53:39 UTC
Tried to reproduce in

Version: 6.2.0.0.beta1 (x64)
Build ID: d1b41307be3f8c19fe6f1938cf056e7ff1eb1d18
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: en-US (de_DE); UI-Language: en-GB
Calc: threaded

but the list of changes was empty in the docx-file (in step I closed and reopened the file)
Comment 5 Gabor Kelemen (allotropia) 2018-11-29 12:50:07 UTC
Created attachment 147140 [details]
Screenshot of Writer and Word side by side after rejecting changes

To put it differently: When all changes are rejected, Word drops the footnote/endnote objects, while Writer keeps them empty. 
But only with a DOCX file, with ODT it does not keep empty footnote/endnote.
Comment 6 Gabor Kelemen (allotropia) 2018-11-29 12:57:11 UTC
Created attachment 147141 [details]
Screenshot of the odt and docx side by side after rejecting all changes
Comment 7 Gabor Kelemen (allotropia) 2018-11-29 12:59:59 UTC
So maybe this is not a filesave problem, but a fileopen one: we can write a correct docx as Word would expect it, but we don't parse it the same way as we do with odt.
Comment 8 Xisco Faulí 2019-05-02 10:09:03 UTC
(In reply to Gabor Kelemen from comment #7)
> So maybe this is not a filesave problem, but a fileopen one: we can write a
> correct docx as Word would expect it, but we don't parse it the same way as
> we do with odt.

Could you please rewrite the steps to reproduce this issue ?
Comment 9 Gabor Kelemen (allotropia) 2019-05-02 12:49:37 UTC
Another steps to see the problem: 

Steps to Reproduce:
    1. Create a new document in Writer.
    2. Enable track changes with Edit->Track Changes->Record.
    3. Insert a footnote and an endnote, so they are created as tracked changes.
    4. Save the document as ODT.
    5. Save the document as DOCX.
    6. Open the DOCX file in Writer and reject all the changes.
    7. Open the ODT file in Writer and reject all the changes.
    8. Open the DOCX file in Word and reject all the changes.

Actual Results:
In Writer the footnote and the endnote stay in the DOCX file as empty footnote and endnote: see right side of attachment #147141 [details]
They completely disappear from the ODT after rejecting the changes: see left side of attachment #147141 [details]

In Word the footnote and the endnote disappear completely after rejecting the changes: see the left side of attachment #147140 [details]

Expected Results:
The behavior of Writer in case of opening the DOCX file should be consistent when using ODT or the DOCX in Word: after rejecting the changes there should be no empty footnote/endnote left.

@Laszlo, you might be interested in this one too.
Comment 10 Dieter 2019-05-02 19:18:27 UTC
I confirm it with

Version: 6.3.0.0.alpha0+ (x64)
Build ID: 421e6fc3cd2e6fe37afbef341e2d0ad7b8edde37
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-04-07_01:12:58
Locale: en-US (de_DE); UI-Language: en-US
Calc: threaded

Footnote and endnote entry are not shown as changes, so they can't be rejected
Comment 11 Commit Notification 2019-05-22 05:40:57 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/2d3a907973d04f0b8368a132d262e0318c4445dc%5E%21

tdf#121784 DOCX import: fix change tracking of footnotes

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 László Németh 2019-05-22 05:41:49 UTC
@all I plan to backport the fix in 6.2, too. Thanks for the report and the feedbacks!
Comment 13 Dieter 2019-07-23 08:39:31 UTC
Verified with

Version: 6.4.0.0.alpha0+ (x64)
Build ID: 8f98a7c4e5b1f0b249c026577805a378b8a533d5
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-07-23_00:30:19
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

One little problem remains: If you reject all changes in docx-file, empty paragraphes remain (that's not the case with odt-file). But pershaps that's another bug.
Comment 14 Gabor Kelemen (allotropia) 2019-07-23 10:25:53 UTC
(In reply to Dieter Praas from comment #13)
> Verified with
> 
> Version: 6.4.0.0.alpha0+ (x64)
> Build ID: 8f98a7c4e5b1f0b249c026577805a378b8a533d5
> CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
> TinderBox: Win-x86_64@42, Branch:master, Time: 2019-07-23_00:30:19
> Locale: de-DE (de_DE); UI-Language: en-US
> Calc: threaded
> 
> One little problem remains: If you reject all changes in docx-file, empty
> paragraphes remain (that's not the case with odt-file). But pershaps that's
> another bug.

Hi Dieter!

Thanks for verifying this one.
Could you elaborate how do you see empty paragraphs?

I tried to reject footnote/endnote changes from the attached example file and from a newly created one, but nothing remained in this recent master build:

Version: 6.4.0.0.alpha0+ (x86)
Build ID: 382aceb80d3c0f420d51762e1f88eee2334ff11b
CPU threads: 4; OS: Windows 6.3; UI render: GL; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-07-21_23:45:18
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: CL
Comment 15 Dieter 2019-07-23 10:55:44 UTC
(In reply to Gabor Kelemen from comment #14)
> Hi Dieter!
> 
> Thanks for verifying this one.
> Could you elaborate how do you see empty paragraphs?

In the original file I have one paragraph with footnote, two empty paragraphs one paragraph with endnote and one empty paragraph. When I reject all changes I can see 5 empty paragraphs (formatting marks) in docx, but only one in odt-file.
Comment 16 Gabor Kelemen (allotropia) 2019-07-23 12:53:56 UTC
(In reply to Dieter Praas from comment #15)
> (In reply to Gabor Kelemen from comment #14)
> > Hi Dieter!
> > 
> > Thanks for verifying this one.
> > Could you elaborate how do you see empty paragraphs?
> 
> In the original file I have one paragraph with footnote, two empty
> paragraphs one paragraph with endnote and one empty paragraph. When I reject
> all changes I can see 5 empty paragraphs (formatting marks) in docx, but
> only one in odt-file.

Which original file is that? The one in comment #3 has only two paragraphs with one footnote and one endnote each.
Comment 17 Dieter 2019-07-23 13:01:13 UTC
(In reply to Gabor Kelemen from comment #16)
> Which original file is that? The one in comment #3 has only two paragraphs
> with one footnote and one endnote each.

I created a new file (in order to verify the bug) and started record changes from the beginning (so reject all changes also deletes the text and not only the footnote end endnote number). Sorry, I don't want to produce confusion.