Element const & back() const { return elements_.back(); }
/// remove last element
void pop_back();
- /// remove all row elements
- void clear() { *this = Row(); }
/**
* if row width is too large, remove all elements after last
* separator and update endpos if necessary. If all that
do {
if (row_index == pm.rows().size())
pm.rows().push_back(Row());
+ else
+ pm.rows()[row_index] = Row();
Row & row = pm.rows()[row_index];
row.pit(pit);
row.pos(first);
- row.pit(pit);
need_new_row = breakRow(row, right_margin);
setRowHeight(row);
row.changed(true);
*/
bool TextMetrics::breakRow(Row & row, int const right_margin) const
{
+ LATTEST(row.empty());
Paragraph const & par = text_->getPar(row.pit());
pos_type const end = par.size();
pos_type const pos = row.pos();
bool const is_rtl = text_->isRTL(row.pit());
bool need_new_row = false;
- row.clear();
row.left_margin = leftMargin(row.pit(), pos);
row.right_margin = right_margin;
if (is_rtl)