Pasting text into Writer without sections, keeping text formatting

Hi.
Is there any way to disable section creation while pasting text to Writer?

I know I can paste unformatted text, but I’d like to keep text format. Mainly just the headers, bold and italics.

Deleting sections afterwards causes LO to freeze, if the file is too big. The only way I’m able to delete sections on bigger files is to remove them from the end, holding Alt+R (one by one). Otherwise, LO freezes.

While I made a move to Linux’s version for its better handling of big files, removing sections is still what’s trips up LO Writer…

Is there any way to set that up?
Thanks!

If you have only a few sections, copy their text one by one. Put the cursor inside the section before the first character. Click inside the section right before the last paragraph mark while holding the Shift key. Copy and paste.

I am perfectly aware this is an imperfect work around needing manual attention instead of bulk copying.

PS: What is your Alt+R? I have no such shortcut. Is this some customisation of yours? A generic menu shortcut in your OS?

EDIT 2020-12-22 Sections removal

To remove the distribution of text over sections, i.e. reincorporate the sections text into the main flow:

  • Format>Sections
  • in the dialog left list of sections, select the sections you no longer need (click, then Shift+click or Ctrl+click)
  • press Remove

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.

To keep things short: I run a macro that copies webpage content for my personal use, so I can read it offline.
It often copies hundreds of articles/subpages into a file and each one pastes multiple sections, unfortunately, resulting in thousands of needles “sections”.

Alt+R is the remove button shortcut in Format>Sections.

I suggest you split your workflow into several steps:

  1. copy web page into a temporary file

  2. use some sort of script (bash, Perl, Python, awk, …) to filter the HTML

    Usually, articles are nested in <article> or <section> elements. They may cause Writer sections to be created. Remove the opening and closing tags to prevent section creation. This should have no adverse effect because well-behaved HTML pages (hoping your pages follow the HTML 5 guidelines thoroughly) always put text inside <p> or other text elements.

  3. “import” the filter file

PS: I understand Alt+R is the accelerator for the button. This requires the dialog to be open which is a bit contradictory with the notion of macro and a bit risky.

I’m aware there are ways of achieving this with more steps, but what I’m looking for is a way of reducing these.
At one point I even tested pasting into Calc first, then copying that into Writer (paste as rtf) and converting the table into text. Not a terrible option, because I only lose out on the headings, which I can regain with a regex search/replace.

Still, this is not really what I want. Is there some way to disable sections for a document, perhaps? I rarely ever create sections myself, so I’d rather just go without them.

P.S. I didn’t put the dialog in the copying macro. And I’m not using LO’s macros, but an outside keyboard macro.

I hope the update wasn’t meant for me, but as a general pointer in case somebody else wanders into this thread/question
Like I said in the question itself + the follow-up comment, the problem is that too many sections is created by pasting, basically disabling the option to mass delete them.
(Yes, the option does exist, but LO isn’t able to handle the request. I once left it processing the request for over an hour, after which I decided to kill the process instead.)

@Grad: you didn’t mention your LO version. Yhis may make a difference. I work with LO 7.0.4.2.

“too many sections”: what is the order of magnitude? Hundreds? A thousand?