dotted_line_offset_ = int(0.5 * dotted_line_thickness_) + 1;
}
- x_ = row_.x + xo_;
+ x_ = row_.left_margin + xo_;
//lyxerr << "RowPainter: x: " << x_ << " xo: " << xo_ << " yo: " << yo_ << endl;
//row_.dump();
LASSERT(inset, return);
// Backup full_repaint status because some insets (InsetTabular)
// requires a full repaint
- bool pi_full_repaint = pi_.full_repaint;
+ bool const pi_full_repaint = pi_.full_repaint;
+ bool const pi_do_spellcheck = pi_.do_spellcheck;
pi_.base.font = inset->inheritFont() ? font.fontInfo() :
pi_.base.bv->buffer().params().getFont().fontInfo();
pi_.ltr_pos = (bidi_.level(pos) % 2 == 0);
Change prev_change = change_;
pi_.change_ = change_.changed() ? change_ : par_.lookupChange(pos);
+ pi_.do_spellcheck &= inset->allowSpellCheck();
int const x1 = int(x_);
pi_.base.bv->coordCache().insets().add(inset, x1, yo_);
// Restore full_repaint status.
pi_.full_repaint = pi_full_repaint;
pi_.change_ = prev_change;
+ pi_.do_spellcheck = pi_do_spellcheck;
#ifdef DEBUG_METRICS
int const x2 = x1 + dim.wid;
for (++vpos ; vpos < end ; ++vpos) {
pos = bidi_.vis2log(vpos);
- if (!font_span.inside(pos))
+ if (!font_span.contains(pos))
break;
bool const new_spell_state =
--cpos;
new_word = par_.isSameSpellRange(pos, cpos) ;
}
- if (!new_word)
+ if (!new_word && pi_.do_spellcheck)
paintMisspelledMark(orig_x, changed);
}
}
void RowPainter::paintTooLargeMarks(bool const left, bool const right)
{
if (left)
- pi_.pain.line(dotted_line_thickness_, yo_ - row_.ascent(),
- dotted_line_thickness_, yo_ + row_.descent(),
- Color_scroll,
- Painter::line_onoffdash, dotted_line_thickness_);
+ pi_.pain.line(int(dotted_line_thickness_), yo_ - row_.ascent(),
+ int(dotted_line_thickness_), yo_ + row_.descent(),
+ Color_scroll,
+ Painter::line_onoffdash, dotted_line_thickness_);
if (right) {
- int const wwidth = pi_.base.bv->workWidth() - dotted_line_thickness_;
+ int const wwidth = pi_.base.bv->workWidth() - int(dotted_line_thickness_);
pi_.pain.line(wwidth, yo_ - row_.ascent(),
- wwidth, yo_ + row_.descent(),
- Color_scroll,
- Painter::line_onoffdash, dotted_line_thickness_);
+ wwidth, yo_ + row_.descent(),
+ Color_scroll,
+ Painter::line_onoffdash, dotted_line_thickness_);
}
}
}
// Use font span to speed things up, see above
- if (!font_span.inside(pos)) {
+ if (!font_span.contains(pos)) {
font_span = par_.fontSpan(pos);
font = text_metrics_.displayFont(pit_, pos);
// split font span if inline completion is inside
if (inlineCompletionVPos != -1
- && font_span.inside(inlineCompletionPos.pos()))
+ && font_span.contains(inlineCompletionPos.pos()))
font_span.last = inlineCompletionPos.pos();
}