Bug 168542 - Insert -> Page break inserts a redundant paragraph, not just a page break (see comment 13)
Summary: Insert -> Page break inserts a redundant paragraph, not just a page break (se...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
26.2.0.0 alpha0+ master
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Page-Break
  Show dependency treegraph
 
Reported: 2025-09-24 21:27 UTC by Telesto
Modified: 2025-09-26 21:18 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample (44.78 KB, application/vnd.oasis.opendocument.text)
2025-09-24 21:27 UTC, Telesto
Details
Simplified test document with 2 pages of lorem ipsum text (35.25 KB, application/vnd.oasis.opendocument.text-flat-xml)
2025-09-26 21:10 UTC, Eyal Rozenberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2025-09-24 21:27:08 UTC
Description:
Insert -> Page break also includes a new paragraph, which is not by definition desired. There are cases where you want to insert page break without paragraph. 

Which can be done, but in totally different dialog. So Insert -> Page Break appears to be directed to specific workflow.

Steps to Reproduce:
Case A
1. Open the attached file
2. Place cursor after the last character at page 1 (?)
3. Insert -> More Breaks -> Manual Page Break -> Page Style -> Landscape. Press OK

Result an additional page in portrait introduced. Page 2 becoming page 3, oriented in landscape. Deleting paragraph on page 2 removes the empty page without losing the page break (so it's not add a page break 'after' this paragraph)

Case B
1. Open the attached file
2. Place cursor at the beginning of page 2
3. Insert -> More Breaks -> Manual Page Break -> Page Style -> Landscape. Press OK

Result: Page 2 becomes landscape, but gets additional Paragraph before

Case D
1. Open the attached file
2. Place cursor at the beginning of page 1
3. Format -> Paragraph -> Text flow tab -> 
a) Check Insert Break 
b) Change position to After
c) Check page style & pick Landscape

Result: Page 2 becomes landscape, set in the paragraph above the page break

Case D
1. Open the attached file
2. Place cursor at the beginning of page 2
3. Format -> Paragraph -> Text flow tab 
a) Check Insert Break 
b) Check with page style & pick Landscape

Result: Page 2 becomes landscape. Defined in the paragraph below the page break


Actual Results:
As described

Expected Results:
I always assumed Insert -> Page Break only insert a page break. However it does actually two things
A) Insert a new paragraph 
B) Adding a page break

So in an existing document you actually need to go Format -> Paragraph -> Text flow tab to add page breaks to prevent inserting additional paragraph

This is a kind of confusing for Benjamin. Insert -> Page Break has a prominent place; easy to find.  However it doesn't produce the intended result instantly.

Sure I do get CTRL+Enter being about adding a new Paragraph + Page Break. 
So it's only the label? Or should the logic/or UI be 'smarter' in some way


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6f68c46d0aa5fe872de0dec8777d35ff91886043
CPU threads: 4; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded
Comment 1 Telesto 2025-09-24 21:27:20 UTC
Created attachment 202954 [details]
Sample
Comment 2 Telesto 2025-09-24 21:30:04 UTC
Some feedback would be nice. It's somewhat related to bug 168272
Comment 3 Heiko Tietze 2025-09-25 13:21:46 UTC
(In reply to Telesto from comment #0)
> Insert -> Page break also includes a new paragraph, which is not by
> definition desired.
Text documents are per se continuous. A PB is attached to a paragraph, or in other words an attribute of a paragraph that makes it break across a page before or after and with or without a new page style. => WF
Comment 4 V Stuart Foote 2025-09-25 13:52:35 UTC
Seems more a dupe of bug 41316 and the discussions on related bugs like bug 160684 bug 161078 and bug 168272
Comment 5 Telesto 2025-09-25 19:16:30 UTC
(In reply to V Stuart Foote from comment #4)
> Seems more a dupe of bug 41316 and the discussions on related bugs like bug
> 160684 bug 161078 and bug 168272

Yes, this bug being inspired/triggered by bug 160684 bug 161078 and bug 168272 aka rotating a specific page to landscape in an existing document. However I personally think this being about different facet/aspect.
Comment 6 Eyal Rozenberg 2025-09-25 20:23:58 UTC
(In reply to Telesto from comment #0)
> Case A
> 1. Open the attached file
> 2. Place cursor after the last character at page 1 (?)
> 3. Insert -> More Breaks -> Manual Page Break -> Page Style -> Landscape.
> Press OK
> 
> Result an additional page in portrait introduced. Page 2 becoming page 3,
> oriented in landscape. 

That's not what I see.

Indeed, I see a gratuitous paragraph break, but I don't see another portrait page. With your document at LO 26.2 build from Sep 19th (commit ed45cdaef3d2807d0b9d6a4c08da375fc72024a6)

But - confirm the gratuitous paragraph break, so marking NEW. Please consider splitting off limit control.


> Case B
> 1. Open the attached file
> 2. Place cursor at the beginning of page 2
> 3. Insert -> More Breaks -> Manual Page Break -> Page Style -> Landscape.
> Press OK
> 
> Result: Page 2 becomes landscape, but gets additional Paragraph before

Actually, _now_ I see the redundant third page added. This is silly.
Comment 7 Eyal Rozenberg 2025-09-25 20:26:27 UTC
(In reply to Heiko Tietze from comment #3)
> (In reply to Telesto from comment #0)
> > Insert -> Page break also includes a new paragraph, which is not by
> > definition desired.
> Text documents are per se continuous. A PB is attached to a paragraph, or in
> other words an attribute of a paragraph that makes it break across a page
> before or after and with or without a new page style. => WF

Heiko, I believe Telesto means an _extra_ pargraph break, so that actually, you get an extra empty para in same block.
Comment 8 Eyal Rozenberg 2025-09-25 20:35:44 UTC
(In reply to V Stuart Foote from comment #4)
> Seems more a dupe of bug 41316 and the discussions on related bugs like bug
> 160684 bug 161078 and bug 168272

This isn't really about landscape - I believe that style was used as an example mostly. This bug is also not about applying new styles or naming styles. But it _is_ about user exterior formatting info for interior oene.
Comment 9 Telesto 2025-09-25 20:48:49 UTC
(In reply to Eyal Rozenberg from comment #8)
> (In reply to V Stuart Foote from comment #4)
> > Seems more a dupe of bug 41316 and the discussions on related bugs like bug
> > 160684 bug 161078 and bug 168272
> 
> This isn't really about landscape - I believe that style was used as an
> example mostly. 

True
Comment 10 Heiko Tietze 2025-09-26 07:44:03 UTC
(In reply to Eyal Rozenberg from comment #7)
> I believe Telesto means an _extra_ pargraph break...
There is always an empty paragraph in the document. You cannot have a Writer document with a void content.
Comment 11 Eyal Rozenberg 2025-09-26 15:07:56 UTC
Telesto, note that your testcase document is rather problematic, as it already has a soft break in it, it seems, as well as repeated text which is a bit confusing.

Will you let me upload a simpler testcase with simpler reproduction instructions?
Comment 12 Telesto 2025-09-26 20:39:07 UTC
(In reply to Eyal Rozenberg from comment #11)
> Telesto, note that your testcase document is rather problematic, as it
> already has a soft break in it, it seems, as well as repeated text which is
> a bit confusing.
> 
> Will you let me upload a simpler testcase with simpler reproduction
> instructions?

Sure, go ahead
Comment 13 Eyal Rozenberg 2025-09-26 21:10:31 UTC
Created attachment 202987 [details]
Simplified test document with 2 pages of lorem ipsum text

Simplified reproductin instructions:

1. Open this attachment. (Or - create a new document and type in some paragraphs of plain text until you flow into a second page.)
2. Place cursor at end of last paragraph fitting on the first page - after "inventore."
3. On the menus, choose Insert > Page Break

Expected results:
Visually - no change. The page break is at the end of a paragraph which fits on page 1, and the post-break page is page 2, at whose start we should see the paragraph we were already seeing.

Actual results:
Visually - an empty paragraph is added at the top of page 2. That empty paragraph "carries" the page break before.
Comment 14 Eyal Rozenberg 2025-09-26 21:18:22 UTC
(In reply to Eyal Rozenberg from comment #13)

Now let's consider this ODF-wise. 

Before inserting the page break, we have:

  <text:p text:style-name="P2">Eum omnis ... inventore.</text:p>
  <text:p text:style-name="P2">At eveniet ... recusandae.</text:p>

Expected result of inserting the page break:

  <text:p text:style-name="P3">Eum omnis ... inventore.</text:p>
  <text:p text:style-name="P2">At eveniet ... recusandae.</text:p>

with the P3 style involving a

  <style:paragraph-properties fo:break-after="page"/>

Unexpected, but tolerable, result of inserting the page break:

  <text:p text:style-name="P2">Eum omnis ... inventore.</text:p>
  <text:p text:style-name="P3">At eveniet ... recusandae.</text:p>

with the P3 style involving a

  <style:paragraph-properties fo:break-before="page"/>

Actual result:

  <text:p text:style-name="P2">Eum omnis ... inventore.</text:p>
  <text:p text:style-name="P3"/>
  <text:p text:style-name="P2">At eveniet ... recusandae.</text:p>

with the P3 style involving a

  <style:paragraph-properties fo:break-before="page"/>