tdf#159101 sw: Fix space appearing at start of line when field wraps

Adding the ' ' to ScanPortionEnd fails pretty quickly with infinite
loop.

The important part of fixing the forum-mso-en-13115.docx was that the
SetHasFollow(true) condition is not affected by a ' '.

(regression from commit 21473f46fda5f1c7f220493667a96fff7c78a7b3)

Change-Id: I6452673c0fe05ca549b63a398a977fc71db64bae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162167
Tested-by: Jenkins
Reviewed-by: Matthew Kogan <matthew@epoq.co.uk>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 4cdb542348b20d8a558cd6413c7cccdc50241fa9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162147
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 580b4a2..2f5941b 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -392,10 +392,13 @@ bool SwFieldPortion::Format( SwTextFormatInfo &rInf )
            // These characters should not be contained in the follow
            // field portion. They are handled via the HookChar mechanism.
            const sal_Unicode nNew = !aNew.isEmpty() ? aNew[0] : 0;
            auto IsHook = [](const sal_Unicode cNew) -> bool
            auto IsHook = [](const sal_Unicode cNew, bool const isSpace = false) -> bool
            {
                switch (cNew)
                {
                    case ' ': // tdf#159101 this one is not in ScanPortionEnd
                              // but is required for justified text
                        return isSpace;
                    case CH_BREAK:
                    case CH_TAB:
                    case CHAR_HARDHYPHEN: // non-breaking hyphen
@@ -412,7 +415,7 @@ bool SwFieldPortion::Format( SwTextFormatInfo &rInf )
                        return false;
                }
            };
            if (IsHook(nNew))
            if (IsHook(nNew, true))
            {
                if (nNew == CH_BREAK)
                {