]> git.lyx.org Git - lyx.git/blobdiff - src/Text3.cpp
Forgot these bits.
[lyx.git] / src / Text3.cpp
index 1a8eee0f090b04ca4dfee1b57dce8a2ce4a29d1d..dd701bbedab89263af7fe3718dd4c32d1819cf41 100644 (file)
@@ -718,25 +718,25 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                ParagraphList::iterator finish = start;
                ParagraphList::iterator end = pars.end();
 
-               setCursor(cur, cur.pit(), 0);
-               Cursor const 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;
 
                // Seek the one (on same level) below
-               for (; finish != end; ++finish, cur.forwardPar()) {
+               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;
@@ -1722,6 +1722,27 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                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);
@@ -2423,6 +2444,9 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
        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: