Bug 132682 - EDITING New paragraph before page starting table inserts page break
Summary: EDITING New paragraph before page starting table inserts page break
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Tables
  Show dependency treegraph
 
Reported: 2020-05-04 14:50 UTC by NISZ LibreOffice Team
Modified: 2020-05-27 06:26 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Writer (28.04 KB, application/vnd.oasis.opendocument.text)
2020-05-04 14:50 UTC, NISZ LibreOffice Team
Details
The example file after inserting a paragraph before the table (22.27 KB, application/vnd.oasis.opendocument.text)
2020-05-04 14:51 UTC, NISZ LibreOffice Team
Details
Screenshot of the problem (78.26 KB, image/png)
2020-05-04 14:51 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2020-05-04 14:50:30 UTC
Created attachment 160338 [details]
Example file from Writer

Attached user made document contains a table that starts the document. Also this document has a custom header on the first page.
If one wants to insert a paragraph before the table using Alt+Enter this also inserts a page break, also pushes the first page header to the second page, making both have first page header. Then:
- Saving the file to ODT makes the first page have default header while the second page keeps the first page header.
- Removing the extra page break and saving the file to ODT makes the first page header completely disappear.

Steps to reproduce:
    1. Open attached document and try to make it NOT start with a table. I tried to avoid bug #106959 since this was a mail merge document.

Actual results:
Writer destroys the header by inserting an unwanted page break.

Expected results:
No extra page break when a paragraph is inserted before the top left table cell.
If the table is not the first object in the page, this does not happen.

LibreOffice details:
Version: 7.0.0.0.alpha0+ (x64)
Build ID: 00db5933ded1884b2ac453552badae20fa943478
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win; 
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: CL

Also happens in:
Verzió: 6.0.0.3
Build az.: 64a0f66915f38c6217de274f0aa8e15618924765
CPU szálak: 4; OS: Windows 6.3; Felületmegjelenítés: GL; 
Területi beállítások: hu-HU (hu_HU); Calc: CL

Version: 5.0.0.5
Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b
Locale: hu-HU (hu_HU)

Verzió: 4.0.0.3 (Build az.: 7545bee9c2a0782548772a21bc84a9dcc583b89)

LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Comment 1 NISZ LibreOffice Team 2020-05-04 14:51:08 UTC
Created attachment 160339 [details]
The example file after inserting a paragraph before the table
Comment 2 NISZ LibreOffice Team 2020-05-04 14:51:59 UTC
Created attachment 160340 [details]
Screenshot of the problem
Comment 3 Cor Nouws 2020-05-04 14:55:55 UTC
I can confirm the behavior.
However, going to Table > Properties .. tab Text Flow, uncheck 'Break' makes the page break (logically) disappear.
Looks as somthing that can be resolved in the template, document?
Comment 4 Regina Henschel 2020-05-04 19:00:01 UTC
From a technical point of view it is correct, that inserting a paragraph before the table will produce a new page, because the page break belongs to the table properties. It was needed, because otherwise a non standard page style cannot be set and here the page style is "First Page".

For a better user experience it would be necessary to find solutions for:
a) Insert a paragraph before a table and move the table down.
b) Insert a new page before a table.
c) Make it better visible to the user, that using a non standard page style introduces a page break, regardless whether a table or paragraph is the first element on the page.
Comment 5 NISZ LibreOffice Team 2020-05-05 06:22:40 UTC
(In reply to Cor Nouws from comment #3)
> I can confirm the behavior.
> However, going to Table > Properties .. tab Text Flow, uncheck 'Break' makes
> the page break (logically) disappear.
> Looks as somthing that can be resolved in the template, document?

I tried that, and the result was the 

- Removing the extra page break and saving the file to ODT makes the first page header completely disappear.

part in the original report.
Interesting that in the editor this works, but saving the file ruins it.

Cheers
Gabor
Comment 6 Regina Henschel 2020-05-05 10:54:44 UTC
(In reply to NISZ LibreOffice Team from comment #5)
> (In reply to Cor Nouws from comment #3)
> > I can confirm the behavior.
> > However, going to Table > Properties .. tab Text Flow, uncheck 'Break' makes
> > the page break (logically) disappear.
> > Looks as somthing that can be resolved in the template, document?
> 
> I tried that, and the result was the 
> 
> - Removing the extra page break and saving the file to ODT makes the first
> page header completely disappear.
> 
> part in the original report.
> Interesting that in the editor this works, but saving the file ruins it.

Hi Gabor, you have tried to insert a new paragraph using Alt+Enter. That keeps the table as it is, which means, that it still defines a page break with style "First page". The new paragraph does not define a page break with style, so page style "standard" is used. You need to set "First page" in the new paragraph. Then you can remove the page break from the table.

But the entire process is much easier: Do not use Alt+Enter but set cursor at start of first paragraph in first cell and simple press Enter. That inserts a paragraph before the table and moves the page-break definition from the table to the new paragraph.
Comment 7 Dieter 2020-05-12 10:50:18 UTC
(In reply to Regina Henschel from comment #6)
> But the entire process is much easier: Do not use Alt+Enter but set cursor
> at start of first paragraph in first cell and simple press Enter. That
> inserts a paragraph before the table and moves the page-break definition
> from the table to the new paragraph.

Gabor, I think, this solves your problem. Do you agree?
=> NEEDINFO
Comment 8 Gabor Kelemen (allotropia) 2020-05-27 06:26:16 UTC
(In reply to Dieter from comment #7)
> (In reply to Regina Henschel from comment #6)
> > But the entire process is much easier: Do not use Alt+Enter but set cursor
> > at start of first paragraph in first cell and simple press Enter. That
> > inserts a paragraph before the table and moves the page-break definition
> > from the table to the new paragraph.
> 
> Gabor, I think, this solves your problem. Do you agree?
> => NEEDINFO

Looks like I overthought this one. Thanks to Regina!