Wouldn't it be prudent to use some bool variables to cut these parts of
rowpainter.C

                if ((startpit == pit_ && startrow == rit_) &&
                    (endpit == pit_ && endrow == rit_)) {
                } else if (startpit == pit_ && startrow == rit_) {
                } else if (endpit == pit_ && endrow == rit_) {
        if ((startpit != pit_ && startrow != rit_ && !is_rtl)
                || (endpit != pit_ && endrow != rit_ && is_rtl))
                if (((startpit != pit_ && startrow != rit_)
                                || text_.selection.start.pos() <= pos) &&
                        ((endpit != pit_ && endrow != rit_)
                                || pos < text_.selection.end.pos())) {
        if ((startpit != pit_ && startrow != rit_ && is_rtl) ||
            (endpit != pit_ && endrow != rit_ && !is_rtl)) {

down to something that makes sense at the first look?

I wonder a bit why we suddenly need code to handle different paragraphs
there at all. rowpainter paints a single row after all...

Andre'

Reply via email to