Bug 150149

Summary: Repeated heading does not save consistently in a section with columns
Product: LibreOffice Reporter: Mike Kaganski <mikekaganski>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: VERIFIED FIXED    
Severity: normal CC: buzea.bogdan, nemeth, page74010-sf, pascal.becker, stephane.guillou
Priority: medium Keywords: bisected, regression
Version: 7.0.0.3 release   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=88496
https://bugs.documentfoundation.org/show_bug.cgi?id=154085
Whiteboard: target:7.6.0 target:7.5.4 target:7.4.7
Crash report or crash signature: Regression By: László Németh
Bug Depends on:    
Bug Blocks: 103100    
Attachments: A table inside a 3-column balancing section

Description Mike Kaganski 2022-07-26 09:28:26 UTC
Created attachment 181416 [details]
A table inside a 3-column balancing section

The sample was created anew: I added a 3-column section (without changing anything else), and inserted there a 3-column 15-row table. I added text to the table's first row, and then in the table's properties, set it to repeat 1-row heading.

That last action failed. Upon immediate reopen of the table properties dialog, the "repeat" was unchecked again.

Then I removed two rows from the table, and applied "repeat heading" again. This time, it worked. Saving and reloading also kept the heading repeated.

I added two rows again. Then I saved and reloaded. And the "repeat heading" got lost this time.

Tested using Version: 7.4.0.1 (x64) / LibreOffice Community
Build ID: 43e5fcfbbadd18fccee5a6f42ddd533e40151bcf
CPU threads: 12; OS: Windows 10.0 Build 19044; UI render: default; VCL: win
Locale: en-US (ru_RU); UI: en-US
Calc: CL
Comment 1 Mike Kaganski 2022-07-26 09:44:43 UTC
Regression after commit f7e071a00542c414a7e9d7bcf4434d908f225e59
  Author László Németh <nemeth@numbertext.org>
  Date   Thu Jan 16 21:14:45 2020 +0100
    tdf#88496 DOCX: disable long repeating table header

Resetting RowsToRepeat happens in SwTabFrame::Split.

Remove two rows in the attachment 181416 [details], set the table to repeat 1 row, put a breakpoint at the call to m_pTable->SetRowsToRepeat(0) introduced by that commit, and start adding rows to the table.
Comment 2 Stéphane Guillou (stragu) 2023-01-21 08:22:29 UTC
Setting earliest affected version based on first bad commit.

Not reproduced in:

Version: 6.4.7.2
Build ID: 639b8ac485750d5696d7590a72ef1b496725cfb5
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3; 
Locale: en-AU (en_AU.UTF-8); UI-Language: en-US
Calc: threaded

Reproduced in:

Version: 7.0.6.2
Build ID: 144abb84a525d8e30c9dbbefa69cbbf2d8d4ae3b
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Bug 153126 has slightly different symptoms bug most likely comes from the same regression.
Comment 3 BogdanB 2023-01-21 20:07:15 UTC
I tested the bug in dbg version and I get this messages:

warn:sfx.dialog:176317:176317:sfx2/source/dialog/filtergrouping.cxx:359: already have an element for WordPerfect
warn:sfx.dialog:176317:176317:sfx2/source/dialog/filtergrouping.cxx:359: already have an element for writerweb8_writer_template
warn:sfx.dialog:176317:176317:sfx2/source/dialog/filtergrouping.cxx:359: already have an element for writerglobal8
warn:svl.items:176317:176317:svl/source/items/itempool.cxx:442: old secondary pool: EditEngineItemPool of pool: XOutdevItemPool must be empty.
warn:svl.items:176317:176317:svl/source/items/itempool.cxx:442: old secondary pool: EditEngineItemPool of pool: XOutdevItemPool must be empty.
warn:svl.items:176317:176317:svl/source/items/itempool.cxx:442: old secondary pool: EditEngineItemPool of pool: XOutdevItemPool must be empty.
warn:svl.items:176317:176317:svl/source/items/itempool.cxx:442: old secondary pool: EditEngineItemPool of pool: XOutdevItemPool must be empty.
warn:svl.items:176317:176317:svl/source/items/itempool.cxx:442: old secondary pool: EditEngineItemPool of pool: XOutdevItemPool must be empty.
warn:legacy.osl:176317:176317:xmloff/source/core/ProgressBarHelper.cxx:102: tried to set a wrong value on the progressbar
warn:svl.items:176317:176317:svl/source/items/itempool.cxx:442: old secondary pool: EditEngineItemPool of pool: XOutdevItemPool must be empty.
warn:svl.items:176317:176317:svl/source/items/itempool.cxx:442: old secondary pool: EditEngineItemPool of pool: XOutdevItemPool must be empty.
warn:svl.items:176317:176317:svl/source/items/itempool.cxx:442: old secondary pool: EditEngineItemPool of pool: XOutdevItemPool must be empty.
warn:svl.items:176317:176317:svl/source/items/itempool.cxx:442: old secondary pool: EditEngineItemPool of pool: XOutdevItemPool must be empty.
warn:svl.items:176317:176317:svl/source/items/itempool.cxx:442: old secondary pool: EditEngineItemPool of pool: XOutdevItemPool must be empty.
warn:legacy.osl:176317:176317:sw/source/core/layout/tabfrm.cxx:2750: debug assertion: <SwTabFrame::MakeAll()> - format of table lowers suppressed by fix i44910
warn:legacy.osl:176317:176317:sw/source/core/layout/tabfrm.cxx:2750: debug assertion: <SwTabFrame::MakeAll()> - format of table lowers suppressed by fix i44910
warn:legacy.osl:176317:176317:sw/source/core/layout/tabfrm.cxx:2750: debug assertion: <SwTabFrame::MakeAll()> - format of table lowers suppressed by fix i44910
warn:legacy.osl:176317:176317:sw/source/core/layout/tabfrm.cxx:2750: debug assertion: <SwTabFrame::MakeAll()> - format of table lowers suppressed by fix i44910
warn:legacy.osl:176317:176317:sw/source/core/layout/tabfrm.cxx:2750: debug assertion: <SwTabFrame::MakeAll()> - format of table lowers suppressed by fix i44910
warn:legacy.osl:176317:176317:sw/source/core/layout/wsfrm.cxx:1556: Negative reduction?
warn:legacy.osl:176317:176317:sw/source/core/layout/wsfrm.cxx:2842: nDist < 0
warn:legacy.osl:176317:176317:sw/source/core/layout/wsfrm.cxx:1556: Negative reduction?
warn:legacy.osl:176317:176317:sw/source/core/layout/wsfrm.cxx:2842: nDist < 0
warn:legacy.osl:176317:176317:sw/source/core/layout/tabfrm.cxx:2750: debug assertion: <SwTabFrame::MakeAll()> - format of table lowers suppressed by fix i44910
warn:legacy.osl:176317:176317:sw/source/core/layout/wsfrm.cxx:1556: Negative reduction?
warn:legacy.osl:176317:176317:sw/source/core/layout/wsfrm.cxx:2842: nDist < 0
warn:legacy.osl:176317:176317:sw/source/core/layout/wsfrm.cxx:1556: Negative reduction?
warn:legacy.osl:176317:176317:sw/source/core/layout/wsfrm.cxx:2842: nDist < 0
warn:legacy.osl:176317:176317:sw/source/core/layout/tabfrm.cxx:2750: debug assertion: <SwTabFrame::MakeAll()> - format of table lowers suppressed by fix i44910
warn:legacy.osl:176317:176317:sw/source/core/layout/wsfrm.cxx:1556: Negative reduction?
warn:legacy.osl:176317:176317:sw/source/core/layout/wsfrm.cxx:2842: nDist < 0
warn:legacy.osl:176317:176317:sw/source/core/layout/wsfrm.cxx:1556: Negative reduction?
warn:legacy.osl:176317:176317:sw/source/core/layout/wsfrm.cxx:2842: nDist < 0
warn:legacy.osl:176317:176317:sw/source/core/layout/tabfrm.cxx:2750: debug assertion: <SwTabFrame::MakeAll()> - format of table lowers suppressed by fix i44910
warn:svl.items:176317:176317:svl/source/items/itempool.cxx:442: old secondary pool: EditEngineItemPool of pool: XOutdevItemPool must be empty.
warn:svl.items:176317:176317:svl/source/items/itempool.cxx:442: old secondary pool: EditEngineItemPool of pool: XOutdevItemPool must be empty.
warn:svl.items:176317:176317:svl/source/items/itempool.cxx:442: old secondary pool: EditEngineItemPool of pool: XOutdevItemPool must be empty.
warn:svl.items:176317:176317:svl/source/items/itempool.cxx:442: old secondary pool: EditEngineItemPool of pool: XOutdevItemPool must be empty.
warn:svl.items:176317:176317:svl/source/items/itempool.cxx:442: old secondary pool: EditEngineItemPool of pool: XOutdevItemPool must be empty.
Comment 4 Stéphane Guillou (stragu) 2023-03-26 21:21:18 UTC
*** Bug 154085 has been marked as a duplicate of this bug. ***
Comment 5 Stéphane Guillou (stragu) 2023-03-26 21:26:50 UTC
*** Bug 153126 has been marked as a duplicate of this bug. ***
Comment 6 Commit Notification 2023-04-14 11:27:51 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a36fda0d7c70ffd344f9636ca436e77e41dc01f1

tdf#150149 sw: fix table header in multi-column sections

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 László Németh 2023-04-14 11:30:51 UTC
@Mike: thanks for the bug report!

@Stéphane, Bogdanb: thanks for your feedback!
Comment 8 Commit Notification 2023-04-17 06:55:45 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/a1f63eaa6810f9f8b0402b97938989ecf937346e

tdf#150149 sw: fix table header in multi-column sections

It will be available in 7.5.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2023-04-18 09:42:12 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/0f976c3b5608ec77dc3ad539e9a8d83b2e423a60

tdf#150149 sw: fix table header in multi-column sections

It will be available in 7.4.7.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 NISZ LibreOffice Team 2023-04-24 11:31:03 UTC
Verified in:
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 006b35d50024b1932d84380b5d2fec1f7066bccd
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL threaded