Two fixes involving RtL text drawing

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10513 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Martin Vermeer 2005-10-03 12:13:58 +00:00
parent c16067dbba
commit fe1c0c435b
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2005-10-03 Martin Vermeer <martin.vermeer@hut.fi>
* text.C (cursorX): two fixes involving RtL text drawing
2005-10-03 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* text3.C (dispatch): when invoking LFUN_MATH_MACRO with no type

View File

@ -2127,11 +2127,19 @@ int LyXText::cursorX(CursorSlice const & sl, bool boundary) const
// see correction above
if (boundary_correction)
if (getFont(par, ppos).isRightToLeft())
if (getFont(par, ppos).isVisibleRightToLeft())
x -= singleWidth(par, ppos);
else
x += singleWidth(par, ppos);
// Make sure inside an inset we always count from the left
// edge (bidi!) -- MV
if (sl.pos() < par.size()) {
font = getFont(par, sl.pos());
if (!boundary && font.isVisibleRightToLeft()
&& par.isInset(sl.pos()))
x -= par.getInset(sl.pos())->width();
}
return int(x);
}