++vpos;
if (lyxrc.mark_foreign_language &&
- font.language()->lang() != "default" &&
font.language() != bview->buffer()->params.language_info) {
int y = offset + row->height() - 1;
pain.line(int(tmpx), y, int(x), y,
}
if (lyxrc.mark_foreign_language &&
- font.language()->lang() != "default" &&
font.language() != bview->buffer()->params.language_info) {
int y = offset + row->height() - 1;
pain.line(int(tmpx), y, int(x), y,
/* this must not happen before the currentrow for clear reasons.
so the trick is just to set the current row onto this row */
- long unused_y;
+ int unused_y;
GetRow(row_ptr->par(), row_ptr->pos(), unused_y);
/* ok , let us initialize the maxasc and maxdesc value.
// get the cursor row fist
Row * row = cursor.row();
- long y = cursor.y() - row->baseline();
+ int y = cursor.y() - row->baseline();
if (c != LyXParagraph::META_INSET) /* Here case LyXText::InsertInset
* already insertet the character */
cursor.par()->InsertChar(cursor.pos(), c);
}
Row * row = cursor.row();
- long y = cursor.y() - row->baseline();
+ int y = cursor.y() - row->baseline();
LyXParagraph::size_type z;
/* remember that a space at the end of a row doesnt count
* when calculating the fill */
void LyXText::GetVisibleRow(BufferView * bview, int y_offset, int x_offset,
- Row * row_ptr, long y, bool cleared)
+ Row * row_ptr, int y, bool cleared)
{
/* returns a printed row */
Painter & pain = bview->painter();
sel_end_cursor.x(),
row_ptr->height(),
LColor::selection);
- } else if (y > long(sel_start_cursor.y())
- && y < long(sel_end_cursor.y())) {
+ } else if (y > sel_start_cursor.y()
+ && y < sel_end_cursor.y()) {
pain.fillRectangle(x_offset, y_offset, w,
row_ptr->height(),
LColor::selection);
}
} else if ( sel_start_cursor.row() != row_ptr &&
sel_end_cursor.row() != row_ptr &&
- y > long(sel_start_cursor.y())
- && y < long(sel_end_cursor.y())) {
+ y > sel_start_cursor.y()
+ && y < sel_end_cursor.y()) {
pain.fillRectangle(x_offset, y_offset, w,
row_ptr->height(),
LColor::selection);
y_top += lyxfont::ascent('x',
GetFont(bview->buffer(),
row_ptr->par(), 0));
-
- pain.line(0, y_offset + y_top,
- ww, y_offset + y_top,
+ int w = (inset_owner ? inset_owner->width(bview, font) : ww);
+ int xp = static_cast<int>(inset_owner ? x : 0);
+ pain.line(xp, y_offset + y_top,
+ w, y_offset + y_top,
LColor::topline,
Painter::line_solid,
Painter::line_thick);
/* draw a bottom line */
y_bottom -= lyxfont::ascent('x', GetFont(bview->buffer(),
par, par->Last() - 1));
- pain.line(0, y_offset + y_bottom,
- ww, y_offset + y_bottom,
+ int w = (inset_owner ? inset_owner->width(bview, font) : ww);
+ int xp = static_cast<int>(inset_owner ? x : 0);
+ pain.line(xp, y_offset + y_bottom,
+ w, y_offset + y_bottom,
LColor::topline, Painter::line_solid,
Painter::line_thick);
y_bottom -= lyxfont::ascent('x', GetFont(bview->buffer(),
// returns pointer to a specified row
Row * LyXText::GetRow(LyXParagraph * par,
- LyXParagraph::size_type pos, long & y) const
+ LyXParagraph::size_type pos, int & y) const
{
Row * tmprow = firstrow;
y = 0;