]> git.lyx.org Git - lyx.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>
Thu, 26 Jan 2017 13:16:24 +0000 (14:16 +0100)
commit8491962c6bc1c73df076fa4807cc6ee295ccce41
tree35185bd71944c54d7fa48ef8467798ec0cdd8e37
parent7b47b9e11bd3d3eda993e8183a1609112bef047f
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.
src/Row.cpp
src/Row.h
src/TextMetrics.cpp