The bugdoc had a page break, and the paragraph after the page break is
meant to be centered, but it was aligned to the left.
This went wrong with 3c610336a5
(tdf#148214 RTF import: avoid fake paragraph for \page when possible,
2022-09-08), previously we emitted fake paragraphs in most cases, which
allowed simpler handling of pending paragraph properties. Now we have to
be careful to call checkNeedPap() exactly when parBreak() in called,
otherwise checkNeedPap() sends paragraph properties, and paragraph
properties noticed later will be lost.
Fix the problem by not sending paragraph properties unconditionally,
only in case we send the fake paragraph break as well. This continues to
allow the unwanted fake paragraphs in some cases, but it restores the
lost paragraph properties, since m_bNeedPap will be still true after we
hit the first character in the last paragraph, so \qc is sent to
dmapper.
Note that we don't have to check m_bNeedPap before checkNeedPap(), as it
returns early already when m_bNeedPap is false.
Change-Id: I683d42208072a84fe578e397ac3e29585da5aa89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145990
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins