if (pos == 0)
return false;
- Paragraph const & par = text_->getPar(pit);
+ Font const & left_font = displayFont(pit, pos - 1);
- bool left = displayFont(pit, pos - 1).isVisibleRightToLeft();
- bool right;
- if (pos == par.size())
- right = par.isRTL(bv_->buffer().params());
- else
- right = displayFont(pit, pos).isVisibleRightToLeft();
- return left != right;
+ return isRTLBoundary(pit, pos, left_font);
}
LYXERR(Debug::INFO, "MacroContext not initialised!"
<< " Going through the buffer again and hope"
<< " the context is better then.");
- updateLabels(bv_->buffer());
+ bv_->buffer().updateLabels();
parPos = text_->macrocontextPosition();
LASSERT(!parPos.empty(), /**/);
parPos.pit() = pit;
InsetList::const_iterator ii = par.insetList().begin();
InsetList::const_iterator iend = par.insetList().end();
for ( ; ii != iend; ++ii) {
- Dimension const & dim = pm.insetDimension(ii->inset);
if (ii->pos >= first && ii->pos < end) {
+ Dimension const & dim = pm.insetDimension(ii->inset);
maxasc = max(maxasc, dim.ascent());
maxdesc = max(maxdesc, dim.descent());
}