Bug 149631 - Record Macro won't record inserting a page break of a specified type
Summary: Record Macro won't record inserting a page break of a specified type
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.2.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Macro-Recording
  Show dependency treegraph
 
Reported: 2022-06-20 05:14 UTC by Luke Kendall
Modified: 2022-07-14 03:30 UTC (History)
1 user (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 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