* Licence details can be found in the file COPYING.
*
* \author Asger Alstrup
- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjønnes
* \author Jean-Marc Lasgouttes
* \author John Levon
- * \author André Pönitz
+ * \author André Pönitz
* \author Dekel Tsur
- * \author Jürgen Vigna
+ * \author Jürgen Vigna
* \author Abdelrazak Younes
*
* Full author contact details are available in file CREDITS.
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());
}
case MARGIN_FIRST_DYNAMIC:
if (layout.labeltype == LABEL_MANUAL) {
- if (pos >= par.beginOfBody()) {
+ // if we are at position 0, we are never in the body
+ if (pos > 0 && pos >= par.beginOfBody())
l_margin += labelfont_metrics.signedWidth(layout.leftmargin);
- } else {
+ else
l_margin += labelfont_metrics.signedWidth(layout.labelindent);
- }
} else if (pos != 0
// Special case to fix problems with
// theorems (JMarc)