Patches for two bugs (word count and line breaking)

From: Simon Larochelle <larochelle.simon.1_at_gmail.com>
Date: Sat Oct 29 2011 - 19:07:22 CEST

I am sending a patch for the following two bugs:

1) Bug 6511: incorrect word count when the selected text extends
across several blocks.

2) On linux, when I incorporate a frame image, the line breaks for the
surrounding text are sometimes in the middle of a word. The patch
makes sure that two static pointers do not inadvertently point to a
newly created structure during the execution of fp_Textrun::split()

I also looked into bug 13101 (line spacing has no effect, text always
rendered with single line spacing). I tracked the problem to the
function fp_Line::calcBorderThickness(void) which sets the line height
without looking at the block properties. The fp_Line::setHeight()
command in fp_Line::calcBorderThickness() was added in revision 28594
(implementation of paragraph border drawing).

Note that presently the program flow is

1) set line height in fp_Line::recalcHeight(fp_Run * pLastRun)
2) assign lines to a column in fb_ColumnBreaker::_breakSection(fp_Page
* pStartPage)
3) set line height in fp_Line::calcBorderThickness(void)
4) set the position (m_iX and m_iY) of each line in fp_Column::layout(void)

Clearly step 3 needs to be eliminated. Can we simply remove the line
"setHeight(getAscent()+getDescent());" from
fp_Line::calcBorderThickness setHeight() ?

Simon

Received on Sat Oct 29 19:07:32 2011

This archive was generated by hypermail 2.1.8 : Sat Oct 29 2011 - 19:07:32 CEST