RowPainter::paintForeignMark(): take a Language instead of a Font.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21253 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-10-29 08:52:13 +00:00
parent d58f8cf7f6
commit cff2f03285
2 changed files with 9 additions and 7 deletions

View File

@ -141,7 +141,7 @@ void RowPainter::paintInset(Inset const * inset, pos_type const pos)
Dimension const & dim = pm_.insetDimension(inset);
paintForeignMark(x_, font, dim.descent());
paintForeignMark(x_, font.language(), dim.descent());
x_ += dim.width();
@ -335,13 +335,14 @@ void RowPainter::paintChars(pos_type & vpos, FontInfo const & font,
}
void RowPainter::paintForeignMark(double orig_x, Font const & font, int desc)
void RowPainter::paintForeignMark(double orig_x, Language const * lang,
int desc)
{
if (!lyxrc.mark_foreign_language)
return;
if (font.language() == latex_language)
if (lang == latex_language)
return;
if (font.language() == pi_.base.bv->buffer().params().language)
if (lang == pi_.base.bv->buffer().params().language)
return;
int const y = yo_ + 1 + desc;
@ -375,7 +376,7 @@ void RowPainter::paintFromPos(pos_type & vpos)
paintArabicComposeChar(vpos, orig_font.fontInfo());
}
paintForeignMark(orig_x, orig_font);
paintForeignMark(orig_x, orig_font.language());
}
@ -781,7 +782,7 @@ void RowPainter::paintText()
x_ += width_pos;
if (pos >= body_pos)
x_ += row_.separator;
paintForeignMark(orig_x, orig_font);
paintForeignMark(orig_x, orig_font.language());
++vpos;
} else if (par_.isInset(pos)) {

View File

@ -23,6 +23,7 @@ class BufferView;
class Font;
class FontInfo;
class Inset;
class Language;
class PainterInfo;
class Paragraph;
class ParagraphList;
@ -55,7 +56,7 @@ public:
void paintOnlyInsets();
private:
void paintForeignMark(double orig_x, Font const & font, int desc = 0);
void paintForeignMark(double orig_x, Language const * lang, int desc = 0);
void paintHebrewComposeChar(pos_type & vpos, FontInfo const & font);
void paintArabicComposeChar(pos_type & vpos, FontInfo const & font);
void paintChars(pos_type & vpos, FontInfo const & font,