RTL bugfix: inside texted, use ParagraphMetrics::insetDimension() instead of Inset::dimension().

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20422 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-09-21 21:11:05 +00:00
parent f75e4d3c4b
commit 4734433a3c

View File

@ -178,11 +178,15 @@ Point coordOffset(BufferView const & bv, DocIterator const & dit,
bool rtl = bv.textMetrics(sl.text()).isRTL(sl, boundary_i);
if (rtl)
x -= lastw;
}
// remember width for the case that sl.inset() is positioned in an RTL inset
Dimension const & dim = bv.parMetrics(sl.text(), sl.pit()).
insetDimension(&sl.inset());
lastw = dim.wid;
} else {
// remember width for the case that sl.inset() is positioned in an RTL inset
Dimension const dim = sl.inset().dimension(bv);
lastw = dim.wid;
}
//lyxerr << "Cursor::getPos, i: "
// << i << " x: " << xx << " y: " << y << endl;