WRITER: The next paragraph style not applied automatically on hitting ENTER for existing text

I need to reformat huge text with many different paragraphs merged into a single one.

I noticed that hitting ENTER somewhere inside existing text in order to create a new paragraph doesn’t apply the “Next style” rule from the current paragraph’s configuration. Actually, it works only with hitting ENTER at the end of the current paragraph. This occurs on completely new document, too. It can be easily reproduced on your own without sending a sample file.

I reported the issue HERE

Is there any way/workaround to apply the next style automatically on hitting ENTER without doing this for every paragraph manually?

This is intended behaviour.

To the best of my knowledge, there is no way to force application of Next Style while pressing Enter in the middle of a paragraph.

IMHO, the Next Style feature pertains to the initial writing of a document not to its editing later phase. Allowing to apply Next Style in reviewing phase could lead to avalanche situation: you apply the next style to the text following the Enter, but this new paragraph has itself a Next Style defined. Then, this next style should also be applied to the text following paragraph end. In its turn we could again have a Next Style. This modification chain might stop only at end of document which might cause a noticeable delay before you can press another key.

Though the no-op looks like a nuisance, I think it is much safer and leaves you with full control on your final formatting.

I would support @ajlittoz’ view, but since I needed a break, and a little programming can be recuperative, I sketched code for the purpose usable if urgently needed - and if the dangerous implications mentioned in the other answer can be assured to not occur.
The code:

Sub insertParaBreakWithNextStyle()
On Local Error Goto fail
doc = ThisComponent
sel = doc.CurrentSelection
If NOT (sel.Count=1) Then Exit Sub
sel0 = sel(0)
tx = sel0.Text
pStyleN = sel0.End.ParaStyleName
fStyleN = doc.StyleFamilies.getByName(_
            "ParagraphStyles").getByName(pStyleN).FollowStyle
ctrlChar = com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK
If tx.compareRegionEnds(sel0.Start, sel0.End)=0 Then
  tc = tx.CreateTextCursorByRange(sel0.End)
  tx.InsertControlCharacter(tc, ctrlChar, False)
  needCont = True
  While (tc.ParaStyleName=pStyleN) AND needCont
   tc.ParaStyleName = fStyleN
   needCont = tc.gotoNextParagraph(False)
  Wend
End If
fail:
End Sub  

Also see example doucment.
disask67165demoParaBreakWithForceNextStyle.odt (19.5 KB)

Thanks for the code! I’ve marked the first answer as the solution because it’s indeed the intended behavior. However, I’m going to also test the code (but take a closer look in order not to break the rest of the text)

Just got the hunch the code would run into an infite loop if inavertently applied inside a paragraph having its own style as follow.
Replaced the original code with an enhanced version, and also will replace the example soon.