Bug 124904 - 'Reference' to headings does not have strike-through when modified with 'track changes' shown
Summary: 'Reference' to headings does not have strike-through when modified with 'trac...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.3.0
Keywords:
Depends on:
Blocks: Track-Changes Fields-Cross-Reference
  Show dependency treegraph
 
Reported: 2019-04-23 11:40 UTC by Mohith Manoj
Modified: 2021-11-15 07:45 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Reference to modified heading (21.97 KB, image/jpeg)
2019-04-23 11:40 UTC, Mohith Manoj
Details
Example that shows the bug (9.68 KB, application/vnd.oasis.opendocument.text)
2019-06-08 10:52 UTC, Dieter
Details
screenshot of the fix (116.38 KB, image/png)
2021-11-09 19:39 UTC, László Németh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mohith Manoj 2019-04-23 11:40:52 UTC
Created attachment 150942 [details]
Reference to modified heading

With track changes option set to show the changes, when a heading is modified and a reference to that heading is inserted anywhere in the document, the reference carries the full text (removed as well as inserted) while the heading itself is shown with the removed text formatted with a strike-through. Please see attachment for details.

The attachment is a snip from the document where heading 2.5.41 is modified from 'Audio language name' to 'Display language name'. In the heading the Audio is formatted with a strike-through (as expected). However in the line below where a reference to this heading is added, the word 'Audio' does not carry the strike-through making the reference look like 'AudioDisplay Language Name'!

Version: 6.2.3.2 (x64)
Build ID: aecc05fe267cc68dde00352a451aa867b3b546ac
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 1 Dieter 2019-06-08 10:52:34 UTC
Created attachment 152046 [details]
Example that shows the bug

I can confirm it with

Version: 6.4.0.0.alpha0+ (x64)
Build ID: b170256fb6ebaf774b02b89835b19d9f3a1afb89
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-06-07_03:30:35
Locale: en-US (de_DE); UI-Language: en-US
Calc: threaded

Update field has no effect.
Perhaps it's a morge general issue with fields and track changes, but I haven't checked this.
Comment 2 Xisco Faulí 2019-06-11 10:09:39 UTC
Also reproduced in

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)

@Lazlo, I thought you might be interested in this issue...
Comment 3 Dieter 2021-11-07 10:39:56 UTC
Still present in

Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 273a25c796fca9afa0dfadac57dc3f336831221c
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

@Lazlo, you did some work on track changes recently. Any ideas about fields and view changes?
Comment 4 Commit Notification 2021-11-09 19:14:52 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/83490dc97ca76c64a7d46839f4dbb8b1610f169f

tdf#124904 sw: don't show deletions in referenced text

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 5 László Németh 2021-11-09 19:39:25 UTC
Created attachment 176172 [details]
screenshot of the fix
Comment 6 László Németh 2021-11-09 19:40:33 UTC
tdf#124904 sw: don't show deletions in referenced text

In fields, strikethrough/underline formatting of
track changes is not available. If the referenced
text of the fields contained partial deletions,
the field showed them as normal text, e.g. mixing up
the text of a heading with its removed typos.

Now these deleted parts are removed, except in the
following case: if the referenced text was completely
removed, show the whole deleted text in the reference
field, adding strikethrough to its tooltip text to help
the review process.

Note: this allows to handle both use cases, i.e. when
only a small part of a heading was modified (e.g. removing
typos), and 2) removing whole chapters with headings,
where the fields in the deleted text are more readable
with the text of the deleted headings, showing the
original text content.

See also commit daf2a7d957c829c551754871a3545495c0f76bc0
"tdf#61154 sw Table of Contents: remove tracked deletion".
Comment 7 László Németh 2021-11-09 19:41:36 UTC
@Mohith Manoj: thanks for the report!

@Xisco, Dieter: thanks for your feedback!
Comment 8 Dieter 2021-11-09 19:44:41 UTC
Looks good. I will test it in master in a view days.
Comment 9 Dieter 2021-11-15 07:45:37 UTC
VERIFIED with

Version: 7.3.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 7b8f630db30ee0066a9f4b6e540368d2fcad7fa8
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Lásló, thank you for fixing it!