mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
Kill LFUN_PARAGRAPH_SPACING in favour of LFUN_PARAGRAPH_PARAMS.
We don't want duplicit code. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30638 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
70e6cac727
commit
091e3908b0
@ -73,6 +73,9 @@ The following LyX functions have been removed:
|
||||
|
||||
- LFUN_NEXT_INSET_TOGGLE ("next-inset-toggle"): use "inset-toggle" instead.
|
||||
|
||||
- LFUN_PARAGRAPH_SPACING ("paragraph-spacing"): use "paragraph-params" instead.
|
||||
|
||||
|
||||
The following LyX functions have been changed:
|
||||
|
||||
- LFUN_INSET_TOGGLE ("inset-toggle"): For some insets, this function was used
|
||||
|
@ -244,7 +244,7 @@ enum FuncCode
|
||||
LFUN_LANGUAGE, // Dekel 20000203
|
||||
LFUN_ERT_INSERT, // Jug 20000218
|
||||
LFUN_FOOTNOTE_INSERT, // Jug 20000307
|
||||
LFUN_PARAGRAPH_SPACING, // Lgb 20000411
|
||||
LFUN_MATH_AMS_MATRIX, // uwestoehr 12-07-2009
|
||||
// 180
|
||||
LFUN_TABULAR_INSERT, // Jug 20000412
|
||||
LFUN_LOFVIEW, // Dekel 20000519
|
||||
@ -439,7 +439,6 @@ enum FuncCode
|
||||
LFUN_BRANCH_ADD_INSERT,
|
||||
// 340
|
||||
LFUN_BRANCHES_RENAME, // spitz 20090709
|
||||
LFUN_MATH_AMS_MATRIX, // uwestoehr 12-07-2009
|
||||
|
||||
LFUN_LASTACTION // end of the table
|
||||
};
|
||||
|
@ -1908,14 +1908,6 @@ void LyXAction::init()
|
||||
* \endvar
|
||||
*/
|
||||
{ LFUN_PARAGRAPH_GOTO, "paragraph-goto", ReadOnly, Edit },
|
||||
/*!
|
||||
* \var lyx::FuncCode lyx::LFUN_PARAGRAPH_SPACING
|
||||
* \li Action: Adjusts the spacing of the paragraph.
|
||||
* \li Syntax: paragraph-spacing
|
||||
* \ii Notion: This LFUN is obsolete. Please use LFUN_PARAGRAPH_PARAMS.
|
||||
* \endvar
|
||||
*/
|
||||
{ LFUN_PARAGRAPH_SPACING, "paragraph-spacing", Noop, Edit },
|
||||
/*!
|
||||
* \var lyx::FuncCode lyx::LFUN_BREAK_PARAGRAPH
|
||||
* \li Action: Breaks the current paragraph at the current location.
|
||||
|
@ -1048,49 +1048,6 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
||||
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??
|
||||
// FIXME For now, it can just dispatch LFUN_PARAGRAPH_PARAMS...
|
||||
case LFUN_PARAGRAPH_SPACING: {
|
||||
Paragraph & par = cur.paragraph();
|
||||
Spacing::Space cur_spacing = par.params().spacing().getSpace();
|
||||
string cur_value = "1.0";
|
||||
if (cur_spacing == Spacing::Other)
|
||||
cur_value = par.params().spacing().getValueAsString();
|
||||
|
||||
istringstream is(to_utf8(cmd.argument()));
|
||||
string tmp;
|
||||
is >> tmp;
|
||||
Spacing::Space new_spacing = cur_spacing;
|
||||
string new_value = cur_value;
|
||||
if (tmp.empty()) {
|
||||
lyxerr << "Missing argument to `paragraph-spacing'"
|
||||
<< endl;
|
||||
} else if (tmp == "single") {
|
||||
new_spacing = Spacing::Single;
|
||||
} else if (tmp == "onehalf") {
|
||||
new_spacing = Spacing::Onehalf;
|
||||
} else if (tmp == "double") {
|
||||
new_spacing = Spacing::Double;
|
||||
} else if (tmp == "other") {
|
||||
new_spacing = Spacing::Other;
|
||||
string tmpval = "0.0";
|
||||
is >> tmpval;
|
||||
lyxerr << "new_value = " << tmpval << endl;
|
||||
if (tmpval != "0.0")
|
||||
new_value = tmpval;
|
||||
} else if (tmp == "default") {
|
||||
new_spacing = Spacing::Default;
|
||||
} else {
|
||||
lyxerr << to_utf8(_("Unknown spacing argument: "))
|
||||
<< to_utf8(cmd.argument()) << endl;
|
||||
}
|
||||
if (cur_spacing != new_spacing || cur_value != new_value)
|
||||
par.params().spacing(Spacing(new_spacing, new_value));
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_INSET_INSERT: {
|
||||
cur.recordUndo();
|
||||
|
||||
@ -2660,7 +2617,6 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
case LFUN_LINE_END:
|
||||
case LFUN_CHAR_DELETE_FORWARD:
|
||||
case LFUN_CHAR_DELETE_BACKWARD:
|
||||
case LFUN_PARAGRAPH_SPACING:
|
||||
case LFUN_INSET_INSERT:
|
||||
case LFUN_WORD_UPCASE:
|
||||
case LFUN_WORD_LOWCASE:
|
||||
|
@ -311,7 +311,6 @@ bool InsetText::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
case LFUN_LAYOUT_PARAGRAPH:
|
||||
case LFUN_PARAGRAPH_PARAMS:
|
||||
case LFUN_PARAGRAPH_PARAMS_APPLY:
|
||||
case LFUN_PARAGRAPH_SPACING:
|
||||
case LFUN_PARAGRAPH_UPDATE:
|
||||
status.setEnabled(allowParagraphCustomization());
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user