break;
case LFUN_SECTION_SELECT: {
- Buffer & buf = *cur.buffer();
- pit_type & pit = cur.pit();
+ Buffer const & buf = *cur.buffer();
+ pit_type const pit = cur.pit();
ParagraphList & pars = buf.text().paragraphs();
ParagraphList::iterator bgn = pars.begin();
// The first paragraph of the area to be selected:
ParagraphList::iterator finish = start;
ParagraphList::iterator end = pars.end();
- setCursor(cur, cur.pit(), 0);
- Cursor old_cur = cur;
- needsUpdate |= cur.selHandle(true);
-
int const thistoclevel = start->layout().toclevel;
if (thistoclevel == Layout::NOT_IN_TOC)
break;
+ cur.pos() = 0;
+ Cursor const old_cur = cur;
+ needsUpdate |= cur.selHandle(true);
+
// Move out (down) from this section header
if (finish != end)
++finish;
- int toclevel;
// Seek the one (on same level) below
- for (; finish != end; ++finish, cur.forwardPar()) {
- toclevel = finish->layout().toclevel;
+ for (; finish != end; ++finish, ++cur.pit()) {
+ int const toclevel = finish->layout().toclevel;
if (toclevel != Layout::NOT_IN_TOC && toclevel <= thistoclevel)
break;
}
- setCursor(cur, cur.pit(), cur.lastpos());
+ cur.pos() = cur.lastpos();
needsUpdate |= cur != old_cur;
break;
break;
}
+ case LFUN_FONT_STRIKEOUT: {
+ Font font(ignore_font, ignore_language);
+ font.fontInfo().setStrikeout(FONT_TOGGLE);
+ toggleAndShow(cur, this, font);
+ break;
+ }
+
+ case LFUN_FONT_UULINE: {
+ Font font(ignore_font, ignore_language);
+ font.fontInfo().setUuline(FONT_TOGGLE);
+ toggleAndShow(cur, this, font);
+ break;
+ }
+
+ case LFUN_FONT_UWAVE: {
+ Font font(ignore_font, ignore_language);
+ font.fontInfo().setUwave(FONT_TOGGLE);
+ toggleAndShow(cur, this, font);
+ break;
+ }
+
case LFUN_FONT_UNDERLINE: {
Font font(ignore_font, ignore_language);
font.fontInfo().setUnderbar(FONT_TOGGLE);
break;
case LFUN_BRANCH_INSERT:
code = BRANCH_CODE;
- if (cur.buffer()->masterBuffer()->params().branchlist().empty())
+ if (cur.buffer()->masterBuffer()->params().branchlist().empty()
+ && cur.buffer()->params().branchlist().empty())
enable = false;
break;
case LFUN_PHANTOM_INSERT:
case LFUN_MATH_SUPERSCRIPT:
case LFUN_FONT_DEFAULT:
case LFUN_FONT_UNDERLINE:
+ case LFUN_FONT_STRIKEOUT:
+ case LFUN_FONT_UULINE:
+ case LFUN_FONT_UWAVE:
case LFUN_FONT_SIZE:
case LFUN_LANGUAGE:
case LFUN_TEXTSTYLE_APPLY: