Bug 140506 - REGRESSION Setting to repeat heading in writer tables no longer works
Summary: REGRESSION Setting to repeat heading in writer tables no longer works
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.3 release
Hardware: All All
: highest major
Assignee: Björn Michaelsen
URL:
Whiteboard: target:7.3.0 target:7.2.0.0.beta2 tar...
Keywords: bibisected, bisected, regression
: 140827 142330 142474 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-02-18 13:20 UTC by Nikos
Modified: 2021-09-12 20:13 UTC (History)
11 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikos 2021-02-18 13:20:08 UTC
Description:
Setting to repeat heading in writer tables no longer works

Steps to Reproduce:
1.Insert a table into a newly created odt file spanning over more than one page
2.Add a heading
2.Right click into the table - select table properties
3.Choose repeat heading 1st row

Actual Results:
Nothing

Expected Results:
Heading should repeat in the second page


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Version: 7.1.0.3 / LibreOffice Community
Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c
CPU threads: 12; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: el-GR (el_GR.UTF-8); UI: en-US
Flatpak
Calc: threaded
Comment 1 Timur 2021-02-19 11:08:40 UTC
please clarify if you mark Insert Heading when you create a table? 
or you somehow make it later, how?
Comment 2 Timur 2021-02-19 12:37:08 UTC
OK, I found steps. @reporter: it's important that you write all the details, so that we don't loose time on guessing.

0.Open new ODT
1.Table-Insert, spanning over more than one page (ex. 60 rows), mark Heading, unmark Repeat..
2.Add some heading text (ex. h) and see that you don't see in on 2nd page
2.Right click into the table - select Table Properties
3.Choose Repeat Heading 1st row

I confirm with those steps in LO 7.2+, both Windows and Linux, regression from 7.1.
Note that save and reopen rectifies this, so minor issue.

No problem if Repeat.. is marked when creating the table.

Bibisect 7.1 Linux:
commit 0bcdeefb5ed2399af63286c30298802513e6c58c
Date:   Tue Nov 3 00:47:07 2020 +0100
    source f899c28f210c6565b7227d7665d449f194d2af8e
    previous source 587b8eb1d0c7959967299ebfcd03c52dc4b1cab4
author
Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>

2020-11-02 19:56:16 +0100
ndtbl: remove remaining use of ModifyNotification
Comment 3 Nikos 2021-02-19 15:42:55 UTC
I never new you can select insert heading when creating the table...and indeed if you do, the problem does not arise in 7.1.

Nonetheless, prior to 7.1 you did not have to specify that the first row is a heading when creating the table. So, I actually refer to a regression between 7.1 and prior versions and not 7.2 and 7.1.
Comment 4 Nikos 2021-04-06 08:26:14 UTC
As it is now, it is impossible to add a heading to an existing table. Considering that when you use insert table over a tab separated lit of words, calc defaults to not using a heading, does anybody have a workaround for this..until it gets properly fixed?
Comment 5 Xisco Faulí 2021-04-06 09:37:56 UTC
(In reply to Timur from comment #2)
> OK, I found steps. @reporter: it's important that you write all the details,
> so that we don't loose time on guessing.
> 
> 0.Open new ODT
> 1.Table-Insert, spanning over more than one page (ex. 60 rows), mark
> Heading, unmark Repeat..
> 2.Add some heading text (ex. h) and see that you don't see in on 2nd page
> 2.Right click into the table - select Table Properties
> 3.Choose Repeat Heading 1st row
> 
> I confirm with those steps in LO 7.2+, both Windows and Linux, regression
> from 7.1.
> Note that save and reopen rectifies this, so minor issue.
> 
> No problem if Repeat.. is marked when creating the table.
> 
> Bibisect 7.1 Linux:
> commit 0bcdeefb5ed2399af63286c30298802513e6c58c
> Date:   Tue Nov 3 00:47:07 2020 +0100
>     source f899c28f210c6565b7227d7665d449f194d2af8e
>     previous source 587b8eb1d0c7959967299ebfcd03c52dc4b1cab4
> author
> Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
> 
> 2020-11-02 19:56:16 +0100
> ndtbl: remove remaining use of ModifyNotification


I do confirm the issue started to hapeen after the mentioned commit.

@Björn, could you please take a look at this issue ?
Comment 6 Timur 2021-05-06 13:42:52 UTC
*** Bug 140827 has been marked as a duplicate of this bug. ***
Comment 7 Timur 2021-05-06 13:43:22 UTC
*** Bug 142107 has been marked as a duplicate of this bug. ***
Comment 8 Timur 2021-05-17 13:49:50 UTC Comment hidden (obsolete)
Comment 9 Xisco Faulí 2021-05-17 15:57:18 UTC
(In reply to Timur from comment #8)
> For regression bugs, I'd like to see a revert in 7.1.6 if not resolved by
> 7.1.5.

Not so trivial at this point, git revert f899c28f210c6565b7227d7665d449f194d2af8e no longer works and the build fails with

/home/xisco/libreoffice/sw/source/core/docnode/ndtbl.cxx:2909:30: error: ‘class SwTableFormat’ has no member named ‘ModifyNotification’
     rTable.GetFrameFormat()->ModifyNotification( &aChg, &aChg );
                              ^~~~~~~~~~~~~~~~~~
make[1]: *** [/home/xisco/libreoffice/solenv/gbuild/LinkTarget.mk:301: /home/xisco/libreoffice/workdir/CxxObject/sw/source/core/docnode/ndtbl.o] Error 1
make: *** [Makefile:122: sw.build] Error 2
Comment 10 Timur 2021-05-18 11:37:16 UTC
*** Bug 142330 has been marked as a duplicate of this bug. ***
Comment 11 Xisco Faulí 2021-05-20 14:16:18 UTC
Let's bumped the priority to highest
Comment 12 Timur 2021-05-20 15:22:33 UTC
As a regression that's visible to users, it's highest, but it's not critical because save and reopen will fix it, or header can be created with table.
Comment 13 Timur 2021-05-25 08:47:54 UTC
*** Bug 142474 has been marked as a duplicate of this bug. ***
Comment 14 Alon 2021-06-16 09:02:10 UTC Comment hidden (no-value)
Comment 15 Björn Michaelsen 2021-07-01 21:21:41 UTC
The problem is the ModifyNotification that was called on the frame didnt notify the observers of the frame as an observer pattern should, but instead used to force fed the hint down the throat of the message handler of the frame itself.

Of course to do that, no fancy messaging is needed at all. I think I will provide a patch this weekend.
Comment 16 Björn Michaelsen 2021-07-04 11:15:40 UTC
https://gerrit.libreoffice.org/c/core/+/118370
Comment 17 Commit Notification 2021-07-05 10:10:48 UTC
Bjoern Michaelsen committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/25e09087d8e2c5cecca1d548c69a263c7bf8b7ca

tdf#140506: fix repeated table header switching

It will be available in 7.3.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 18 Commit Notification 2021-07-05 12:12:44 UTC
Bjoern Michaelsen committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

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

tdf#140506: fix repeated table header switching

It will be available in 7.1.6.

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 19 Commit Notification 2021-07-05 13:42:06 UTC
Bjoern Michaelsen committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/3d98d35cfab126764ae5a35cee0a4da56baab648

tdf#140506: fix repeated table header switching

It will be available in 7.2.0.0.beta2.

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 20 Timur 2021-07-06 14:04:01 UTC
Thanks for timely fix so that 7.1 is Ok.
Comment 21 Commit Notification 2021-07-07 07:09:24 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#140506: sw: Add UItest

It will be available in 7.3.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 22 Commit Notification 2021-07-12 09:50:00 UTC
Bjoern Michaelsen committed a patch related to this issue.
It has been pushed to "libreoffice-7-1-5":

https://git.libreoffice.org/core/commit/8d894294fa4cb006d1ddca846f8e44ed2b57d063

tdf#140506: fix repeated table header switching

It will be available in 7.1.5.

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 23 BogdanB 2021-07-27 13:26:51 UTC
Thanks for fixing this.

Verified in
Version: 7.1.5.2 (x64) / LibreOffice Community
Build ID: 85f04e9f809797b8199d13c421bd8a2b025d52b5
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: ro-RO (ro_RO); UI: en-US
Calc: threaded
Comment 24 Mehmet gelisin 2021-09-11 13:04:09 UTC Comment hidden (spam)