Bug 142003 - FILEOPEN Tracked changes in .doc file footnotes shift to the right
Summary: FILEOPEN Tracked changes in .doc file footnotes shift to the right
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
6.1.0.3 release
Hardware: All All
: high normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.3.0 target:7.1.6 target:7.2.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Footnote-Endnote DOC-Track-Changes
  Show dependency treegraph
 
Reported: 2021-04-30 21:04 UTC by tevery.best.sa
Modified: 2021-08-29 18:07 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file with the problem clearly visible. (13.00 KB, application/msword)
2021-04-30 21:11 UTC, tevery.best.sa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tevery.best.sa 2021-04-30 21:04:09 UTC
Description:
Whenever I save or open a .doc file, any tracked changes in footnotes shift two characters to the right: the first two characters of any deleted string are restored and the following two characters (whether new additions or present before) are removed; the first two characters of any added string are marked as accepted and the first two characters after the new string ends are marked as new additions. 

If the change is restricted to one character, the change markers are still shifted two characters to the right.

This seriously hinders tracking changes

Keywords: EDITING, FILESAVE

Steps to Reproduce:
1. Create a new file.
2. Add a footnote containing any amount of text.
3. Enable Track Changes. Introduce any changes to the footnote. DO NOT accept the changes.
4. Save the file as .doc.
5. Close the file.
6. Open the file again.

Actual Results:
Both the beginning and the ending of every change in the footnote was shifted two characters to the right.

Expected Results:
The changes stay where they were.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
I do not have an option to enable/disable OpenGL, but Skia is enabled.
Comment 1 tevery.best.sa 2021-04-30 21:11:08 UTC
Created attachment 171543 [details]
Example file with the problem clearly visible.
Comment 2 Dieter 2021-05-16 06:35:01 UTC
I confirm the problem and could reproduce it from scratch (but it only shifted one character to the right)

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 1675a68526c43c6c6e4dc850ee911f0c1de75c88
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL
Comment 3 Aron Budea 2021-08-15 02:15:15 UTC
This rather seems to be a FILEOPEN error to me, and is a regression, bibisected using repo bibisect-linux-64-6.1. In previous versions the document opens with the tracked changes showing over the correct pieces of text, even with a file made with a recent, buggy version. Adding CC: to Caolán McNamara.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=e71d05eaa9a8c9e628b256f3e889b85ac11ed474

Author:     Caolán McNamara <caolanm@redhat.com>
AuthorDate: Fri Apr 27 15:42:26 2018 +0100
Commit:     Caolán McNamara <caolanm@redhat.com>
CommitDate: Fri Apr 27 21:54:19 2018 +0200

    ofz#8038 defer subdocument redlining to end of parse like main document
Comment 4 Caolán McNamara 2021-08-17 07:40:41 UTC
probably offset by the number of characters for the number of the footnote which is presumably not adjusted for at the right place
Comment 5 Commit Notification 2021-08-17 10:45:59 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b5870d727685ec10447e8ae446ada895250fec2e

Resolves: tdf#142003 tracked changes in footnotes offset in .doc import

It will be available in 7.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 6 Caolán McNamara 2021-08-17 11:38:52 UTC
fixed in trunk, backports to 7-2 and 7-1 in gerrit
Comment 7 Commit Notification 2021-08-17 13:32:23 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1176c982d60b7e97ca063259326772495dbdde2c

Related: tdf#142003 add a test for this case

It will be available in 7.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 8 Commit Notification 2021-08-17 13:59:49 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/b888acd3c9b37c831b65c5d8aff98026046b2595

Resolves: tdf#142003 tracked changes in footnotes offset in .doc import

It will be available in 7.1.6.

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 9 Commit Notification 2021-08-17 14:00:04 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/029120999fed4f9aafc4fc74a3bc959be3e99c18

Resolves: tdf#142003 tracked changes in footnotes offset in .doc import

It will be available in 7.2.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 10 Dieter 2021-08-29 18:07:55 UTC
VERIFIED with

Version: 7.2.0.3 (x64) / LibreOffice Community
Build ID: 2a7ea282da28d665a7dc086360567b4aea27bf08
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: threaded

Caolán, thanks for fixing it!