Bug 149631

Summary: Record Macro won't record inserting a page break of a specified type
Product: LibreOffice Reporter: Luke Kendall <luke.kendall>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: raal
Priority: medium    
Version: 7.3.2.2 release   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 64314    

Description Luke Kendall 2022-06-20 05:14:52 UTC
Context:

I found that none of my level 1 chapter title style chapters were being added to the Table of Contents, and the only way to correct it was to delete the page break and the chapter title, then to insert a page break and a new chapter title and assign the chapter heading style again: after that, the chapter headings would appear in the TOC.

Bug:

After recording a macro with the 17 steps needed to do this, I discovered that recording a macro will not record the insertion of a manual page break with a specific page style chosen from the drop-down list.

Looking into the macro code, the code to insert the page break was commented out (so of course it wasn't included when the macro was run). Manually uncommenting the line of code caused the insert page break dialogue to pup up to manually choose the page style.

Steps to reproduce:

Enable macros.
Turn on Record macro
Perform some operations, one of which includes inserting a manual page break
End recording
Run the macro

Observed result:

No page break insertion occurs.

Expected result:

Page break (with the previously chosen following page style) is inserted.
Comment 1 raal 2022-07-13 15:31:09 UTC
I can confirm in Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: a93d7e7df6804cd6f1f2fa1ef0e6e95ce6c3752a
CPU threads: 4; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded