Bug 169142 - Cells with more than 1 line have red characters After commit #fa7ed3501e1ee47600b41985b7c5b7f60a6a8b29
Summary: Cells with more than 1 line have red characters After commit #fa7ed3501e1ee47...
Status: RESOLVED DUPLICATE of bug 169183
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
26.2.0.0 alpha0+ master
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Cell-Direct-Formatting-Parts
  Show dependency treegraph
 
Reported: 2025-10-30 06:57 UTC by Dan Graham
Modified: 2025-11-06 04:42 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
A screenshot showing calc after the commit with the red charaters (136.61 KB, image/png)
2025-10-30 06:57 UTC, Dan Graham
Details
This calc file has multi-line cells which show red characters in the buggy version (31.71 KB, application/vnd.oasis.opendocument.spreadsheet)
2025-11-01 03:24 UTC, Dan Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Graham 2025-10-30 06:57:07 UTC
Created attachment 203603 [details]
A screenshot showing calc after the commit with the red charaters

I'm trying to get into helping fix bugs in Libreoffice.  I built the latest 26.2.0.0 alpha on Oct 28th, and found that a spreadsheet I've been using for years had red characters in every cell with more than one line.  
I built on both Fedora fc43 and Pop!_Os(a derivative of Ubuntu 22.04), both show the same problem.  
  After tracking down which commit first show the red character, I looked briefly at the code in the newly committed file.  I don't know enough about LO internals to have any idea if the new code is bad, or if the new code reveals a longstanding bug. Sorry I can't be of much help here.

Git bisect gives the following 
-------------------------------------------
graham@dansdesk:~/programming/LO/bad_red_text_in_calc$ cat git.bisect.bad.txt  fa7ed3501e1ee47600b41985b7c5b7f60a6a8b29 is the first bad commit
commit fa7ed3501e1ee47600b41985b7c5b7f60a6a8b29
Author: Armin Le Grand (collabora) <Armin.LeGrand@collabora.com>
Date:   Thu Oct 23 18:35:55 2025 +0200

    tdf#167605 take ClipRegion at OutDev into account
    
    ImpEditEngine::DrawText_ToPosition has to take into account
    if a ClipRegion is set at the target OutputDevice when it
    renders using primitives, this is *not* automatically set
    or taken over when a PrimitiveProcessor is created for that
    target.
    
    This revealed a problem, see comments in
    editeng/source/editeng/impedit3.cxx for a detailed
    description.
    
    Change-Id: Ied2cf3f59d57099e616ebe9969c721f796b4b227
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192919
    Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
    Tested-by: Armin Le Grand <Armin.Le.Grand@me.com>

 editeng/source/editeng/impedit3.cxx | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)
-----------------------------------------------------------------------------
Comment 1 Roman Kuznetsov 2025-10-31 20:46:55 UTC
Dan, could you please add the file with the problem or say us how to get the problem from scratch?

Armin, I added you, because there is a bisect result in description
Comment 2 Dan Graham 2025-11-01 03:20:25 UTC
I can add a file that shows the problem, but it will be faster for a tester to just do the following.
1)Open a version of LO and create a new spreadsheet
2)Add one line of text to a cell (it will look normal)
3)In another cell, add text which has a line break (ctrl-return) in it
  If the version of LO is affected, the text will turn red.
Comment 3 Dan Graham 2025-11-01 03:24:36 UTC
Created attachment 203651 [details]
This calc file has multi-line cells which show red characters in the buggy version

A file showing the red-characters in the buggy LO after commit fa73d35...
Comment 4 raal 2025-11-01 08:08:12 UTC
I can confirm with Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c7b3ea692f293346fbbdf2a391d9d971c34fa1f2
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
Comment 5 Takenori Yasuda 2025-11-06 04:42:59 UTC
This bug shares the same root commit as Bug 169183, and one of the issues described in Bug 169183 is identical to this one.

Therefore, based on this inclusion relationship, this bug will be marked as a duplicate of Bug 169183.

*** This bug has been marked as a duplicate of bug 169183 ***