par.cleanChanges();
change = Change(Change::UNCHANGED);
} else if (token == "\\change_inserted") {
- lex.nextToken();
+ lex.eatLine();
std::istringstream is(lex.getString());
int aid;
lyx::time_type ct;
is >> aid >> ct;
change = Change(Change::INSERTED, bp.author_map[aid], ct);
} else if (token == "\\change_deleted") {
- lex.nextToken();
+ lex.eatLine();
std::istringstream is(lex.getString());
int aid;
lyx::time_type ct;
&& !isFirstInSequence(pit, pars_)))
&& align == LYX_ALIGN_BLOCK
&& !par.params().noindent()
- // in tabulars and ert paragraphs are never indented!
+ // in charstyles, tabulars and ert paragraphs are never indented!
&& (par.ownerCode() != InsetBase::TEXT_CODE
- && par.ownerCode() != InsetBase::ERT_CODE)
+ && par.ownerCode() != InsetBase::ERT_CODE
+ && par.ownerCode() != InsetBase::CHARSTYLE_CODE)
&& (par.layout() != tclass.defaultLayout()
|| bv()->buffer()->params().paragraph_separation ==
BufferParams::PARSEP_INDENT))
int LyXText::rightMargin(Paragraph const & par) const
{
- LyXTextClass const & tclass = bv()->buffer()->params().getLyXTextClass();
-
// We do not want rightmargins on inner texts.
if (bv()->text() != this)
return 0;
+ LyXTextClass const & tclass = bv()->buffer()->params().getLyXTextClass();
int const r_margin =
::rightMargin()
+ font_metrics::signedWidth(tclass.rightmargin(),
* 4 / (par.getDepth() + 4);
return r_margin;
-
}
} else {
// Skip through initial nonword stuff.
// Treat floats and insets as words.
- while (cur.pos() != cur.lastpos() && !cur.paragraph().isWord(cur.pos()))
+ while (cur.pos() != cur.lastpos() && !cur.paragraph().isLetter(cur.pos()))
++cur.pos();
// Advance through word.
- while (cur.pos() != cur.lastpos() && cur.paragraph().isWord(cur.pos()))
+ while (cur.pos() != cur.lastpos() && cur.paragraph().isLetter(cur.pos()))
++cur.pos();
}
setCursor(cur, cur.par(), cur.pos());
} else {
// Skip through initial nonword stuff.
// Treat floats and insets as words.
- while (cur.pos() != 0 && !cur.paragraph().isWord(cur.pos() - 1))
+ while (cur.pos() != 0 && !cur.paragraph().isLetter(cur.pos() - 1))
--cur.pos();
// Advance through word.
- while (cur.pos() != 0 && cur.paragraph().isWord(cur.pos() - 1))
+ while (cur.pos() != 0 && cur.paragraph().isLetter(cur.pos() - 1))
--cur.pos();
}
setCursor(cur, cur.par(), cur.pos());
&& (pars_[cpit].layout() == pars_[tmppit].layout()
|| pars_[tmppit].layout() == tclass.defaultLayout())
&& pars_[cpit].getAlign() == pars_[tmppit].getAlign()) {
- mergeParagraph(bufparams, buf.paragraphs(), cpit);
+ mergeParagraph(bufparams, pars_, cpit);
if (cur.pos() != 0 && pars_[cpit].isSeparator(cur.pos() - 1))
--cur.pos();
switch (loc) {
case lyx::WHOLE_WORD_STRICT:
if (from.pos() == 0 || from.pos() == from_par.size()
- || !from_par.isWord(from.pos())
- || !from_par.isWord(from.pos() - 1)) {
+ || !from_par.isLetter(from.pos())
+ || !from_par.isLetter(from.pos() - 1)) {
to = from;
return;
}
case lyx::WHOLE_WORD:
// If we are already at the beginning of a word, do nothing
- if (!from.pos() || !from_par.isWord(from.pos() - 1))
+ if (!from.pos() || !from_par.isLetter(from.pos() - 1))
break;
// no break here, we go to the next
case lyx::PREVIOUS_WORD:
// always move the cursor to the beginning of previous word
- while (from.pos() && from_par.isWord(from.pos() - 1))
+ while (from.pos() && from_par.isLetter(from.pos() - 1))
--from.pos();
break;
case lyx::NEXT_WORD:
}
to = from;
Paragraph & to_par = pars_[to.par()];
- while (to.pos() < to_par.size() && to_par.isWord(to.pos()))
+ while (to.pos() < to_par.size() && to_par.isLetter(to.pos()))
++to.pos();
}
else if (y > yo_ + descent())
yy = y - yo_ - descent();
- lyxerr << " xo_=" << xo_ << " yo_=" << yo_
+ lyxerr << " xo_=" << xo_ << " yo_=" << yo_
<< " width_=" << width_ << " ascent=" << ascent()
- << " descent=" << descent()
+ << " descent=" << descent()
<< " dist=" << xx+yy <<endl;
return xx + yy;
}