tdf#108518 partial revert tdf#64222 sw: better DOCX im/export

...of paragraph marker formatting
6.4 commit 5ba30f588d6e41a13d68b1461345fca7a7ca61ac

Ultimately, this just reverts back to an earlier 6.4 change
(which means that this really is untested and unproven)...
> Also revert the change in checkApplyParagraphMarkFormatToNumbering()
> to consider hints that start before the end of the paragraph,
> as it has unintended side effects as pointed out by Mike Kaganski.
But those side effects were from a DOCX file,
and DOCX isn't processed here anymore.

The (unedited) comment (still) says:
//Formatting for the paragraph mark is usually set to apply only to the
//non-existent extra character at end of the text node but there can be
//other hints too (ending at nTextLen), so look for all matching hints.
//Still the (non-existent) extra character at the end is preferred

So, that suggests that there is more than one possible valid autofmt,
and that not ALL autofmts will have a start==end.

This is being considered since it fixes the one example file that I
could find that still broke when reverting OOo's 2012 hack
commit 1c22545edf9085b9f2656ca92781158b6b123db3
Fix issue #i119405: Numbering text style changed after importing the *.doc

The other alternative would be to
    // TODO remove this fallback (for WW8/RTF)

Change-Id: I69b6e31fe570742b4b9dd94d2cce2b5b9850360d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112319
Tested-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index e889ada..795228ef 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -446,12 +446,12 @@
            // (non-existent) extra character at end of the text node, but there can be
            // other hints too (ending at nTextLen), so look for all matching hints.
            // Still the (non-existent) extra character at the end is preferred if it exists.
            if (pHint->Which() == RES_TXTATR_AUTOFMT
                && pHint->GetStart() == *pHint->End())
            if (pHint->Which() == RES_TXTATR_AUTOFMT)
            {
                pSet = pHint->GetAutoFormat().GetStyleHandle();
                // When we find an empty hint (start == end) we got what we are looking for.
                break;
                if (pHint->GetStart() == *pHint->End())
                    break;
            }
        }
    }