On 09/14/2010 04:30 AM, Uwe Stöhr wrote:
Am 13.09.2010 08:58, schrieb Abdelrazak Younes:

You forgot the attachement...

Sorry.
In the meantime I found a solution - ugly but does exactly what I want.
This is my problem:

In line 433 of TextMetrics.cpp the text width is calculated:

int const w = max_width_ - leftMargin(max_width_, pit, ii->pos) - right_margin;

I need this result "w" in InsetLine::draw to be able to draw the line.

I tried several approaches to achieve this but only the one via a global variable does the job. Attached is the corresponding patch. It fixes the problem exactly as it should, but I would like to get rid of the global variable. Is there a better solution for that?

There must be. In any case the global variable is not acceptable, it is doomed to fail. I haven't looked at the code and don't understand the problem right now, especially this:

// FIXME: text_metrics_.width() is only about 1.0857 * mi.base.textwidth
pi_.base.textwidth = text_metrics_.width();


Why 1.0857? A better explanation would be nice. A sumary of the whole issue would be nice also. Afterwards, I'll try to help you fix it later this week.

Abdel.

Reply via email to