Bug 112797 - FILEOPEN: DOCX - Document set to modified on opening
Summary: FILEOPEN: DOCX - Document set to modified on opening
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: lowest minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
Depends on:
Blocks: DOCX-Fields ModifiedStatus
  Show dependency treegraph
 
Reported: 2017-10-01 07:26 UTC by Mike
Modified: 2022-09-23 19:27 UTC (History)
5 users (show)

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


Attachments
test case (127.42 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-10-01 07:26 UTC, Mike
Details
Image of issue (142.56 KB, application/pdf)
2017-10-01 07:28 UTC, Mike
Details
Test case opened and saved with 'ThinkFree Office Word' (19.91 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-10-01 07:48 UTC, Mike
Details
Test case opened and saved with 'TextMaker 2016' (121.09 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-10-01 07:48 UTC, Mike
Details
Minimum test case (4.35 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-11-02 05:58 UTC, Mike
Details
Screenshots and description (214.73 KB, application/pdf)
2017-11-02 05:59 UTC, Mike
Details
Manually fixed Minimum test case (4.27 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-11-19 09:20 UTC, Mike
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike 2017-10-01 07:26:08 UTC
Description:
Writer shows immediately after opening this file the 'There are 
changes to be saved' icon with the star.
If you save the file as a docx, close Writer and open the docx 
with Writer again, the "changes to be saved" icon shows up 
again. This icon disappears if you save the document as a odt 
file and open that odt file.
I prefer ODT anyway, but in my opinion this issue is an 
interesting behaviour, that is worth a report.

Steps to Reproduce:
1. Open File


Actual Results:  
In the menu bar should be the "normal" save icon (floppy disk icon).

Expected Results:
In the menu bar is the "there are changes to be saved icon (floppy disk icon with star"-


Reproducible: Always

User Profile Reset: No

Additional Info:
Searched via "file open save changes icon" for dupes, but did not found one


Version: 5.4.1.2 (x64)
Build-ID: ea7cb86e6eeb2bf3a5af73a8f7777ac570321527
CPU-Threads: 4; Betriebssystem:Windows 6.19; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: group


User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0
Comment 1 Mike 2017-10-01 07:26:53 UTC
Created attachment 136660 [details]
test case
Comment 2 Mike 2017-10-01 07:28:03 UTC
Created attachment 136661 [details]
Image of issue
Comment 3 Mike 2017-10-01 07:34:18 UTC
Fished it from the net via google:

https://www.hdm-stuttgart.de/~riekert/theses/thesis.docx
Comment 4 Mike 2017-10-01 07:47:24 UTC
The test case seems to be saved with M$ Word 2016 (if I interpret the properties of the docx right). I opened the testcase with 'ThinkFree Office Word' and 'TextMaker 2016' and saved the file under a different name. The issue stays. I attached those files. Maybe it helps your great coders to figure out, what the common thing in those three files is, that makes Writer show the 'modified state' icon. :-)
Comment 5 Mike 2017-10-01 07:48:11 UTC
Created attachment 136662 [details]
Test case opened and saved with 'ThinkFree Office Word'
Comment 6 Mike 2017-10-01 07:48:39 UTC
Created attachment 136663 [details]
Test case opened and saved with 'TextMaker 2016'
Comment 7 Mike 2017-10-01 07:51:11 UTC
Comment on attachment 136662 [details]
Test case opened and saved with 'ThinkFree Office Word'

I was wrong, Writer works with the docx, that I created with ThinkFree. I'm sorry to confuse you. :-(
Comment 8 Mike 2017-10-01 07:53:18 UTC
I was wrong, Writer works with the docx, that I created with ThinkFree. I'm sorry to confuse you. :-( But the docx that I saved with TextMaker shows the issue, if you open it with Writer.
Comment 9 Dieter 2017-10-01 09:02:38 UTC
I opened attachments from comment 1, 5, 6 and 7 => no "changes to be saved" icon

Version: 5.4.2.2 (x64)
Build-ID: 22b09f6418e8c2d508a9eaf86b2399209b0990f4
CPU-Threads: 4; Betriebssystem:Windows 6.19; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: group
Comment 10 Xisco Faulí 2017-10-01 22:00:52 UTC
Thank you for reporting the bug.
Unfortunately without clear steps to reproduce it, we cannot track down the origin of the problem.
Please provide a clearer set of step-by-step instructions on how to reproduce the problem.
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the steps are provided
Comment 11 Mike 2017-11-02 05:58:39 UTC
Created attachment 137437 [details]
Minimum test case
Comment 12 Mike 2017-11-02 05:59:13 UTC
Created attachment 137438 [details]
Screenshots and description
Comment 13 Mike 2017-11-02 06:01:57 UTC
The issue with “thesis.docx” could not be confirmed by another member. 

Out of curiosity I mailed the test case to a Linux user, who could confirm the issue. He uses Ubuntu 17.02 and LO 5.3.1.2. Then I created and tested this minimum test case.

Would someone be so nice and open the attached file “FILEOPEN DOCX - file in modified state directly after opening of file.docx”? This is a minimum test case (5 kb) of the original file, that I attached to this report (“thesis.docx”)

I had the issue in

Version: 6.0.0.0.alpha1+ (x64)
Build ID: 9ea8686d3573540b697b51d1e2e00bfe2d57d872
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2017-10-29_07:23:44
Locale: de-DE (de_DE); Calc: CL

And 

Version 3.6.4.3 (Build ID: 2ef5aff)

I did not have the issue in LO 3.3.0, so it is not inherited.

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4

Can someone confirm this issue? I attached a PDF with screenshots.
Many thanks in advance! :-)


P. S. MS’s ‘Open XML Productivity Tool’ found no error.
Comment 14 Dieter 2017-11-02 06:51:37 UTC
I also tried with the test case from comment 11, but I couldn't reproduce it. Do you get any informations about the cahnge if you enable tracking changes?

Version: 6.0.0.0.alpha1 (x64)
Build ID: c1d1f859b268f650143d48f294999cda0fa57350
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: de-DE (de_DE); Calc: group
Comment 15 Buovjaga 2017-11-10 15:20:46 UTC
(In reply to Mike from comment #11)
> Created attachment 137437 [details]
> Minimum test case

I confirm the problem with the file.

Version: 6.0.0.0.alpha1+ (x64)
Build ID: 4058d85963e371be657f531d8f30e31381a9ccab
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2017-11-05_22:51:05
Locale: fi-FI (fi_FI); Calc: group

Arch Linux 64-bit, KDE Plasma 5
Version: 6.0.0.0.alpha1+
Build ID: 1aba1955f161cc112dab80b6b3e78ec7761616fc
CPU threads: 8; OS: Linux 4.13; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on November 10th 2017
Comment 16 Mike 2017-11-19 09:20:10 UTC
Created attachment 137846 [details]
Manually fixed Minimum test case

I have NOT a coder, but I did some trial-and-error with the minimum test case and found a hint:

1. Open minimum test case ("FILEOPEN DOCX - file in modified state directly after opening of file.docx", 5kb only)
2. Open word\document.xml in the DOCX
3. Delete the lines 

<w:r>
<w:instrText> PAGEREF  \h </w:instrText>
</w:r>

4. Save the test case again as a DOCX
5. Open the new DOCX
6. New DOCX is not opened in "modified state".

P.S.
I opened the lines in Open XML Productivity tool and they mean:

          Run run2 = new Run();
          FieldCode fieldCode1 = new FieldCode();
          fieldCode1.Text = " PAGEREF \\h ";

(Can't understand it, I'm not a coder)
Comment 17 Mike 2017-11-19 09:24:57 UTC
Hello Dieter, :-)

I tried the tracker, but it did not record anything. Maybe because the issue is before doing anything "real". It's just about opening. (Just a guess. I don't know theres things.)

Regards,
Mike 

Version: 6.0.0.0.alpha1+ (x64)
Build ID: a5af0fd9f27af42cf2e8571f659cdad6e606215b
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2017-11-07_00:30:02
Locale: de-DE (de_DE); Calc: CL
Comment 18 Yousuf Philips (jay) (retired) 2017-11-19 13:07:31 UTC
So the issue is inherited from OOo, though earlier versions didnt have the changed saved icon, but closing the document will then ask to save changes. Assume the issue boys down to fields being update on opening.

@Dieter: The DOCX-Opening meta tag is for docx files that arent able to open, not bugs that have a bug in them after opening.
Comment 19 QA Administrators 2018-11-20 03:43:06 UTC Comment hidden (obsolete)
Comment 20 NISZ LibreOffice Team 2020-11-26 14:20:39 UTC
Still a problem in:

Version: 7.2.0.0.alpha0+ (x64)
Build ID: cb084f475db33a2cfc62bc9c8de37b8c3c87b3c7
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL