Bug 125916 - FILEOPEN DOCX Numbering restarts on deleted paragraph
Summary: FILEOPEN DOCX Numbering restarts on deleted paragraph
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.4.0 target:6.3.0.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks: DOCX-Track-Changes
  Show dependency treegraph
 
Reported: 2019-06-14 08:54 UTC by NISZ LibreOffice Team
Modified: 2019-06-25 15:34 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the original document side by side in Word and Writer (120.06 KB, image/png)
2019-06-14 08:55 UTC, NISZ LibreOffice Team
Details
Example file from Word (39.62 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-06-14 08:56 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2019-06-14 08:54:03 UTC
Description:
Attached user document has numbered headings, some of which are marked as deleted entirely by Word.
In current master the numbering restarts at the first deleted numbered paragraph.

Steps to Reproduce:
1. Open attached document
2. Notice that in Word the Heading paragraphs are numbered as 1 2 3 with the second and third deleted, while in Writer the numbering restarts at the second as: 1 1 2.

Actual Results:
Accepting all changes in Word results in 6 numbered headings, while in Writer it results in 7, with an empty first paragraph appearing.
Rejecting all changes in Word results in 7 numbered headings, while in Writer it results in 8.

Expected Results:
Numbering matches the one seen in Word on open/accept all/reject all.


Reproducible: Always


User Profile Reset: No



Additional Info:
LibreOffice details:
Version: 6.4.0.0.alpha0+ (x86)
Build ID: 2dc6bdd1d5789ace0500cad90f5d2eb930888bb9
CPU threads: 4; OS: Windows 6.3; UI render: GL; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-06-12_23:41:00
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: threaded

Bibisected to: 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=8acc15b5113c798ecdbeed91456a92e7b0c1334e


author	László Németh <nemeth@numbertext.org>	2019-05-08 19:00:18 +0200
committer	László Németh <nemeth@numbertext.org>	2019-05-15 08:18:17 +0200

tdf#118699 DOCX import: don't add numbering
Comment 1 NISZ LibreOffice Team 2019-06-14 08:55:28 UTC
Created attachment 152184 [details]
Screenshot of the original document side by side in Word and Writer
Comment 2 NISZ LibreOffice Team 2019-06-14 08:56:05 UTC
Created attachment 152185 [details]
Example file from Word
Comment 3 Xisco Faulí 2019-06-14 10:28:23 UTC
Reproduced in

Version: 6.4.0.0.alpha0+
Build ID: af37bb23f63b209af1193e20177c3aacbd777543
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 4 Commit Notification 2019-06-17 07:31:29 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

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

tdf#125916 DOCX import: fix outline numbering at tracked deletion

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 5 László Németh 2019-06-17 07:32:32 UTC
Fixed in master. Full commit description:

"tdf#125916 DOCX import: fix outline numbering at tracked deletion

Now there is no extra header after import (fixed regression from the commit  8acc15b5113c798ecdbeed91456a92e7b0c1334e "tdf#118699 DOCX import: don't add 
numbering") and the actual outline numbering is stable during the next export/import cycles (losing correct numbering is the original bug of
DOCX import with change tracking)."
Comment 6 Commit Notification 2019-06-18 12:07:56 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

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

tdf#125916 DOCX import: fix outline numbering at tracked deletion

It will be available in 6.3.0.1.

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 Xisco Faulí 2019-06-25 15:34:16 UTC
Verified in

Version: 6.4.0.0.alpha0+
Build ID: 52800731baf9fcb88e54d60de5585640c8f97f7b
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: x11; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@László Németh, thanks for fixing this issue!