bool const rtl = font.isVisibleRightToLeft();
- int w = 0;
+ double w = 0;
//handle first the two bounds of the element
if (i == pos || type != STRING)
w = rtl ? width() : 0;
case STRING: {
FontMetrics const & fm = theFontMetrics(font);
// FIXME: is it really necessary for x to be a double?
- int xx = x;
+ int xx = int(x);
i = fm.x2pos(str, xx, rtl);
x = xx;
break;
return false;
str = str.substr(0, new_pos - pos);
if (rtl)
- dim.wid -= w;
+ dim.wid -= int(w);
else
- dim.wid = w;
+ dim.wid = int(w);
endpos = new_pos;
return true;
}
double max_w = w - x;
if (first_below->breakAt(max_w)) {
end_ = first_below->endpos;
- dim_.wid = x + first_below->width();
+ dim_.wid = int(x + first_below->width());
// If there are other elements, they should be removed.
elements_.erase(boost::next(first_below), end);
} else if (first_below->pos > pos_) {
row.x += w;
break;
case LYX_ALIGN_CENTER:
- row.dimension().wid = width - w / 2;
+ row.dimension().wid = width - int(w / 2);
row.x += w / 2;
break;
}
for ( ; cit != cend; ++cit) {
if (row.label_hfill && cit->endpos == body_pos
&& cit->type == Row::SPACE)
- cit->dim.wid -= row.label_hfill * (nlh - 1);
+ cit->dim.wid -= int(row.label_hfill * (nlh - 1));
if (!cit->inset || !cit->inset->isHfill())
continue;
if (pm.hfillExpansion(row, cit->pos))
Paragraph const & par = text_->getPar(pit);
LBUFERR(par.beginOfBody() > 0 || par.isEnvSeparator(0));
- int w = 0;
+ double w = 0;
Row::const_iterator cit = row.begin();
Row::const_iterator const end = row.end();
// iterate over elements before main body (except the last one,
FontMetrics const & fm
= theFontMetrics(text_->labelFont(par));
- return max(0, fm.width(label) - w);
+ return max(0, fm.width(label) - int(w));
}
pos_type pos = row.pos();
boundary = false;
if (row.empty())
- x = row.x;
+ x = int(row.x);
else if (x <= row.x) {
pos = row.front().left_pos();
- x = row.x;
+ x = int(row.x);
} else if (x >= row.width() - row.right_margin) {
pos = row.back().right_pos();
x = row.width() - row.right_margin;
if (w <= x && w + cit->width() > x) {
double x_offset = x - w;
pos = cit->x2pos(x_offset);
- x = x_offset + w;
+ x = int(x_offset + w);
break;
}
w += cit->width();
<tabstop>autoBeginCB</tabstop>
<tabstop>autoEndCB</tabstop>
<tabstop>markForeignCB</tabstop>
- <tabstop>rtlGB</tabstop>
<tabstop>logicalCursorRB</tabstop>
<tabstop>visualCursorRB</tabstop>
</tabstops>
<include location="local">qt_i18n.h</include>
</includes>
<resources/>
- <connections>
- <connection>
- <sender>rtlGB</sender>
- <signal>toggled(bool)</signal>
- <receiver>logicalCursorRB</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>139</x>
- <y>317</y>
- </hint>
- <hint type="destinationlabel">
- <x>162</x>
- <y>348</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>rtlGB</sender>
- <signal>toggled(bool)</signal>
- <receiver>visualCursorRB</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>139</x>
- <y>317</y>
- </hint>
- <hint type="destinationlabel">
- <x>228</x>
- <y>348</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>rtlGB</sender>
- <signal>toggled(bool)</signal>
- <receiver>cursorMovementLA</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>139</x>
- <y>317</y>
- </hint>
- <hint type="destinationlabel">
- <x>72</x>
- <y>348</y>
- </hint>
- </hints>
- </connection>
- </connections>
</ui>