1. Create a new Writer document. 2. In Tools->Line Numbering, set Show numbering, interval 1, count blank lines. => See that there is "1" at the first line now. 3. Press Shift + Enter to insert a line break. => There is no "2" next to the new line. 4. Press Enter => There is "3" at the new paragraph, but the line above is still missing the line number.
The problem is, that the empty paragraph line is considered a "dummy"; it is decided in SwLineLayout::CalcLine, and checked in SwTextFrame::PaintExtraData. There is a similar check in SwTextFormatter::CalcRealHeight; there, it accounts for trailing line created in the end of a paragraph by a line break.
https://gerrit.libreoffice.org/c/core/+/188016
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/5355b3ec3925ddd146a6e3dd6ba28a816b39c66c tdf#167538, tdf#167540: better check if the line is dummy It will be available in 26.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.