else {
FontMetrics const & fm = theFontMetrics(font);
w = fm.pos2x(str, i - pos, font.isVisibleRightToLeft());
else {
FontMetrics const & fm = theFontMetrics(font);
w = fm.pos2x(str, i - pos, font.isVisibleRightToLeft());
{
//lyxerr << "x2pos: x=" << x << " w=" << width() << " " << *this;
bool const rtl = font.isVisibleRightToLeft();
{
//lyxerr << "x2pos: x=" << x << " w=" << width() << " " << *this;
bool const rtl = font.isVisibleRightToLeft();
- // FIXME: is it really necessary for x to be a double?
- int xx = int(x);
- i = fm.x2pos(str, xx, rtl);
- x = xx;
+ i = fm.x2pos(str, x, rtl);
pos_type new_pos = x2pos(w);
if (new_pos == pos)
return false;
str = str.substr(0, new_pos - pos);
if (rtl)
pos_type new_pos = x2pos(w);
if (new_pos == pos)
return false;
str = str.substr(0, new_pos - pos);
if (rtl)
- : separator(0), label_hfill(0), x(0), right_margin(0),
+ : separator(0), label_hfill(0), left_margin(0), right_margin(0),
sel_beg(-1), sel_end(-1),
begin_margin_sel(false), end_margin_sel(false),
changed_(false), crc_(0), pos_(0), end_(0), right_boundary_(false)
sel_beg(-1), sel_end(-1),
begin_margin_sel(false), end_margin_sel(false),
changed_(false), crc_(0), pos_(0), end_(0), right_boundary_(false)
ostream & operator<<(ostream & os, Row const & row)
{
os << " pos: " << row.pos_ << " end: " << row.end_
ostream & operator<<(ostream & os, Row const & row)
{
os << " pos: " << row.pos_ << " end: " << row.end_
<< " width: " << row.dim_.wid
<< " right_margin: " << row.right_margin
<< " ascent: " << row.dim_.asc
<< " width: " << row.dim_.wid
<< " right_margin: " << row.right_margin
<< " ascent: " << row.dim_.asc
<< " separator: " << row.separator
<< " label_hfill: " << row.label_hfill
<< " row_boundary: " << row.right_boundary() << "\n";
<< " separator: " << row.separator
<< " label_hfill: " << row.label_hfill
<< " row_boundary: " << row.right_boundary() << "\n";
Row::Elements::const_iterator it = row.elements_.begin();
for ( ; it != row.elements_.end() ; ++it) {
os << "x=" << x << " => " << *it << endl;
Row::Elements::const_iterator it = row.elements_.begin();
for ( ; it != row.elements_.end() ; ++it) {
os << "x=" << x << " => " << *it << endl;
Elements::iterator const beg = elements_.begin();
Elements::iterator const end = elements_.end();
Elements::iterator last_sep = elements_.end();
Elements::iterator const beg = elements_.begin();
Elements::iterator const end = elements_.end();
Elements::iterator last_sep = elements_.end();