Bug 151719 - FILEOPEN DOCX: text highlight starts too early (in list item)
Summary: FILEOPEN DOCX: text highlight starts too early (in list item)
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: DOCX-Bullet-Number-Outline-Lists Highlight-Color
  Show dependency treegraph
 
Reported: 2022-10-23 19:12 UTC by Gerald Pfeifer
Modified: 2024-03-29 17:22 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample document in DOCX format (19.33 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2022-10-23 19:12 UTC, Gerald Pfeifer
Details
Visual comparison Office 365 (left) vs LibreOffice Writer (right) (141.96 KB, image/png)
2022-10-23 19:13 UTC, Gerald Pfeifer
Details
wronghighlight5_office365.pdf: Hmm, the pdf export looks the same as LO (103.04 KB, application/pdf)
2024-03-28 18:55 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Pfeifer 2022-10-23 19:12:09 UTC
Created attachment 183223 [details]
Sample document in DOCX format

This sample document features some text highlighted with yellow background
color.

It generally renders fine in LibreOffice, except the first highlighted
segment starts to early - with the bullet of a list item and the blank
space until the actual text of that item instead of just the actual text.


Seen with

  Version: 7.5.0.0.alpha0+ / LibreOffice Community
  Build ID: 4d9b83a417bbde8148b67d2ab0abe9f4ae285276
  CPU threads: 8; OS: Linux 6.0; UI render: default; VCL: gtk3
  Locale: en-US (en_US.UTF-8); UI: en-US

  ... and all the way back to ...

  Version: 7.0.7.0.0+
  Build ID: 54e9dd41dc9dd45af12c9346199f601ea4a5994d
  CPU threads: 8; OS: Linux 6.0; UI render: default; VCL: gtk3
  Locale: en-US (en_US.UTF-8); UI: en-US
  TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:libreoffice-7-0, Time: 2021-05-07_08:22:18

NOT SEEN with:

  Version: 6.4.8.0.0+
  Build ID: 99b065ec31d032fc08ab14f66430dac4fef904a5
  CPU threads: 8; OS: Linux 6.0; UI render: default; VCL: gtk3; 
  TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:libreoffice-6-4, Time: 2020-10-08_08:57:08
  Locale: en-US (en_US.UTF-8); UI-Language: en-US

So looks like a regression.
Comment 1 Gerald Pfeifer 2022-10-23 19:13:01 UTC
Created attachment 183224 [details]
Visual comparison Office 365 (left) vs LibreOffice Writer (right)
Comment 2 raal 2022-11-02 22:25:53 UTC
Confirm with Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: cfc8a8f5d841b3f84d207196153be67da7f60652
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
Comment 3 raal 2022-11-02 22:36:47 UTC
This seems to have begun at the below commit.
Adding Cc: to László Németh; Could you possibly take a look at this one?
Thanks
 9a2ae5cc01d80094a808a32b0f5fcc2022308d47 is the first bad commit
commit 9a2ae5cc01d80094a808a32b0f5fcc2022308d47
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Thu Apr 30 09:52:51 2020 +0200

    source 315d56582f8a56d8f2d3ea6cda63ea4832249608

https://git.libreoffice.org/core/+/315d56582f8a56d8f2d3ea6cda63ea4832249608
Comment 4 Justin L 2024-03-28 18:55:06 UTC
Created attachment 193376 [details]
wronghighlight5_office365.pdf: Hmm, the pdf export looks the same as LO

Congratulations - you found an (web) o365 bug.
MSOs desktop versions (2010 and 2019) as well as o365's PDF look the same as LO.

<w:p>
  <w:pPr>
    <w:pStyle w:val="ListParagraph"/>
    <w:rPr>
      <w:highlight w:val="yellow"/>
    </w:rPr>
  </w:pPr>

From the comments in the LO code, paragraph property highlights ARE supposed to be applied to the list numbering - only w:shd is not to be applied.
Comment 5 Gerald Pfeifer 2024-03-29 17:22:38 UTC
Cool, thank you for digging into this, Justin!

I now played around a bit, creating documents here (Writer as ODP and
DOCX) and there (Office 365/web) and could not create any divergence
beyond the one reported here.

On the original document Office 365/web is still different which,
according to your findings, is their bug, not ours. :-)