+
+ pos_type const endpos = row.endpos();
+ pos_type body_pos = par.beginOfBody();
+ if (body_pos > 0
+ && (body_pos > endpos || !par.isLineSeparator(body_pos - 1)))
+ body_pos = 0;
+
+ ParagraphMetrics & pm = par_metrics_[pit];
+ InsetList::const_iterator ii = par.insetList().begin();
+ InsetList::const_iterator iend = par.insetList().end();
+ for ( ; ii != iend; ++ii) {
+ if (ii->pos >= endpos || ii->pos < row.pos()
+ || ii->inset->lyxCode() != HFILL_CODE)
+ continue;
+ Dimension dim = row.dimension();
+ if (pm.hfillExpansion(row, ii->pos))
+ dim.wid = int(ii->pos >= body_pos ?
+ max(hfill, 5.0) : row.label_hfill);
+ else
+ dim.wid = 5;
+ // Cache the inset dimension.
+ bv_->coordCache().insets().add(ii->inset, dim);
+ pm.setInsetDimension(ii->inset, dim);
+ }