Bug 163757 - Writer: Toggle Formatting Marks breaks table with hidden text
Summary: Writer: Toggle Formatting Marks breaks table with hidden text
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.8.2.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.2.0 target:24.8.5
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Formatting-Mark
  Show dependency treegraph
 
Reported: 2024-11-04 09:11 UTC by Serg Bormant
Modified: 2025-01-10 15:54 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
source document (34.88 KB, application/vnd.oasis.opendocument.text)
2024-11-04 09:11 UTC, Serg Bormant
Details
good (137.59 KB, application/pdf)
2024-11-04 09:12 UTC, Serg Bormant
Details
Bad (138.41 KB, application/pdf)
2024-11-04 09:13 UTC, Serg Bormant
Details
table+hidden+emb.odt (866.54 KB, application/vnd.oasis.opendocument.text)
2024-11-06 09:23 UTC, Serg Bormant
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Serg Bormant 2024-11-04 09:11:21 UTC
Created attachment 197385 [details]
source document

LibreOffice 24.8.2, 24.2.5, 24.2.6, 24.2.7

0. Prereqs:
0.1. open Writer
0.2. ensure Tools - Options - LibreOffice Writer - Formatting Aids
     all check-boxes of Display Formatting section is ON
0.3. ensure View - Formatting Marks (Ctrl+F10) is OFF


1.1. open attached table+hidden.odt
checkpoint 1.1: table rows with No. 9-16, 18-19 are hidden, borders only are visible
as attached 24.2.4.2-table+hidden-Ok.pdf

1.2. File - Print Preview (Ctrl+CShift+O)
checkpoint 1.2: as checkpoint 1.1 above

1.3. File - Export as PDF
checkpoint 1.3: as checkpoint 1.1 above

1.4. Close Print Preview

2.1. toggle View - Formatting Marks (Ctrl+F10) to ON
2.2. toggle View - Formatting Marks (Ctrl+F10) to OFF

checkpoint 2.1: table rows with No. 9-16, 18-19 doesn't shrink back as in checkpoint 1.1,
and looks as attached 24.2.5.2-table+hidden-bad.pdf

2.3. the same for File - Print Preview (Ctrl+CShift+O)
2.4. the same for File - Export as PDF


Expected behavior:
as checkpoints 1.x.
Toggle Formatting Marks should return the document to its original form.
Comment 1 Serg Bormant 2024-11-04 09:12:44 UTC
Created attachment 197386 [details]
good
Comment 2 Serg Bormant 2024-11-04 09:13:24 UTC
Created attachment 197387 [details]
Bad
Comment 3 Serg Bormant 2024-11-04 09:15:59 UTC
The last version without bug is 24.2.4.2:

Version: 24.2.4.2 (X86_64) / LibreOffice Community
Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL threaded
Comment 4 Bryan Zanoli 2024-11-06 00:11:06 UTC
Attempted to recreate the issue and after toggling off Formatting Marks, table cells returned to hidden. I see you report this issue is found on multiple versions of Writer. Is this issue occurring on multiple systems? 

Issue tested on: 
Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 2; 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 5 Serg Bormant 2024-11-06 07:58:16 UTC
@Bryan Zanoli

This is the same system as in comment #3.

I installed 24.8.2, found the bug and some crashes.
Uninstall 24.8.2, install 24.2.7 and found the bug again.
Repeated until 24.2.4 which is Ok.
Comment 6 Serg Bormant 2024-11-06 09:02:24 UTC
Important Note
==============
install PT Sans font, for ex. from 
https://downloads.sourceforge.net/slackbuildsdirectlinks/ttf-paratype-pt-fonts/PTSansOFL.zip
or from paratype site:
https://www.paratype.ru/catalog/font/pt/pt-sans
or from  Google Fonts or any other location.


Explanation.

First I tried to reproduce the bug with Linux Mint 21.3 livecd for 24.8.2 and 24.2.7 and no success.
Then I noted font substitution for used in table "PT Sans" font.
I downloaded and copy to ~/.fonts *.ttf for "PT Sans" font and tried again with 24.2.7.

Voila! The bug is reproduced now.
Comment 7 Serg Bormant 2024-11-06 09:23:07 UTC
Created attachment 197431 [details]
table+hidden+emb.odt

Source document with embedded font "PT Sans"
Comment 8 Bryan Zanoli 2024-11-07 08:33:10 UTC
After downloading and installing font I repeated the steps and was able to reproduce the bug. I actually discovered that the additional font is not required. All that is required is selecting all table contents and changing the font (I selected Arial). Afterward, toggling between show formatting does reproduce the bug as you describe.
Comment 9 Serg Bormant 2025-01-10 11:20:09 UTC
 3c5f6d1fdf99183981ff385a12f4b15269cb366c is the first bad commit
commit 3c5f6d1fdf99183981ff385a12f4b15269cb366c
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Fri Jun 7 22:48:08 2024 -0700

    source fc1e6a64bd0517a7e67f08860c29b44d030220eb

    source fc1e6a64bd0517a7e67f08860c29b44d030220eb
Comment 10 Mike Kaganski 2025-01-10 11:49:39 UTC
Can't repro using Version: 25.2.0.1 (X86_64) / LibreOffice Community
Build ID: ddb2a7ea3a8857aae619555f1a8743e430e146c9
CPU threads: 24; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Vulkan; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL threaded
Comment 11 Serg Bormant 2025-01-10 12:53:37 UTC
(In reply to Mike Kaganski from comment #10)
> Can't repro using Version: 25.2.0.1 (X86_64) / LibreOffice Community
> Build ID: ddb2a7ea3a8857aae619555f1a8743e430e146c9

Same here.
Can't repro using

Version: 25.2.0.1.0+ (X86_64) / LibreOffice Community
Build ID: 5acb7648c3eff7371385df442a627768762a7aa6
CPU threads: 4; OS: Windows 10 X86_64 (10.0 build 19044); UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: threaded

Version: 25.2.0.1 (X86_64) / LibreOffice Community
Build ID: ddb2a7ea3a8857aae619555f1a8743e430e146c9
CPU threads: 4; OS: Windows 10 X86_64 (10.0 build 19044); UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: threaded
Comment 12 Serg Bormant 2025-01-10 13:09:36 UTC
Repro with 24.8.4:

Version: 24.8.4.2 (X86_64) / LibreOffice Community
Build ID: bb3cfa12c7b1bf994ecc5649a80400d06cd71002
CPU threads: 4; OS: Windows 10 X86_64 (10.0 build 19044); UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: threaded
Comment 13 Serg Bormant 2025-01-10 15:17:44 UTC
(In reply to Mike Kaganski from comment #10)
> Can't repro using Version: 25.2.0.1 (X86_64) / LibreOffice Community
> Build ID: ddb2a7ea3a8857aae619555f1a8743e430e146c9

Seems fixed here (found with bibisecting):
https://git.libreoffice.org/core/commit/0795698c1c82b4026a0f6acdfba5c6b93c8e1412

still reproduced a60f016a89787a818e868fbfa5b714853ff44a78 
  NOT reproduced 0795698c1c82b4026a0f6acdfba5c6b93c8e1412
Comment 14 Mike Kaganski 2025-01-10 15:43:40 UTC
Thanks - so RESOLVED FIXED.
Comment 15 Aron Budea 2025-01-10 15:54:20 UTC
The fix was also backported to 24.8 with https://gerrit.libreoffice.org/c/core/+/177559
Will be part of 24.8.5.