Bug 140491 - Specific DOCX exported from Writer opens modified when reopened
Summary: Specific DOCX exported from Writer opens modified when reopened
Status: RESOLVED DUPLICATE of bug 112797
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: ModifiedStatus
  Show dependency treegraph
 
Reported: 2021-02-17 22:54 UTC by Aron Budea
Modified: 2022-10-03 20:58 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
DOCX exported from Writer (111.56 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-02-17 22:54 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2021-02-17 22:54:50 UTC
Created attachment 169841 [details]
DOCX exported from Writer

- Open and save attachment 169538 [details] (an ODT from bug 140218) as DOCX,
- Reopen it.

=> The DOCX opens modified (see the changed Save icon).

Attaching the DOCX exported from Writer in 7.2.

Observed using LO 7.2.0.0.alpha0+ (cbcec4425e04e3614a2025b49fdc221216ac51d3), 4.0.0.3 / Ubuntu.
Comment 1 V Stuart Foote 2021-02-19 15:47:52 UTC
Aron, isn't this correct? The OOXML .docx document is being filter imported back into Writer. Its contents are being parsed back to ODF compliance--to me I would say it has been changed on import and the indication of such is correct.

I coould agree to a no-change indicator for native ODF .odt (though technically it is being filter imported as well) but not so for OOXML which is an external format.
Comment 2 Aron Budea 2021-02-19 20:32:12 UTC
I'm not sure what we would be gaining by having an otherwise unchanged file go through an import-export cycle (and risking losing fidelity during the conversion), instead of opening the original the exact same way next time.
Comment 3 V Stuart Foote 2021-02-19 23:17:53 UTC
Wait, when it is opened into LibreOffice it has been filter imported. It has changed--if you save it you will overwrite--that is the warning.

Simply closing the file will leave it unchanged as no export occurs, and any lock held by LO will release.

Seems to me this is the correct and desired behavior of the save button's change notice.
Comment 4 Aron Budea 2021-02-19 23:49:24 UTC
(In reply to V Stuart Foote from comment #3)
> Wait, when it is opened into LibreOffice it has been filter imported. It has
> changed--if you save it you will overwrite--that is the warning.
Everything is filter imported, and the modification flag is for actual change in content, it wouldn't make sense to open everything changed, and it would confuse users if they didn't make any changes to the file.

Nevertheless, if you think this behavior is correct, then the behavior that happens with 99.9999% of other files (even if you exclude ODF ones) that don't open in a modified state is incorrect, ie. it isn't specific to this file, and the discussion belongs on the design or the dev list rather than here.
Comment 5 V Stuart Foote 2021-02-20 15:25:12 UTC
No, I was wrong. If I create a new standard template Writer document (lo 7.1.1) and save-as Word (2007-365) .docx when I reopen it on the same system it does not open showing with changes.

Yet when I open attachment 169841 [details] from here it does show as changed on filter import.

What is different and signals a change?

Note the "Error Reference source not found" on the third page. If I remove the inserted page reference and save a copy, reopening no longer shows with a change. So seems it is the missing reference (from some other part of the original document) that is causing this.

The error in text is effectively a change.

IMHO => NAB
Comment 6 Aron Budea 2021-02-21 03:02:39 UTC
(In reply to V Stuart Foote from comment #5)
> Note the "Error Reference source not found" on the third page. If I remove
> the inserted page reference and save a copy, reopening no longer shows with
> a change. So seems it is the missing reference (from some other part of the
> original document) that is causing this.
> 
> The error in text is effectively a change.
The original ODT from the description shows the same error message, and doesn't open as modified, therefore I'm not convinced of the validity of this explanation.
Comment 7 Justin L 2022-10-01 13:45:02 UTC Comment hidden (obsolete)
Comment 8 Timur 2022-10-03 09:33:10 UTC
(In reply to V Stuart Foote from comment #5)
> Note the "Error Reference source not found" on the third page. If I remove
> the inserted page reference and save a copy, reopening no longer shows with
> a change. So seems it is the missing reference (from some other part of the
> original document) that is causing this.
> 
> The error in text is effectively a change.

And that's the same as bug 112797. Not explained why See Also only, but I'll mark a duplicate. That one has a minimal test case. 

Also, I don't see that "exported from Writer" is relevant, same if resaved in MSO.

*** This bug has been marked as a duplicate of bug 112797 ***