https://bugs.documentfoundation.org/show_bug.cgi?id=137738

Andreas Heinisch <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #14 from Andreas Heinisch <[email protected]> ---
Probably fixed with: https://gerrit.libreoffice.org/c/core/+/198882

tdf#167946: reimplement the fix for tdf#120677

Commit 4bb28ad217ea9d6511b6921dcd3d28328edcb4d6 (tdf#120677: restore
treatment of blanks in SwTextGuess::Guess, 2018-11-12) made NBSPs
behave like ordinary spaces for line breaking purposes. But that is
wrong; NBSPs are explicitly defined in UAX #14 to behave differently.

It turns out, that the problem in tdf#120677 was caused by specifics
of handling of SwBlankPortion, which was defined as descendant of
SwExpandPortion (since initial import). SwExpandPortion::Format uses
special logic to change the passed SwTextFormatInfo using SwTextSlot,
to allow formatting text that is different from what was initially
passed to SwTextFormatInfo. This logic isn't needed for blanks, and
happens to confuse the normal line-breaking algorithm to return zero
for blank portions with NBSP. SwExpandPortion::Paint method, also
previously used by SwBlankPortion, doesn't seem to include any logic
specifically useful for blanks as well, and respective methods of
SwTextPortion can be used instead.

This change reverts the functional change of the previous fix for
tdf#120677 (the unit test is kept), and makes SwBlankPortion inherit
from SwTextPortion, which fixes both tdf#120677 and tdf#167946.

Change-Id: I9109069093a7f58a997a93723f81137d1a6bd7f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198882
Reviewed-by: Mike Kaganski <[email protected]>
Tested-by: Jenkins

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to