Bug 66145 - Turning off 'Same content on first page' does not reflect in UI
Summary: Turning off 'Same content on first page' does not reflect in UI
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: Other Linux (All)
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: BSA target:4.2.0 target:4.0.6 target:...
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-06-25 07:40 UTC by Adam CloudOn
Modified: 2020-07-24 15:53 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Reproducer document (9.01 KB, application/vnd.oasis.opendocument.text)
2013-08-05 16:35 UTC, Miklos Vajna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam CloudOn 2013-06-25 07:40:39 UTC
Problem description: 
When creating a new document in LO (or opening an existing one) - if you go to the 'Page Style' configuration, and go to the 'Header' tab and uncheck the 'Same content on first page' - you expect to be able to edit the first page's header different than other pages' headers. but in fact - they still edit together.
However, when saving the file and reopening it - you see different headers. so this is a UI bug.

THIS IS A REGRESSION BUG (it worked in version 4.0).

Steps to reproduce:
1. Open Writer (new document)
2. Make sure you have 3 pages at least.
3. Turn off 'Same content for first page' in the 'Header' configuration.
4. Edit the header of the 1st page (it will show in other pages too - bug).
5. Edit the header of the 2nd\3rd page (it will show in the header of the first page too - bug).

Current behavior:
After turning off 'same content on first page' - the headers of all pages are still 'linked' and edit together.

Expected behavior:
After turning off 'same content on first page' - the header of the 1st page should be independent from the headers of the rest of the pages.
              
Operating System: Ubuntu
Version: 4.2.0.0.alpha0+ Master
Last worked in: 4.0.0.1 rc
Comment 1 Adam CloudOn 2013-06-25 07:44:56 UTC
Here is the bibisect log:
 82f40a7baab8fa06ffaa3f9182542521d36da341 is the first bad commit
commit 82f40a7baab8fa06ffaa3f9182542521d36da341
Author: Jean-Baptiste Lallement <jean-baptiste.lallement@canonical.com>
Date:   Tue Feb 5 21:10:53 2013 +0000
 
    source-hash-323c5ee69d5814f8400c0af3038023df9336b59c
   
    commit 323c5ee69d5814f8400c0af3038023df9336b59c
    Author:     Takeshi Abe <tabe@fixedpoint.jp>
    AuthorDate: Thu Jan 3 12:26:28 2013 +0900
    Commit:     Takeshi Abe <tabe@fixedpoint.jp>
    CommitDate: Fri Jan 4 09:55:37 2013 +0900
   
        Drop undefined declarations
   
        Change-Id: Ib0940004ba6873fda5d3821521ab2f1127acc3f0
 
:100644 100644 19f4eb5574a4ed256585f1736cfb7a56ff7e6209 a9c674b3ca151cb2de131a09e65241ce064baff7 M      ccache.log
:100644 100644 ac633992bf8ef0ab852198063cf33880931d80a6 14210d16cfba9aff993b2976b66f480c1338b58b M      commitmsg
:100644 100644 544177410bdb43f25d6b474c2004f45262f0345b b63eb1c07edfe579366f73f91077c99438868274 M      dev-install.log
:100644 100644 fb9d76f751432ac9c3efff88766a5f5717a83afe 819e94dcecc55e9a08d69a71615539244ff9d593 M      make.log
:040000 040000 e77bb0ad21eed11a0db3888f65fefe75486b6add 5f4ad5875af0c3ccfd2132494c15b0e6015e1050 M      opt
 
 
 
 
================
GIT BISECT LOG
================
# bad: [68ce28f8d3ca05b1329580ed9f3e6ba0c82fbb26] source-hash-9f0f289c51765c671cbc8ef317c81e6fa42c6718
# good: [c57c26517852e6d0c4ea75775db98f6d9b93561d] root
git bisect start 'latest' 'oldest'
# bad: [82f40a7baab8fa06ffaa3f9182542521d36da341] source-hash-323c5ee69d5814f8400c0af3038023df9336b59c
git bisect bad 82f40a7baab8fa06ffaa3f9182542521d36da341
# good: [d92cb222b5c64d906fec4d633bb304d1eb6916d5] source-hash-c2e3d09bb740749e1a6e045ff08bf32e5812fa9e
git bisect good d92cb222b5c64d906fec4d633bb304d1eb6916d5
# good: [072964c53bb939b675807d5d656e2445a96d9eb3] source-hash-a7599b1e601725b18e1bdb996982eb6f00598eb4
git bisect good 072964c53bb939b675807d5d656e2445a96d9eb3
# good: [3708e706a8b8c64e03bcc3756ef5fcf5b2c5767c] source-hash-ac9001b5dcc480942c19d9e06ece70cbc24444e1
git bisect good 3708e706a8b8c64e03bcc3756ef5fcf5b2c5767c
# good: [603345816663f4b4c60c61525203fd567d6cc728] source-hash-9ddba6644024254a348c3569835df6ffae8c985a
git bisect good 603345816663f4b4c60c61525203fd567d6cc728
# good: [becadec00e002288a854db68d5dd3fc9fca14b1a] source-hash-446ac227bf3477ac3041d87bd0d880c3d61f4208
git bisect good becadec00e002288a854db68d5dd3fc9fca14b1a
Comment 2 Commit Notification 2013-07-22 20:33:45 UTC
Adam Co committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2d5978b22b402dea9dee5b468d2044ccc1208a15

fdo#66145: fix for FirstIsShared flag



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 3 Miklos Vajna 2013-08-05 16:35:37 UTC
Created attachment 83672 [details]
Reproducer document

With the reproducer document, it's easier to see that this is still a problem: open the bugdoc, format -> page -> header -> disable 'same content on first page', change something in the first page header -> third page gets changed as well.
Comment 4 Miklos Vajna 2013-08-06 08:28:39 UTC
 4dc78aee9bcdb6ea5e9dc47ebb4a4b9e590c725a is the first bad commit
commit 4dc78aee9bcdb6ea5e9dc47ebb4a4b9e590c725a
Author: Michael Stahl <mstahl@redhat.com>
Date:   Fri Mar 15 22:25:17 2013 +0100

    fdo#61952: sw: fix left/right-only page styles and first-page
    
    - remove PD_FIRST and GetFirstFmt:
      This flag makes no sense at all, since there are no "first-only"
      page styles (while there are left-only/right-only).
    - instead add a parameter to GetLeftFmt/GetRightFmt to request a
      first page format, if such exists and is not shared
    (regression from 02a934d03b101ce463a232f9cbb7b43e684de37e
     and fa0f42bafbf24e9141ddee728b160b5ab47077f2)
    
    Change-Id: I4d50c2c0cc4f3cf231eacba891df22d0bcf6c4df

:040000 040000 b31b779372edd601a5a5815ce2b6bc5db97b00ae 80434c04952fcba19da608c25477679447d72f2a M      sw
Comment 5 Michael Stahl (allotropia) 2013-08-19 12:05:02 UTC
i've fixed the problem introduced by the commit in comment #4 and the one introduced by the commit in comment #2, now this scenario works again here, but there are others that don't...
Comment 6 Commit Notification 2013-08-20 10:15:53 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bf206549228685a68e1504db05119d8fa1d354b3

fdo#66145: revert change to CopyMasterHeader



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2013-08-20 10:16:17 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4df438c9a9d5e698c47c1e85903eb81880a5e6fa

fdo#66145: do not check IsFirstShared() in SwPageDesc::GetLeftFmt()



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2013-08-20 10:16:42 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0b7a823bb6df79384939dda4de3b7f28e5e52758

fdo#66145: fix Undo invalidation in SwDoc::ChgPageDesc()



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2013-08-20 10:17:04 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e1a9a348a519a69f898c9c1e6d87a5837b8267f9

fdo#66145: fix copying of header/footer when un-sharing



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Michael Stahl (allotropia) 2013-08-20 10:20:45 UTC
changing the sharing flags should work now on master

(except for the curious fact that there are 2 check-boxes
 to share first-page on both the Header and Footer tab
 but internally both affect the same variable...)
Comment 11 Commit Notification 2013-08-20 12:26:56 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a0342b16c6a837f8fcecd3c7983df119e459b67f&h=libreoffice-4-0

fdo#66145: do not check IsFirstShared() in SwPageDesc::GetLeftFmt()


It will be available in LibreOffice 4.0.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2013-08-20 12:27:22 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f7433971d901f8f66538ef8df3e7729b0047ca2c&h=libreoffice-4-0

fdo#66145: fix copying of header/footer when un-sharing


It will be available in LibreOffice 4.0.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2013-08-20 12:27:45 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=49e308ce893e461a121ea7d90ec9514f05bf62aa&h=libreoffice-4-0

fdo#66145: fix Undo invalidation in SwDoc::ChgPageDesc()


It will be available in LibreOffice 4.0.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 14 Miklos Vajna 2013-08-21 10:22:04 UTC
(In reply to comment #10)
> (except for the curious fact that there are 2 check-boxes
>  to share first-page on both the Header and Footer tab
>  but internally both affect the same variable...)

Yes, that's a known limitation. In short, I could not figure out how to handle "first-shared header" + "not first-shared footer" in Writer layout (in the available timeframe), + the first page header/footer feature is mostly about having better Word interop (and Word doesn't support just unsharing the footer or the header), so for now in the document model there is only a single share flag. When I added the UI, the best I could came up with is to have checkboxes on both tabpages, even if they do the same.

If you have a better idea for the UI, I'm interested. :-)
Comment 15 Commit Notification 2013-08-21 10:37:56 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-1-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0d3ddd977fa417e47493edf80d7d90be8a4f580c&h=libreoffice-4-1-1

fdo#66145: do not check IsFirstShared() in SwPageDesc::GetLeftFmt()


It will be available already in LibreOffice 4.1.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2013-08-21 10:38:20 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-1-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b82d99e50d846c3b2505466d3048eacf02488757&h=libreoffice-4-1-1

fdo#66145: fix Undo invalidation in SwDoc::ChgPageDesc()


It will be available already in LibreOffice 4.1.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 17 Commit Notification 2013-08-21 10:38:43 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-1-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=abce5c9fc563d0d9ff0c8a4ae547a3b974c49527&h=libreoffice-4-1-1

fdo#66145: fix copying of header/footer when un-sharing


It will be available already in LibreOffice 4.1.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 18 Commit Notification 2013-08-21 10:39:03 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-1-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=49e7666c2d635c3f910429e55895858eab8d7deb&h=libreoffice-4-1-1

fdo#66145: revert change to CopyMasterHeader


It will be available already in LibreOffice 4.1.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 19 Commit Notification 2013-08-21 12:20:39 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=34f55adfd701c4cc3dd7c804690cd946cec30e48&h=libreoffice-4-0

fdo#66145: revert change to CopyMasterHeader


It will be available in LibreOffice 4.0.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 20 Commit Notification 2013-08-22 11:57:26 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=75084f6c42c27dc95418df9cefed2fddfb26000e&h=libreoffice-4-1

fdo#66145: do not check IsFirstShared() in SwPageDesc::GetLeftFmt()


It will be available in LibreOffice 4.1.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 21 Commit Notification 2013-08-22 11:57:58 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=62809efff8b75b00368ebbc70d697e5613523416&h=libreoffice-4-1

fdo#66145: fix Undo invalidation in SwDoc::ChgPageDesc()


It will be available in LibreOffice 4.1.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 22 Commit Notification 2013-08-22 11:58:35 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=796409636f999cf58a4f36dd7977497b7bd6ab20&h=libreoffice-4-1

fdo#66145: fix copying of header/footer when un-sharing


It will be available in LibreOffice 4.1.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 23 Commit Notification 2013-08-22 11:59:13 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b8499fc3dcf474050f026b8d5cd1d9037bbe42b7&h=libreoffice-4-1

fdo#66145: revert change to CopyMasterHeader


It will be available in LibreOffice 4.1.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 24 Commit Notification 2013-08-27 12:57:18 UTC
Adam Co committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=59d8dde3fc9a4dc653e43efb8552efc4ab3efc92&h=libreoffice-4-1

fdo#66145 DOCX export: fix not-well-formed output


It will be available in LibreOffice 4.1.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.