Bug 105444 - Extra blank lines inserted at end of Comments in DOCX on save when text added in document before comment (steps in Comment 8)
Summary: Extra blank lines inserted at end of Comments in DOCX on save when text added...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: All All
: low minor
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords: bibisectRequest, filter:docx, regression
Depends on:
Blocks: DOCX-Comments
  Show dependency treegraph
 
Reported: 2017-01-20 00:17 UTC by pcunger
Modified: 2017-10-05 21:40 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (4.87 KB, application/wps-office.docx)
2017-01-21 19:33 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pcunger 2017-01-20 00:17:18 UTC
Writer adds an extra (and eventually, multiple extra) lines at the end of Comments. I know this is a problem when saving in Microsoft Word format (Save As -> Microsoft Word 2007-2013 XML (.docx)).
To reproduce:
1. Insert a Comment (Ctrl + Alt + C)
2. Type text
3. Save as MS Word XML
4. Close file
5. Open file and observe a new line after the text typed in the Comment box

Sometimes there are three or four extra lines at the end (from multiple Save -> Close -> Open cycles?). This becomes a problem when there are multiple Comments on one page and they get scrunched to accommodate them in the available space. If extra lines were not added, some scrunching would not be necessary.
Comment 1 Kevin Suo 2017-01-20 02:09:52 UTC
Do not reproduce under linux
Ubuntu 16.04 LTS X64

Version: 5.2.4.2
Build ID: 3d5603e1122f0f102b62521720ab13a38a4e0eb0
CPU Threads: 4; OS Version: Linux 4.4; UI Render: default; VCL: gtk2; 
Locale: zh-CN (zh_CN.UTF-8); Calc: group
Comment 2 Timur 2017-01-20 19:07:07 UTC Comment hidden (obsolete)
Comment 3 pcunger 2017-01-20 21:07:39 UTC
(In reply to Timur from comment #2)
> Which version did you test with and on which OS?
> There was Bug 85523 but it was fixed.

See above. Version 5.2.4.2 (release) for Windows (I'm using 7).
Comment 4 Telesto 2017-01-20 22:15:23 UTC
Repro with:
Version: 5.4.0.0.alpha0+
Build ID: 99eed82939999d9a9689788a4134dd05d5c20c5a
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-01-14_23:37:40
Locale: nl-NL (nl_NL); Calc: CL

A new line gets added with every save to docx
Comment 5 Telesto 2017-01-20 22:28:48 UTC
Also found in:
Versie: 4.2.0.4 
Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71

but not in
Versie: 4.1.0.4 
Build ID: 89ea49ddacd9aa532507cbf852f2bb22b1ace28

Steps to reproduce
1. Insert a Comment (Ctrl + Alt + C)
2. Type text
3. Save as MS Word XML
4. File -> Reload 
5. A a letter to the comment
6. Save again
7. File -> Reload
Comment 6 pcunger 2017-01-21 03:32:43 UTC Comment hidden (no-value)
Comment 7 Julien Nabet 2017-01-21 09:13:27 UTC Comment hidden (obsolete)
Comment 8 Telesto 2017-01-21 19:33:24 UTC
Created attachment 130600 [details]
Example file

1. Open attached file
2. Make a change to the main document (for example add 'C' after B)
3. Save the file (CTRL+S)
4. Reload the file (File -> reload). Comment will grow with one row.

It could be Win only.
Comment 9 pcunger 2017-01-21 19:39:50 UTC
Behaviour confirmed. I now count 7 empty lines after A in the Comment. There were 6 in the original.
Comment 10 Julien Nabet 2017-01-22 13:53:36 UTC
(In reply to Telesto from comment #8)
> Created attachment 130600 [details]
> Example file
> 
> 1. Open attached file
> 2. Make a change to the main document (for example add 'C' after B)
> 3. Save the file (CTRL+S)
> 4. Reload the file (File -> reload). Comment will grow with one row.
> 
> It could be Win only.

Thank you for the demo file and step by step process; I could reproduce this with master sources updated 2 days ago.
Comment 11 raal 2017-05-13 21:01:39 UTC Comment hidden (obsolete)
Comment 12 Telesto 2017-05-14 09:02:50 UTC
(In reply to raal from comment #11)
> As per today, this regression can't be bibisected as it was introduced
> before 4.4 branch and there's no bibisect repository for the affected
> branch, thus change 'bibisectRequest' to 'preBibisect'

I'm re-adding bibisectRequest, because it's not a Windows only bug. Bibisecting should be possible.