From: Pavel Sanda Date: Wed, 4 Jun 2008 18:09:06 +0000 (+0000) Subject: Last rites for LFUN_BREAK_PARAGRAPH_SKIP, LFUN_DELETE_BACKWARD_SKIP, LFUN_DELETE_FORW... X-Git-Tag: 1.6.10~4523 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=f1ab9fa14721ad036fbf4649ece8cd79643ddde0;p=features.git Last rites for LFUN_BREAK_PARAGRAPH_SKIP, LFUN_DELETE_BACKWARD_SKIP, LFUN_DELETE_FORWARD_SKIP. Closing bug http://bugzilla.lyx.org/show_bug.cgi?id=4492 . Closing bug http://bugzilla.lyx.org/show_bug.cgi?id=4525 . git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25116 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/FuncCode.h b/src/FuncCode.h index 09a1afb880..213ffbb937 100644 --- a/src/FuncCode.h +++ b/src/FuncCode.h @@ -202,13 +202,13 @@ enum FuncCode LFUN_PARAGRAPH_UP_SELECT, // Asger 1996-10-01 LFUN_PARAGRAPH_DOWN, // Asger 1996-10-01 LFUN_PARAGRAPH_DOWN_SELECT, // Asger 1996-10-01 - LFUN_BREAK_PARAGRAPH_SKIP, + LFUN_NEXT_INSET_MODIFY, // JSpitzm 20080323 // 145 - LFUN_DELETE_BACKWARD_SKIP, - LFUN_DELETE_FORWARD_SKIP, LFUN_BUFFER_NEW_TEMPLATE, // Asger 1997-02-02 LFUN_BUFFER_RELOAD, // Asger 1997-02-02 LFUN_RECONFIGURE, + LFUN_BRANCH_ACTIVATE, + LFUN_BRANCH_DEACTIVATE, // 150 LFUN_INDEX_PRINT, // Lgb 97-02-27 LFUN_CELL_SPLIT, @@ -406,12 +406,9 @@ enum FuncCode LFUN_COMPLETION_POPUP, LFUN_COMPLETION_INLINE, LFUN_COMPLETION_COMPLETE, - LFUN_NEXT_INSET_MODIFY, // JSpitzm 20080323 - // 315 LFUN_GRAPHICS_GROUPS_UNIFY, + // 315 LFUN_SET_GRAPHICS_GROUP, - LFUN_BRANCH_ACTIVATE, - LFUN_BRANCH_DEACTIVATE, LFUN_LASTACTION // end of the table }; diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp index 424aa86796..dc25dfc273 100644 --- a/src/LyXAction.cpp +++ b/src/LyXAction.cpp @@ -506,8 +506,6 @@ void LyXAction::init() * \endvar */ { LFUN_ESCAPE, "escape", ReadOnly, Edit }, - { LFUN_DELETE_BACKWARD_SKIP, "delete-backward-skip", Noop, Edit }, - { LFUN_DELETE_FORWARD_SKIP, "delete-forward-skip", Noop, Edit }, /*! * \var lyx::FuncCode lyx::LFUN_DOWN * \li Action: Moves the cursor one line in downward direction. @@ -1349,15 +1347,6 @@ void LyXAction::init() * \endvar */ { LFUN_BREAK_PARAGRAPH, "break-paragraph", Noop, Edit }, -/*! - * \var lyx::FuncCode lyx::LFUN_BREAK_PARAGRAPH_SKIP - * \li Action: Breaks the current paragraph at the current location, - unless used at the beginning of a line, where it sets - the label width string to empty. - * \li Syntax: break-paragraph-skip - * \endvar - */ - { LFUN_BREAK_PARAGRAPH_SKIP, "break-paragraph-skip", Noop, Edit }, /*! * \var lyx::FuncCode lyx::LFUN_PARAGRAPH_PARAMS * \li Action: Change paragraph settings. diff --git a/src/Text3.cpp b/src/Text3.cpp index 6f93ff818d..1e5ec37f81 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -731,21 +731,6 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) moveCursor(cur, false); break; - case LFUN_DELETE_FORWARD_SKIP: - // Reverse the effect of LFUN_BREAK_PARAGRAPH_SKIP. - if (!cur.selection()) { - if (cur.pos() == cur.lastpos()) { - cursorForward(cur); - cursorBackward(cur); - } - erase(cur); - cur.resetAnchor(); - } else { - cutSelection(cur, true, false); - } - break; - - case LFUN_CHAR_DELETE_BACKWARD: if (!cur.selection()) { if (bv->getIntl().getTransManager().backspace()) { @@ -763,36 +748,12 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) } break; - case LFUN_DELETE_BACKWARD_SKIP: - // Reverse the effect of LFUN_BREAK_PARAGRAPH_SKIP. - if (!cur.selection()) { - // FIXME: look here - //CursorSlice cur = cursor(); - backspace(cur); - //anchor() = cur; - } else { - cutSelection(cur, true, false); - } - break; - case LFUN_BREAK_PARAGRAPH: cap::replaceSelection(cur); breakParagraph(cur, cmd.argument() == "inverse"); cur.resetAnchor(); break; - case LFUN_BREAK_PARAGRAPH_SKIP: { - // When at the beginning of a paragraph, remove - // indentation. Otherwise, do the same as LFUN_BREAK_PARAGRAPH. - cap::replaceSelection(cur); - if (cur.pos() == 0) - cur.paragraph().params().labelWidthString(docstring()); - else - breakParagraph(cur, false); - cur.resetAnchor(); - break; - } - // TODO // With the creation of LFUN_PARAGRAPH_PARAMS, this is now redundant, // as its duties can be performed there. Should it be removed?? @@ -2216,11 +2177,8 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd, case LFUN_LINE_BEGIN: case LFUN_LINE_END: case LFUN_CHAR_DELETE_FORWARD: - case LFUN_DELETE_FORWARD_SKIP: case LFUN_CHAR_DELETE_BACKWARD: - case LFUN_DELETE_BACKWARD_SKIP: case LFUN_BREAK_PARAGRAPH: - case LFUN_BREAK_PARAGRAPH_SKIP: case LFUN_PARAGRAPH_SPACING: case LFUN_INSET_INSERT: case LFUN_WORD_UPCASE: diff --git a/src/insets/InsetCaption.cpp b/src/insets/InsetCaption.cpp index b00588f0b4..f69b17b3bf 100644 --- a/src/insets/InsetCaption.cpp +++ b/src/insets/InsetCaption.cpp @@ -193,7 +193,6 @@ bool InsetCaption::getStatus(Cursor & cur, FuncRequest const & cmd, switch (cmd.action) { case LFUN_BREAK_PARAGRAPH: - case LFUN_BREAK_PARAGRAPH_SKIP: status.setEnabled(false); return true; diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index 27bdd01690..dcd710514d 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -735,7 +735,6 @@ bool InsetCollapsable::getStatus(Cursor & cur, FuncRequest const & cmd, return InsetText::getStatus(cur, cmd, flag); case LFUN_BREAK_PARAGRAPH: - case LFUN_BREAK_PARAGRAPH_SKIP: flag.setEnabled(layout_->isMultiPar()); return true; diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 462029dabe..66af00a0d0 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -3746,8 +3746,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd, // disable in non-fixed-width cells case LFUN_NEWLINE_INSERT: - case LFUN_BREAK_PARAGRAPH: - case LFUN_BREAK_PARAGRAPH_SKIP: { + case LFUN_BREAK_PARAGRAPH: { if (tabular.getPWidth(cur.idx()).zero()) { status.setEnabled(false); return true;