Bug 108048 - Change numbering pages with new style not working when set from within the macro
Summary: Change numbering pages with new style not working when set from within the macro
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Mike Kaganski
Whiteboard: target:6.1.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Writer-Styles-Page
  Show dependency treegraph
Reported: 2017-05-24 06:47 UTC by nvhorst
Modified: 2017-11-27 16:32 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description nvhorst 2017-05-24 06:47:23 UTC
My document have some sections that must start on odd pages with new page numbering.
It is than need to insert page break with new page style staring on the right or left page and change page numbering to "1".
You can do this from menu: menu>insert>manual page break, choose new pagestyle and tick the box to change page number to "1".
it is impossible to get the same result when executing above steps in recorded macro because page numbering is continued despite setting PageNumber value.

Below is the code "tools>macro>record>"

dim args5(2) as new com.sun.star.beans.PropertyValue
args5(0).Name = "Kind"
args5(0).Value = 3
args5(1).Name = "TemplateName"
args5(1).Value = "Left Page"
args5(2).Name = "PageNumber"
args5(2).Value = 1 // THIS VALUE WILL NOT BE SET!
dispatcher.executeDispatch(document, ".uno:InsertBreak", "", 0, args5())
Comment 1 Regina Henschel 2017-05-24 22:28:53 UTC
It seems to be broken in version 4 already.

It is OK in Version (Build ID: 74f74aa5470fe631c7827897742c0ccbddcf6ad)
TinderBox: Win-x86@6, Branch:master, Time: 2013-02-23_23:21:01

It is broken in Version:
Build ID: aa453de65b8b44f9c1e6012caaeef11df9ff65fc
TinderBox: Win-x86@39, Branch:master, Time: 2014-05-24_13:45:34
Comment 2 Regina Henschel 2017-05-24 22:51:32 UTC
Already broken in Version:
Build ID: 3be8cda0bddd8e430d8cda1ebfd581265cca5a0f
Comment 3 giles 2017-10-09 12:55:58 UTC
As a frequent user of this feature I can confirm this bug in Libreoffice v5.2.6.2
Comment 4 Mike Kaganski 2017-11-27 06:36:30 UTC
Setting "regression" and "bibisectRequest" as per comment 1 and comment 2.
Comment 5 Mike Kaganski 2017-11-27 07:43:51 UTC
~/bibisect-42max$ git bisect log
# bad: [8775b1622f226e863b864de7e208226cbfb914e3] source-hash-22ea573b7417db0392c006dff06cde50ddbcd469
# good: [b3c6cf289ff72449408fa01958092d9e482e82bd] source-hash-a2c9d4f8bbde97f175bae4df771273a61251f402
git bisect start 'latest' 'oldest'
# good: [be115ebaad667aefcc0366ce23d6bc7013060424] source-hash-5e6b2d0e4a55be8a4f57ecfe55248d7924d4f0b7
git bisect good be115ebaad667aefcc0366ce23d6bc7013060424
# good: [1d2a8e3e93e1b589fb1f7277c0997c6e9cf6a093] source-hash-2b0320da7b59d2d4c0c5dc5da8424458ce0d819d
git bisect good 1d2a8e3e93e1b589fb1f7277c0997c6e9cf6a093
# bad: [fde4c5cecac3fbf5feb5518a1385e62ab2ae56e9] source-hash-5084e2b313ef4c4a126f704e1d5397f20a3d4254
git bisect bad fde4c5cecac3fbf5feb5518a1385e62ab2ae56e9
# bad: [fba632261901d870b2ddc8e8acf7dd5b37d4292a] source-hash-a2799e77012263f0bdce55b69488bdded6f88887
git bisect bad fba632261901d870b2ddc8e8acf7dd5b37d4292a
# good: [7a50bfb16cb5df903a885a1949bbb3f37960d202] source-hash-76ef39f0377f6105f658b9867c8a496e565b2a3a
git bisect good 7a50bfb16cb5df903a885a1949bbb3f37960d202
# bad: [c96d56169483663dfc1483f0693c495571beb61f] source-hash-786153a048e773fa094429708023c7ffc76221e3
git bisect bad c96d56169483663dfc1483f0693c495571beb61f
# bad: [71651bef2ebc5d5433fd9b031422d8f0de8f65d2] source-hash-6bb564b93d85493476d7879a29b6db85b76800f1
git bisect bad 71651bef2ebc5d5433fd9b031422d8f0de8f65d2
# good: [c0d9df9ffccaad4307d94d366166c1093958b0a0] source-hash-4d8f12f57b0f02d3610269eae7b5981010dc7e98
git bisect good c0d9df9ffccaad4307d94d366166c1093958b0a0
# good: [b12bc8c2096865e8eff67eb627bae04ccd928eec] source-hash-ad9dce70d88f64ed2bba512658d2980d573183f3
git bisect good b12bc8c2096865e8eff67eb627bae04ccd928eec
# good: [651fa4231e75da1b9325380948886c44f66966de] source-hash-30823bce29b4e5007cf045e9923a2f2e749ab091
git bisect good 651fa4231e75da1b9325380948886c44f66966de
# bad: [ac9c96d5c77ba2695369be5d1d729fd34986d71f] source-hash-9585faa059a880111d797cfd0b0c2d32baec2ce2
git bisect bad ac9c96d5c77ba2695369be5d1d729fd34986d71f
# bad: [5c17067223a1f17a5a8a92b4e4da223eb634a46f] source-hash-e847e6758ef51cc2f2f6622c40bf6c7b0bc0cdae
git bisect bad 5c17067223a1f17a5a8a92b4e4da223eb634a46f
# bad: [043c0ba8b6968e752e978b33b1cdb6e4d8473a9b] source-hash-c2ccd20c0fd92bddfff76447754541705e3eb8f3
git bisect bad 043c0ba8b6968e752e978b33b1cdb6e4d8473a9b
# first bad commit: [043c0ba8b6968e752e978b33b1cdb6e4d8473a9b] source-hash-c2ccd20c0fd92bddfff76447754541705e3eb8f3


author	Adam Co <rattles2013@gmail.com>	2013-08-29 14:16:44 (GMT)
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2013-10-22 07:53:53 (GMT)
commit c2ccd20c0fd92bddfff76447754541705e3eb8f3
tree cd912865f00efcfd559530bc6ff1bfbeb57065cf
parent 30823bce29b4e5007cf045e9923a2f2e749ab091
fdo#44689: fix for specific case of page restart-value 0
Comment 6 Mike Kaganski 2017-11-27 09:46:37 UTC
A patch is in gerrit: https://gerrit.libreoffice.org/45319
Comment 7 Commit Notification 2017-11-27 15:33:26 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":


tdf#108048: update InsertBreak slot to use PageNumberFilled param

It will be available in 6.0.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:

Affected users are encouraged to test the fix and report feedback.
Comment 8 Mike Kaganski 2017-11-27 16:32:05 UTC
The commit notification is wrong wrt target version. Current master is towards 6.1.0, so adjusting target in whiteboard accordingly.