Bug 163332 - cell background color not repainted after cell edit when rectangle extends thru other cells
Summary: cell background color not repainted after cell edit when rectangle extends th...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.6.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Cell-Edit-Mode
  Show dependency treegraph
 
Reported: 2024-10-06 22:26 UTC by andrew.james.heard
Modified: 2024-11-20 06:48 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
#1 before cell edit (8.21 KB, image/jpeg)
2024-10-06 22:27 UTC, andrew.james.heard
Details
#2 during cell edit (9.14 KB, image/jpeg)
2024-10-06 22:28 UTC, andrew.james.heard
Details
#3 after cell edit (8.43 KB, image/jpeg)
2024-10-06 22:28 UTC, andrew.james.heard
Details
Minimal test case (10.82 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-10-07 19:43 UTC, Rafael Lima
Details
#4 after MinimalTest.ods A1 edit (19.22 KB, image/jpeg)
2024-10-07 21:00 UTC, andrew.james.heard
Details
#5 (10.66 KB, image/jpeg)
2024-11-18 22:34 UTC, andrew.james.heard
Details
#6 (11.90 KB, image/jpeg)
2024-11-20 06:48 UTC, andrew.james.heard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andrew.james.heard 2024-10-06 22:26:40 UTC
Description:
This bug was introduced in 24.2 with the new cell outline rectangle. It seemed obvious to me that others would report it, but it still exists in 24.8, so time to report. With left cell no background color and right cell having a background color eg. dark blue then edit the left cell where the rectangle extends into the right cell, after finishing the edit, the right cell background (dark blue) is not repainted.

Steps to Reproduce:
1. see 3 screen caps
2. left cell with no background color
3. right cell with any background color
4. have narrow left column & text that when edited will extend into the right cell eg. date/time with format DD/MM/YY HH:MM:SS
5. press F2
6. press Esc
7. observe that right cell background color is clear rather than the correct color

Actual Results:
*

Expected Results:
repaint the right cell background color


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 12; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: en-AU (en_AU); UI: en-GB
Calc: threaded
Comment 1 andrew.james.heard 2024-10-06 22:27:16 UTC
Created attachment 196939 [details]
#1 before cell edit
Comment 2 andrew.james.heard 2024-10-06 22:28:21 UTC
Created attachment 196940 [details]
#2 during cell edit

also note the 2 rows above have been edited and the right cell background colors are half white/ half dark blue
Comment 3 andrew.james.heard 2024-10-06 22:28:47 UTC
Created attachment 196941 [details]
#3 after cell edit
Comment 4 Rafael Lima 2024-10-07 19:43:17 UTC
Created attachment 196953 [details]
Minimal test case

I created a minimal test case to test this bug. Left cell without background color and right cell with background color.

However, I could not reproduce the bug with:

Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 12; OS: Linux 6.10; UI render: default; VCL: kf5 (cairo+wayland)
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: CL threaded

Please test this file. If this does not represent your case, please upload a new test file.
Comment 5 m_a_riosv 2024-10-07 20:10:54 UTC
I can't reproduce with minimal test case file.
Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 6 andrew.james.heard 2024-10-07 21:00:31 UTC
Thanks Rafael for testing. I *could* reproduce the issue with your test case. I took a while comparing my file with yours, and required more step(s) I hadn't realized.

open MinimalTest.ods
1. <f2><space><enter>

See attached #4 JPG - the right end of the right cell is not painted with the correct background where it overlapped the left cell. I think the secret was that you had to edit the cell, in my steps - pressing <space>.
Comment 7 andrew.james.heard 2024-10-07 21:00:53 UTC
Created attachment 196956 [details]
#4 after MinimalTest.ods A1 edit
Comment 8 Rafael Lima 2024-10-16 00:04:28 UTC
(In reply to andrew.james.heard from comment #7)
> Created attachment 196956 [details]
> #4 after MinimalTest.ods A1 edit

Using the minimal test case I could not reproduce the issue. In my case the cell is repainted using the steps provided:

In cell A1 <f2><space><enter>

Also in cell B1 <f2><space><enter>

Maybe this is Windows only?

I'm on kf6 cairo+wayland

Version: 24.2.6.2 (X86_64)
Build ID: 420(Build:2)
CPU threads: 12; OS: Linux 6.10; UI render: default; VCL: kf6 (cairo+wayland)
Locale: pt-BR (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 9 andrew.james.heard 2024-10-16 04:50:04 UTC
Not sure what else I can say. I've already said " I *could* reproduce the issue with *your* test case." on Windows11.
Comment 10 andrew.james.heard 2024-10-16 04:52:42 UTC
and with your test case MinimalTest.ods & yours steps. (doesn't seem I can edit a post once Saved ;-(
Comment 11 Bryan Zanoli 2024-11-17 01:40:42 UTC
Followed the steps provided with the attached file and could not reproduce the issue. This is on current version: 
Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 8; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 12 andrew.james.heard 2024-11-18 21:28:34 UTC
I updated to 24.8.3.2 - indeed appears to be fixed; well done! I've marked as FIXED - is that OK?
Comment 13 andrew.james.heard 2024-11-18 22:33:02 UTC
I was too eager to mark as fixed. Sorry. Not fixed. To reiterate: the important points of this bug:
1. the adjacent cell, horizontally to right, has a different background color to current cell
2. edit the current cell containing date/time, and the width of the cell when formatted is less than a full date/time DD/MM/YYYY HH:MM:SS
3. press F2, must edit in some way the contents, not just press Enter
3.1 important: note the editing boundary overlaps into the adjacent cell
4. the adjacent cell is repainted with background colors from the current & adjacent cells
Comment 14 andrew.james.heard 2024-11-18 22:34:13 UTC
Created attachment 197682 [details]
#5
Comment 15 andrew.james.heard 2024-11-18 22:34:32 UTC
I've attached screen cap #5.
Comment 16 Bryan Zanoli 2024-11-20 05:14:22 UTC
Performing the additional edit did result in some minor color formatting issues as you describe. Changing this to NEW, though it appears to have a simple work around on selecting the cell and allowing re-draw to occur (at least on my system). Setting to minor due to limited impact and simple workaround.
Comment 17 andrew.james.heard 2024-11-20 06:48:00 UTC
a more extreme example now I understand the issue better
column A formatted as DD/MM
however when edited it is displayed as DD/MM/YYYY HH:MM:SS
so the incorrect painting of the background color is spread far wider
3 cells edited in attachment #6 screencap
agree minor; I never said it was anything but; but the bug was introduced with v24.2
Comment 18 andrew.james.heard 2024-11-20 06:48:24 UTC
Created attachment 197696 [details]
#6