tdf#52065 sw: revert tdf#45908: Cleaning up the tabs too early
commitb6850b9827a13b8f8d9b9749a982e128b7e0e867
authorJustin Luth <justin.luth@collabora.com>
Tue, 16 Mar 2021 08:16:02 +0000 (16 10:16 +0200)
committerMiklos Vajna <vmiklos@collabora.com>
Wed, 17 Mar 2021 08:28:46 +0000 (17 09:28 +0100)
tree6db2184c97059855abf2d9e7d40a11b30c079026
parent719ca339f54698482087e17e2271e18ec10de142
tdf#52065 sw: revert tdf#45908: Cleaning up the tabs too early

... can cause loops
from LO 3.5 commit 36c905d8c2874f6f984d5fbbc07784ec20c43524

The PostFormat for Center and Decimal tabstops is critical
since the space they take up is unknown until the following
text is evaluated.
The search position in these two cases is invalid
until the text position is calculated by PostFormat.

PostFormat normally returns FALSE, so in almost all
cases the rest of NewTabPortion completes. The function only
returned early if the start of the tabstop was beyond
the right margin. I assume the original intent was to
avoid potentially unnecessary processing.
However, returning early can cause looping,
which the LO 3.5 commit "fixed" by removing everything.
Well, just remove the early return and both problems are solved.

Change-Id: I4afc4cce8249f90097bc1f263df1a39bc219098d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112559
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
solenv/clang-format/excludelist
sw/CppunitTest_sw_odfexport2.mk [new file with mode: 0644]
sw/Module_sw.mk
sw/qa/core/data/README
sw/qa/core/layout/data/tdf45908_invoice.odt [new file with mode: 0644]
sw/qa/core/layout/layout.cxx
sw/qa/extras/odfexport/data/testTdf52065_centerTabs.odt [new file with mode: 0644]
sw/qa/extras/odfexport/odfexport2.cxx [new file with mode: 0644]
sw/source/core/text/porlin.hxx
sw/source/core/text/txttab.cxx