“Remove all manual breaks without removing paragraphs”
Run the code in Tools > Macros
Tools > Macros > Organise macros > Basic > Standard > My Macros > (create) Module1 > Edit
(then copy/ paste code, and save). Exit/ close window.
Then
Tools > Macros > Run > Organise macros > Standard > Module1 > Run
The code:
Remove all manual breaks without removing paragraphs;
(uploaded by Lupp. Here:
[Solved] How to remove all empty pages with a macro (View topic) • Apache OpenOffice Community Forum).
Sub removeHardPageBreaks
doc = ThisComponent
doc.UndoManager.EnterUndoContext("Remove hard PageBreaks")
paragraphs = doc.Text
for each para in paragraphs
para.BreakType = 0
next para
doc.UndoManager.LeaveUndoContext
End Sub
(you might need to copy code from the original link, there are no gaps between lines in the original, it wont stay like that here for some reason…) ← it is a matter of formatting the answer - fixed
(reformatted by ajlittoz)