Renaming: \\begin_inset OptArg to \\begin_inset Argument.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34619 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-06-07 21:58:27 +00:00
parent 098f722a1f
commit 0345bef67b
6 changed files with 32 additions and 9 deletions

View File

@ -285,7 +285,7 @@ InsetLayout URL
HTMLIsBlock false
End
InsetLayout OptArg
InsetLayout Argument
LabelString opt
LabelFont
Color collapsable

View File

@ -1697,6 +1697,27 @@ def revert_align_decimal(document):
document.body[l].replace('decimal', 'center')
def convert_optarg(document):
" Convert \\begin_inset OptArg to \\begin_inset Argument "
i = 0
while 1:
i = find_token(document.body, '\\begin_inset OptArg', i)
if i == -1:
return
document.body[i] = "\\begin_inset Argument"
i += 1
def revert_argument(document):
" Convert \\begin_inset Argument to \\begin_inset OptArg "
i = 0
while 1:
i = find_token(document.body, '\\begin_inset Argument', i)
if i == -1:
return
document.body[i] = "\\begin_inset OptArg"
i += 1
##
# Conversion hub
#
@ -1748,10 +1769,12 @@ convert = [[346, []],
[389, [convert_html_quotes]],
[390, []],
[391, []],
[392, [convert_beamer_args]]
[392, [convert_beamer_args]],
[393, [convert_optarg]]
]
revert = [[391, [revert_beamer_args]],
revert = [[392, [revert_argument]],
[391, [revert_beamer_args]],
[390, [revert_align_decimal]],
[389, [revert_output_sync]],
[388, [revert_html_quotes]],

View File

@ -126,7 +126,7 @@ namespace {
// Do not remove the comment below, so we get merge conflict in
// independent branches. Instead add your own.
int const LYX_FORMAT = 392; // rgh: beamer layout change
int const LYX_FORMAT = 393; // rgh: rename OptArg to Argument in LyX format
typedef map<string, bool> DepClean;
typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;

View File

@ -562,7 +562,7 @@ Inset * readInset(Lexer & lex, Buffer * buf)
inset.reset(new InsetNewpage);
} else if (tmptok == "Newline") {
inset.reset(new InsetNewline);
} else if (tmptok == "OptArg") {
} else if (tmptok == "Argument") {
inset.reset(new InsetArgument(buf));
} else if (tmptok == "Float") {
inset.reset(new InsetFloat(buf, string()));

View File

@ -28,7 +28,7 @@ InsetArgument::InsetArgument(Buffer * buf)
void InsetArgument::write(ostream & os) const
{
os << "OptArg" << "\n";
os << "Argument" << "\n";
InsetCollapsable::write(os);
}

View File

@ -39,7 +39,7 @@ private:
/// code of the inset
InsetCode lyxCode() const { return ARG_CODE; }
///
docstring name() const { return from_ascii("OptArg"); }
docstring name() const { return from_ascii("Argument"); }
/// Standard LaTeX output -- short-circuited
int latex(odocstream &, OutputParams const &) const;
/// Standard plain text output -- short-circuited