]> git.lyx.org Git - features.git/commit
Fix wrong splitting of text row
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 26 Jan 2017 13:10:23 +0000 (14:10 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 6 Feb 2017 09:37:12 +0000 (10:37 +0100)
commitb0673bd1fada03b93634c1f2fa7415e1f187f600
treee7eb7df7a5ce2946e8e32ef98b0177133847ddc8
parentddac5a7f599c1409b18c4985453ddf0bc398d531
Fix wrong splitting of text row

The code that tries to decide whether it is worth splitting a given
text row element had a shortcoming: it did not take into account the
left margin of the new row that would be created.

The problem is that this left margin is not the same as the left
margin of the current row, because there can be for example
indentation effects.

To fix this problem, we pass the amount of available space on the
next row as a parameter of Row::shortenIfNeeded.

Note that there is no need to care about RtL row elements at this
point, since the bidi algorithm will be applied to the row
subsequently.
(cherry picked from commit 8491962c6bc1c73df076fa4807cc6ee295ccce41)
src/Row.cpp
src/Row.h
src/TextMetrics.cpp
status.22x