Bug 79303 - Page Numbering restarts when paragraph width is adjusted
Summary: Page Numbering restarts when paragraph width is adjusted
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: All All
: high major
Assignee: Michael Stahl (CIB)
URL:
Whiteboard: target:4.4.0.0.beta2 target:4.3.5
Keywords: bibisected, bisected, regression
: 74961 76569 80852 82394 82856 86505 (view as bug list)
Depends on:
Blocks: mab4.3
  Show dependency treegraph
 
Reported: 2014-05-27 11:37 UTC by Ulrich.Wittmann.HM
Modified: 2015-12-17 08:18 UTC (History)
16 users (show)

See Also:
Crash report or crash signature:


Attachments
sample document for the test (10.61 KB, application/vnd.oasis.opendocument.text)
2014-05-29 02:07 UTC, Yousuf Philips (jay) (retired)
Details
WRITEN DOC WITH SOME PICTURES (809.29 KB, application/vnd.oasis.opendocument.text)
2014-09-03 07:32 UTC, sev.montaron
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich.Wittmann.HM 2014-05-27 11:37:59 UTC
Page numbering restarts (in footer & header) when on the previous page the width of a paragraph is adjusted. It doesn't matter whether left or right, whether inside or outside the set page border.
If there is only one paragraph on the page and the paragraph width is changed, the page number will be set to zero.

This should not the expected kind of behaviour when adjusting the formatting of a paragraph.
Comment 1 Yousuf Philips (jay) (retired) 2014-05-29 02:04:39 UTC
Confirmed on Linux Mint with in 4.2.4 and 4.3 beta. This doesnt happen in 4.1.6
Comment 2 Yousuf Philips (jay) (retired) 2014-05-29 02:07:07 UTC
Created attachment 100067 [details]
sample document for the test

Steps:
1. Open doc in Writer
2. goto page 2
3. Hightlight the paragraph
4. drag the arrows in the top ruler from either the left or right
5. the page number of the page should turn to 0
Comment 3 Joel Madero 2014-05-29 02:44:21 UTC
050f725888065eccab28337d11cd4e057efe48b1 is the first bad commit
commit 050f725888065eccab28337d11cd4e057efe48b1
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Wed Nov 27 07:39:25 2013 +0000

    source-hash-1aae6f6087214f143886dd4c18d226fb1657b5c3
    
    commit 1aae6f6087214f143886dd4c18d226fb1657b5c3
    Author:     Michael Stahl <mstahl@redhat.com>
    AuthorDate: Sat Oct 26 21:35:32 2013 +0200
    Commit:     Michael Stahl <mstahl@redhat.com>
    CommitDate: Sat Oct 26 21:39:19 2013 +0200
    
        nss: fix build breakage of postgresql
    
        Somehow postgresql needs to link both openssl and NSS (yay) ... and it
        turns out that NSS builds a "libssl.a" on MacOSX and Linux, and of
        course OpenSSL does too... so avoid that by removing *.a in NSS tree,
        which are not needed anyway (some of these are named the same as the
        corresponding .so/.dylib to...).
    
        Change-Id: I5c9718e655d350c2e7d0ae05596f8e3130e9bfe1

:100644 100644 7a87ab85fe0e5733eb159141053c7fc9edad4f70 4e339258b1182fd1d3ab540a012a4144eb1f74ee M	ccache.log
:100644 100644 9603946f88ddc98c86ef82d62fb28b0f987fb699 4d589f0b009f533221d5e57b52dafb28ca6985aa M	commitmsg
:100644 100644 4fd8c5d0c72b21ef0b64d31565c1b90add86f339 79a16303ad9a3514d31a0ac6d2a0be68ee6e98bd M	make.log
:040000 040000 dde5b8c597f5e78fe6ba49dbf39babfda4bcb110 aba6f4edb64dec00f7d9f1c6d356d83e2e7c6997 M	opt


# bad: [793dbf6f80f497dfe587d560d6257f42a24273f6] source-hash-1581b1fc3ac82a7bd62df968226e98604a4ca52d
# good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
git bisect start 'latest' 'oldest'
# good: [8092559c5013969ebda017d79200463b9b975038] source-hash-fd84daf696a368c2c7561b5253b32a63ecdeca4a
git bisect good 8092559c5013969ebda017d79200463b9b975038
# good: [0270ef1b76a6de423b30f7927362cc01c1a0fc38] source-hash-b1f7dd66b898b03cb4bd8d434b6370310ea95946
git bisect good 0270ef1b76a6de423b30f7927362cc01c1a0fc38
# skip: [ddb123cad22440994cd332d9985dd9558fd07e07] source-hash-647fb29f528b891a1c92846640f7865f5c1fbe7f
git bisect skip ddb123cad22440994cd332d9985dd9558fd07e07
# skip: [9d357dc6201f7cd91448595e0a3f89dfdae81946] source-hash-2304beaca33c63b94df99cb827716f00ce259f9a
git bisect skip 9d357dc6201f7cd91448595e0a3f89dfdae81946
# good: [ef72aa34cf4ee6399b192de28708d621c9680a50] source-hash-7e07a45500dcbb891a85f0bc9b7049cf4d50bba1
git bisect good ef72aa34cf4ee6399b192de28708d621c9680a50
# good: [2472598a0b04eef3038d56137f27dc6dc1edf9e5] source-hash-5050dfc73f194d1d59222cac72e69a917655d816
git bisect good 2472598a0b04eef3038d56137f27dc6dc1edf9e5
# skip: [b25c77bc097fa4cc84f59ebdd34011bafbb3a770] source-hash-660800d6f33a01ad53fc0f5717e1c33868440d2f
git bisect skip b25c77bc097fa4cc84f59ebdd34011bafbb3a770
# skip: [b25c77bc097fa4cc84f59ebdd34011bafbb3a770] source-hash-660800d6f33a01ad53fc0f5717e1c33868440d2f
git bisect skip b25c77bc097fa4cc84f59ebdd34011bafbb3a770
# bad: [89c7af972191d30321e9503b6454e8b1570ee3e8] source-hash-0aa9ced531b8d85ad067c1d156a9708eea628d78
git bisect bad 89c7af972191d30321e9503b6454e8b1570ee3e8
# bad: [89c7af972191d30321e9503b6454e8b1570ee3e8] source-hash-0aa9ced531b8d85ad067c1d156a9708eea628d78
git bisect bad 89c7af972191d30321e9503b6454e8b1570ee3e8
# good: [5739508e8ebb108f7a2c38e0e8567075752f06ba] source-hash-43ccd83d2598256de2193348c0b3c7f85fb4870e
git bisect good 5739508e8ebb108f7a2c38e0e8567075752f06ba
# good: [5739508e8ebb108f7a2c38e0e8567075752f06ba] source-hash-43ccd83d2598256de2193348c0b3c7f85fb4870e
git bisect good 5739508e8ebb108f7a2c38e0e8567075752f06ba
# bad: [1fe9a0d448a595c2dc32488a1d18b3d3a3566101] source-hash-8f0ecf253531963144d3d1c9ee5c12a6cda99c4e
git bisect bad 1fe9a0d448a595c2dc32488a1d18b3d3a3566101
# bad: [1fe9a0d448a595c2dc32488a1d18b3d3a3566101] source-hash-8f0ecf253531963144d3d1c9ee5c12a6cda99c4e
git bisect bad 1fe9a0d448a595c2dc32488a1d18b3d3a3566101
# good: [339f7a845817b64f96d606e2991b93bc5af970aa] source-hash-5d0051efb99c6cbd0dc4dd655a71e7435159f6bc
git bisect good 339f7a845817b64f96d606e2991b93bc5af970aa
# bad: [050f725888065eccab28337d11cd4e057efe48b1] source-hash-1aae6f6087214f143886dd4c18d226fb1657b5c3
git bisect bad 050f725888065eccab28337d11cd4e057efe48b1
# good: [76ec0c17a47399908e3b6ac1561c47b96cd1965a] source-hash-01a13519e2a12e1e9b61bab1437d340e389e44bf
git bisect good 76ec0c17a47399908e3b6ac1561c47b96cd1965a
# first bad commit: [050f725888065eccab28337d11cd4e057efe48b1] source-hash-1aae6f6087214f143886dd4c18d226fb1657b5c3
Comment 4 Joel Madero 2014-05-29 02:44:47 UTC
Upping severity:

Major - loss of data
High - regression + default for loss of data
Comment 5 Andras Timar 2014-06-23 17:00:56 UTC
5ce19ddcb6595c71980aecfa1e8c0827343159a4 is the first bad commit
commit 5ce19ddcb6595c71980aecfa1e8c0827343159a4
Author: Miklos Vajna <vmiklos@collabora.co.uk>
Date:   Fri Oct 25 12:49:44 2013 +0200

    fdo#70861 SwToSfxPageDescAttr: fix call to SvxExtParagraphTabPage
    
    Regression from c2ccd20c0fd92bddfff76447754541705e3eb8f3 (fdo#44689: fix
    for specific case of page restart-value 0, 2013-08-29), the problem was
    that commit refactored starting page number handling, so that '0' is now
    also a valid value, and no longer means "no restart". However cui isn't
    updated yet, so always pass a 0 to it, like we used to do so before,
    that's better than a crash.
Comment 6 Yousuf Philips (jay) (retired) 2014-08-10 04:14:45 UTC
*** Bug 82394 has been marked as a duplicate of this bug. ***
Comment 7 Yousuf Philips (jay) (retired) 2014-08-10 04:15:36 UTC
*** Bug 80852 has been marked as a duplicate of this bug. ***
Comment 8 tommy27 2014-08-10 13:38:45 UTC
I copy&paste here bibisect infos from Bug 80852

-----------

Xisco Faulí  2014-08-06 16:11:03 UTC 
bibisected:

commit 6e1586198f281b174861c93be569ca613e1b0aae
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Wed Nov 27 07:39:25 2013 +0000

    source-hash-1aae6f6087214f143886dd4c18d226fb1657b5c3
    
    commit 1aae6f6087214f143886dd4c18d226fb1657b5c3
    Author:     Michael Stahl <mstahl@redhat.com>
    AuthorDate: Sat Oct 26 21:35:32 2013 +0200
    Commit:     Michael Stahl <mstahl@redhat.com>
    CommitDate: Sat Oct 26 21:39:19 2013 +0200
    
        nss: fix build breakage of postgresql
    
        Somehow postgresql needs to link both openssl and NSS (yay) ... and it
        turns out that NSS builds a "libssl.a" on MacOSX and Linux, and of
        course OpenSSL does too... so avoid that by removing *.a in NSS tree,
        which are not needed anyway (some of these are named the same as the
        corresponding .so/.dylib to...).
    
        Change-Id: I5c9718e655d350c2e7d0ae05596f8e3130e9bfe1

:100644 100644 7a87ab85fe0e5733eb159141053c7fc9edad4f70 4e339258b1182fd1d3ab540a012a4144eb1f74ee M	ccache.log
:100644 100644 9603946f88ddc98c86ef82d62fb28b0f987fb699 4d589f0b009f533221d5e57b52dafb28ca6985aa M	commitmsg
:100644 100644 4fd8c5d0c72b21ef0b64d31565c1b90add86f339 79a16303ad9a3514d31a0ac6d2a0be68ee6e98bd M	make.log
:040000 040000 dde5b8c597f5e78fe6ba49dbf39babfda4bcb110 aba6f4edb64dec00f7d9f1c6d356d83e2e7c6997 M	opt

# bad: [423a84c4f7068853974887d98442bc2a2d0cc91b] source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e
# good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
git bisect start 'latest' 'oldest'
# good: [e02439a3d6297a1f5334fa558ddec5ef4212c574] source-hash-6b8393474974d2af7a2cb3c47b3d5c081b550bdb
git bisect good e02439a3d6297a1f5334fa558ddec5ef4212c574
# bad: [4850941efe43ae800be5c76e1102ab80ac2c085d] source-hash-980a6e552502f02f12c15bfb1c9f8e6269499f4b
git bisect bad 4850941efe43ae800be5c76e1102ab80ac2c085d
# skip: [a043626b542eb8314218d7439534dce2fc325304] source-hash-9379a922c07df3cdb7d567cc88dfaaa39ead3681
git bisect skip a043626b542eb8314218d7439534dce2fc325304
# skip: [aba65c3e4c0df07e4909aeefb758cdb688242bf6] source-hash-827524abfb4b577d08276fde40929a9adfb7ff1a
git bisect skip aba65c3e4c0df07e4909aeefb758cdb688242bf6
# skip: [aba65c3e4c0df07e4909aeefb758cdb688242bf6] source-hash-827524abfb4b577d08276fde40929a9adfb7ff1a
git bisect skip aba65c3e4c0df07e4909aeefb758cdb688242bf6
# bad: [c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31] source-hash-c69ed33628ec0b7abf6296539cf280d6c4265930
git bisect bad c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31
# bad: [c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31] source-hash-c69ed33628ec0b7abf6296539cf280d6c4265930
git bisect bad c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31
# good: [1d4980621741d3050a5fe61b247c157d769988f2] source-hash-89d01a7d8028ddb765e02c116d202a2435894217
git bisect good 1d4980621741d3050a5fe61b247c157d769988f2
# skip: [89110ca258fa7a15dfc546acfb39e76fc3eb2a44] source-hash-e450a2c506ac7cd4433b0f93fc750a89919bc03c
git bisect skip 89110ca258fa7a15dfc546acfb39e76fc3eb2a44
# good: [1cca92a409385d9288c28a54d5e3008e56728bc0] source-hash-7be7824bbbdeee6fa998b950e6046ab37fe690cb
git bisect good 1cca92a409385d9288c28a54d5e3008e56728bc0
# skip: [5fa28ce2931a35ae64ae08d3904cfb76d24459d8] source-hash-2304beaca33c63b94df99cb827716f00ce259f9a
git bisect skip 5fa28ce2931a35ae64ae08d3904cfb76d24459d8
# good: [2a9ff869c5638dc5c3aa387d0fe55c3291c86288] source-hash-01b7e04172889cbc9e4ac404b105e18ddc062d6f
git bisect good 2a9ff869c5638dc5c3aa387d0fe55c3291c86288
# bad: [387dd1052972d27a3065a249b357e50e0a29829b] source-hash-35836f350861b33a0c28307a413eff76d0433d1e
git bisect bad 387dd1052972d27a3065a249b357e50e0a29829b
# good: [5b0bc0b6253d7572470c6a3058d5fff68c93897f] source-hash-bdf2b506c38b38af531d8c8aa14dd51d89386899
git bisect good 5b0bc0b6253d7572470c6a3058d5fff68c93897f
# good: [288796dca516e779d45513775be7c7bc3ff291f7] source-hash-5d0051efb99c6cbd0dc4dd655a71e7435159f6bc
git bisect good 288796dca516e779d45513775be7c7bc3ff291f7
# bad: [6e1586198f281b174861c93be569ca613e1b0aae] source-hash-1aae6f6087214f143886dd4c18d226fb1657b5c3
git bisect bad 6e1586198f281b174861c93be569ca613e1b0aae
# good: [e371c174576801a7865420008f494c0d3f153f1b] source-hash-01a13519e2a12e1e9b61bab1437d340e389e44bf
git bisect good e371c174576801a7865420008f494c0d3f153f1b
# first bad commit: [6e1586198f281b174861c93be569ca613e1b0aae] source-hash-1aae6f6087214f143886dd4c18d226fb1657b5c3
Comment 9 Yousuf Philips (jay) (retired) 2014-08-20 11:07:01 UTC
*** Bug 82856 has been marked as a duplicate of this bug. ***
Comment 10 sev.montaron 2014-09-03 07:32:00 UTC
Created attachment 105664 [details]
WRITEN DOC WITH SOME PICTURES

TOU CAN TRY IN THE DOCUMENT JOINED : THE PAGES ARE CORRECTLY NUMBERED BUT IF YOU REAJUST WIDTH OF THE TEXT IN RED TO 12.5, YOU WILL SEE THAT THE PAGE NUMBER WILL CHANGE (FROM THE THE PAGE AFTER THE READJUSTMENT : 1, 2, 3, 1, 2!)

I HOPE MY ENGLISH IS NOT TO BAD TO UNDERSTAND...

THANK YOU FOR YOUR HELP

SEVERINE
Comment 11 Björn Michaelsen 2014-10-16 14:59:19 UTC
(This is an automated message.)

It seems that the commit that caused this regression was identified. (Or at least a commit is suspected as the offending one.)

Thus setting keyword "bisected".
Comment 12 tmacalp 2014-10-22 05:01:15 UTC
*** Bug 76569 has been marked as a duplicate of this bug. ***
Comment 13 Vitaly 2014-11-20 19:59:02 UTC
I would like to inspire developers to fix this one of really most annoying regressions. This bug really prevents using LO after 4.2 in enterprise. Please, do not forget about this well-documented and VERY important bug while hunting new bugs on BugHunting Session 4.4.0.0!

I can confirm this bug on the LibreOfficeDev_4.4.0.0.alpha2_Win_x86

Steps to reproduce (based on Comment # 9 on bug 76569):

1. Create a 5 page document with page numbers in the footer
2. On page 3, drag the gray upward-facing arrow found in the far-right of the
top horizontal ruler to the left.

Expected results:
The page numbers in the footer of page 3, 4, and 5 should remain “3, 4, and 5.”

Actual results:
Page 3, the page we adjusted the “After Text” attribute on, now has changed the
page number field in the footer to indicate that it's page 0.  Also, Writer's
current page number in the Status Bar also lists this page as “Page 4 of 6 (Page 0)”. Oddly enough, it lists what should be page 4 as “Page 5 of 6 (Page 1)” and page 5 as “Page 6 of 6 (Page 2)”.

Alternatively, here is an even faster way to reproduce:
1. Create a new document
2. Drag the gray upward-facing arrow found in the far-right of the top
horizontal ruler to the left
3. Note that your page number in the status bar has changed from "Page 1 of 1" to "Page 2 of 2 (Page 0)"

THANK YOU!
Comment 14 Urmas 2014-11-21 07:35:54 UTC
*** Bug 86505 has been marked as a duplicate of this bug. ***
Comment 15 Cor Nouws 2014-11-26 16:08:17 UTC
*** Bug 74961 has been marked as a duplicate of this bug. ***
Comment 16 Michael Stahl (CIB) 2014-11-27 23:04:05 UTC
this bug is a good example why one should not "quickly" fix a crash with a band-aid.

fixed on master.
Comment 17 Commit Notification 2014-11-27 23:04:58 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

fdo#79303: Revert "fdo#70861 SwToSfxPageDescAttr: fix call to ...

It will be available in 4.5.0.

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 2014-11-27 23:07:18 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

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

fdo#79303: Revert "fdo#70861 SwToSfxPageDescAttr: fix call to ...

It will be available in 4.4.0.0.beta2.

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 2014-11-28 09:20:58 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

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

fdo#79303: Revert "fdo#70861 SwToSfxPageDescAttr: fix call to ...

It will be available in 4.3.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 Vitaly 2014-11-30 07:49:07 UTC
I confirm that steps in Comment #13 are not reproducible in
Version: 4.3.6.0.0+
Build ID: 8f973b2669d9925f98dfe5633b33b5d4d5f622ae
TinderBox: Win-x86@42, Branch:libreoffice-4-3, Time: 2014-11-29_00:01:05

Bug seems to be fixed. Thank you Michael!
Comment 21 Commit Notification 2014-12-04 14:01:03 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a765fcce6c629f3ff8e5843fc67f26d6b96e73d5&h=libreoffice-4-3-5

fdo#79303: Revert "fdo#70861 SwToSfxPageDescAttr: fix call to ...

It will be available in 4.3.5.

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 Robinson Tryon (qubit) 2015-12-17 08:18:18 UTC
Migrating Whiteboard tags to Keywords: (bibisected)
[NinjaEdit]