Abdelrazak Younes wrote:
Michael Gerz wrote:

I think that you have to distinguish the document model from what is on screen. On screen, the row representation does not care if one char is a <space> or a <deleted space>, seven chars are seven chars.

I guess this is the problem and you have to skip deleted char in numberOfHfills() or something like that.
Yes, this is exactly it. The problem is that the first (and unique) row of the first ParagraphMetrics has one more character than what is in the Paragraph. The Paragraph content does not seem to reflect the deleted characters. In the following loop, the position of the last char or the row does not correspond to the position of the last char in the paragraph.

   for (pos_type p = first; p < last; ++p) {
       if (par.isHfill(p))
           ++n;
   }

Abdel.

Reply via email to