newfi.setUnderbar(oldfi.underbar() == FONT_OFF ? FONT_ON : FONT_OFF);
if (newfi.strikeout() == FONT_TOGGLE)
newfi.setStrikeout(oldfi.strikeout() == FONT_OFF ? FONT_ON : FONT_OFF);
+ if (newfi.xout() == FONT_TOGGLE)
+ newfi.setXout(oldfi.xout() == FONT_OFF ? FONT_ON : FONT_OFF);
if (newfi.uuline() == FONT_TOGGLE)
newfi.setUuline(oldfi.uuline() == FONT_OFF ? FONT_ON : FONT_OFF);
if (newfi.uwave() == FONT_TOGGLE)
}
-void Text::setCursor(CursorSlice & cur, pit_type pit, pos_type pos)
-{
- LASSERT(pit != int(paragraphs().size()), return);
- cur.pit() = pit;
- cur.pos() = pos;
-
- // now some strict checking
- Paragraph const & par = getPar(pit);
-
- // None of these should happen, but we're scaredy-cats
- if (pos < 0) {
- LYXERR0("Don't like -1!");
- LATTEST(false);
- }
-
- if (pos > par.size()) {
- LYXERR0("Don't like 1, pos: " << pos
- << " size: " << par.size()
- << " par: " << pit);
- LATTEST(false);
- }
-}
-
-
void Text::setCursorIntern(Cursor & cur, pit_type pit, pos_type pos,
bool setfont, bool boundary)
{
LBUFERR(this == cur.text());
cur.boundary(boundary);
- setCursor(cur.top(), pit, pos);
+ cur.top().setPitPos(pit, pos);
if (setfont)
cur.setCurrentFont();
}