Bug 118699 - FILEOPEN DOCX Accepting tracked changes has different result in LO Writer and MS Word in document with numbered paragraphs
Summary: FILEOPEN DOCX Accepting tracked changes has different result in LO Writer and...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.3.0 target:6.4.0
Keywords: filter:docx
: 121621 (view as bug list)
Depends on:
Blocks: DOCX-Track-Changes
  Show dependency treegraph
 
Reported: 2018-07-11 15:42 UTC by Gabor Kelemen (allotropia)
Modified: 2020-06-19 10:58 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
The document showcasing the issue described in the bugreport. (19.84 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-07-11 15:42 UTC, Gabor Kelemen (allotropia)
Details
Screenshot showing the document both in Word and Writer side by side before accepting the changes. (198.17 KB, image/png)
2018-07-11 15:42 UTC, Gabor Kelemen (allotropia)
Details
Screenshot showing the document both in Word and Writer side by side after accepting the changes. (174.06 KB, image/png)
2018-07-11 15:42 UTC, Gabor Kelemen (allotropia)
Details
Example document after accepting all changes in Word and Writer master (147.13 KB, image/png)
2019-08-09 08:18 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2018-07-11 15:42:07 UTC
Created attachment 143467 [details]
The document showcasing the issue described in the bugreport.

This is a track changed document with three numbered paragraphs and one regular paragraph in between the second and third paragraph. The document was originally created in Microsoft Word. If we accept all changes we get:
- 3 numbered paragraphs in Microsoft Word.
- 4 numbered paragraphs in LibreOffice Writer.


Steps to reproduce:
1.	Create a new document in Microsoft Word with three random paragraphs.
2.	Select all three paragraphs and turn on numbering.
3.	Add a new paragraph to the end of the second paragraph, and then remove the numbering by pressing backspace at the first character of the empty paragraph.
4.	Save the document as DOCX.
5.	Turn on change tracking.
6.	Select the second numbered paragraph by clicking on it three times. DO not select the empty, not numbered paragraph!
7.	Copy the selected paragraph to the clipboard: Ctrl+C
8.	Delete the selected paragraph by pressing the Del button – do not use Ctrl+X (cut), because that would trigger a different known bug!
9.	Move the cursor to the beginning of the originally third (now just second) numbered paragraph, and press Ctrl+V to paste the deleted paragraph from the clipboard. You should see two numbered paragraph beginning with “2.”, one deleted and one inserted.
10.	Save the document as DOCX, but do not close it yet.
11.	Create a copy of the DOCX file, and open it in LibreOffice Writer.
12.	Accept all changes both in Microsoft Word and LibreOffice Writer. Compare the resulting documents.

Actual results:
Accepting the tracked changes in results 3 numbered paragraphs in Microsoft Word, and 4 numbered paragraphs in LibreOffice Writer, the second being the empty, originally not numbered paragraph. The originally not numbered paragraph stays so in Microsoft Word.

Expected results:
Accepting the tracked changes in LibreOffice Writer should result a document consistent what we see in Microsoft Word.

LibreOffice details:
Version: 6.2.0.0.alpha0+
Build ID: bb1d5780226bb1b9156580972eea9aa849178742
CPU threads: 1; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-07-03_05:56:48
Locale: hu-HU (hu_HU); Calc: group threaded
Comment 1 Gabor Kelemen (allotropia) 2018-07-11 15:42:38 UTC
Created attachment 143468 [details]
Screenshot showing the document both in Word and Writer side by side before accepting the changes.
Comment 2 Gabor Kelemen (allotropia) 2018-07-11 15:42:55 UTC
Created attachment 143469 [details]
Screenshot showing the document both in Word and Writer side by side after accepting the changes.
Comment 3 Gabor Kelemen (allotropia) 2018-07-11 15:43:40 UTC
Setting to new, was found by a member of my team.
Comment 4 Commit Notification 2019-05-15 06:19:36 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/8acc15b5113c798ecdbeed91456a92e7b0c1334e%5E%21

tdf#118699 DOCX import: don't add numbering

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 5 László Németh 2019-05-15 08:28:58 UTC
*** Bug 121621 has been marked as a duplicate of this bug. ***
Comment 6 Commit Notification 2019-08-01 07:45:47 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

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

tdf#118699 change tracking: don't number empty lines

It will be available in 6.4.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 7 Commit Notification 2019-08-01 07:45:53 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/26c2cea1ab0efeb3ea641c335472e411dab2e928%5E%21

tdf#118699 change tracking: fix accept before empty line

It will be available in 6.4.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 8 Xisco Faulí 2019-08-02 12:52:23 UTC
The fix was reverted in https://gerrit.libreoffice.org/plugins/gitiles/core/+/1aac73a1fb260e4c76a483a68f003913fdd2c4bb, reopening...
Comment 9 Gabor Kelemen (allotropia) 2019-08-09 08:18:55 UTC
Created attachment 153253 [details]
Example document after accepting all changes in Word and Writer master

This seems to be fixed now in 

Version: 6.4.0.0.alpha0+ (x64)
Build ID: 3ab2df3cf755ecd0e3e31ad06872426d24222c31
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: CL
Comment 10 László Németh 2019-08-09 09:13:32 UTC
Fixed by the previous patch:

commit 26c2cea1ab0efeb3ea641c335472e411dab2e928	[log]
author	László Németh <nemeth@numbertext.org>	Fri Jul 26 15:02:50 2019 +0200
committer	László Németh <nemeth@numbertext.org>	Thu Aug 01 09:44:25 2019 +0200
tdf#118699 change tracking: fix accept before empty line
Comment 11 Commit Notification 2019-08-09 17:06:12 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#118699 sw_redlinehide: need some more changes to use the last node

It will be available in 6.4.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 2020-06-19 10:58:24 UTC
@Michael: many thanks for your help!