Bug 151296

Summary: FILESAVE: Table new cell contents are not saved if empty
Product: LibreOffice Reporter: Giuseppe Musumeci <giuseppemusumeci>
Component: DrawAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: buzea.bogdan, giuseppemusumeci, miguelangelrv, telesto
Priority: medium    
Version: 7.3.6.2 release   
Hardware: x86-64 (AMD64)   
OS: Windows (All)   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 100366    
Attachments: Reproduction case

Description Giuseppe Musumeci 2022-10-03 06:42:16 UTC
Created attachment 182801 [details]
Reproduction case

When a table cell contents get erased (by deleting the text in it), it seems the change is not persisted to file. After saving and reloading, the old text is there again. If instead of deleting the cell text completely one leaves e.g. a space, the "space" is instead saved correctly. This points to a bug in the logic that decides whether the document model needs updating or not (but I'm just speculating here).

To reproduce:
- open the attached "calendar - repro.odg"
- select Page 4 -> Table 8
- press F2 to edit text (there are overlapping tables, clicking on text is tricky)
- delete all the text in day 20 "Eyebrows' bank holiday"
- save
- close and re-open (or simply File -> Reload)
Ta-da! The old text is still there in Page 4 :-(

The bug "works" also on any other table in each page. The only "different" things about these tables is that they have been originally copy-pasted from a master page, if that could matter at all.

Thanks,
Giuseppe
Comment 1 Timur 2022-10-03 13:10:34 UTC
I reproduced the problem and set New, unless someone explains why this may not be a bug.
Comment 2 m_a_riosv 2022-10-03 13:18:23 UTC
repro wuth
Version: 7.4.2.1 (x64) / LibreOffice Community
Build ID: 681d65acd9ede00dd724d6716f21cabfdcc95bd2
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL
Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: c3b5eea4304ad6815b491f549fce008a9630c213
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded

But the issue doesn't happen clicking on other cell.