Bug 158226

Summary: "Undo: Delete Paragraphs" creates page break, if a table is on first line
Product: LibreOffice Reporter: demo4
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: minor CC: ilmari.lauhakangas
Priority: medium    
Version: 3.5.0 release   
Hardware: x86-64 (AMD64)   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=158227
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 105948    

Description demo4 2023-11-15 15:28:34 UTC
Description:
Description:
The undo button creates a page break out of nothing, if the table is on the first line of the second page, and the last action was the removal of the first line above the table.

Steps to Reproduce:
1. Create a new Text Document
2. Insert a man. page break (Ctrl+Return)
(There should now be 2 cols)
3. Hit Ctrl+F12 and Return to insert an empty two by two table
4. Return to move the table one line down
5. Del to remove the line above the table
6. Ctrl+Z to undo the last action

Actual Results:
A second man. page break appears and the table goes to the third page.

Expected Results:
The Table should move one line down, like i insert an paragraph per return key.


Reproducible: Always


User Profile Reset: No

Additional Info:
Steps 4-6 can be repeated as often as desired, which leads to new page breaks being inserted correspondingly often.
Comment 1 demo4 2023-11-16 23:22:49 UTC
I made a mistake in the description of the necessary steps. The information "(There should now be 2 cols)" under point three is incorrect. However, the actions that need to be performed are unchanged.

Steps to Reproduce:
1. Create a new Text Document
2. Insert a man. page break (Ctrl+Return)
3. Hit Ctrl+F12 and Return to insert an empty two by two table
4. Return to move the table one line down
5. Del to remove the line above the table
6. Ctrl+Z to undo the last action
Comment 2 Buovjaga 2023-11-28 12:34:09 UTC
(In reply to demo4 from comment #1)
> I made a mistake in the description of the necessary steps. The information
> "(There should now be 2 cols)" under point three is incorrect. However, the
> actions that need to be performed are unchanged.
> 
> Steps to Reproduce:
> 1. Create a new Text Document
> 2. Insert a man. page break (Ctrl+Return)
> 3. Hit Ctrl+F12 and Return to insert an empty two by two table
> 4. Return to move the table one line down
> 5. Del to remove the line above the table
> 6. Ctrl+Z to undo the last action

Repro on Linux, already with 3.5.0

Arch Linux 64-bit, X11
Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: e2aa7041b9a831bbd235f698a6485e2282b6f5ca
CPU threads: 8; OS: Linux 6.6; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 28 November 2023