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 HTMLIsBlock false
End End
InsetLayout OptArg InsetLayout Argument
LabelString opt LabelString opt
LabelFont LabelFont
Color collapsable Color collapsable

View File

@ -1481,7 +1481,7 @@ def revert_lyx_version(document):
import lyx2lyx_version import lyx2lyx_version
version = lyx2lyx_version.version version = lyx2lyx_version.version
except: except:
pass pass
i = 0 i = 0
while 1: while 1:
@ -1697,6 +1697,27 @@ def revert_align_decimal(document):
document.body[l].replace('decimal', 'center') 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 # Conversion hub
# #
@ -1748,10 +1769,12 @@ convert = [[346, []],
[389, [convert_html_quotes]], [389, [convert_html_quotes]],
[390, []], [390, []],
[391, []], [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]], [390, [revert_align_decimal]],
[389, [revert_output_sync]], [389, [revert_output_sync]],
[388, [revert_html_quotes]], [388, [revert_html_quotes]],

View File

@ -126,7 +126,7 @@ namespace {
// Do not remove the comment below, so we get merge conflict in // Do not remove the comment below, so we get merge conflict in
// independent branches. Instead add your own. // 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<string, bool> DepClean;
typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache; 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); inset.reset(new InsetNewpage);
} else if (tmptok == "Newline") { } else if (tmptok == "Newline") {
inset.reset(new InsetNewline); inset.reset(new InsetNewline);
} else if (tmptok == "OptArg") { } else if (tmptok == "Argument") {
inset.reset(new InsetArgument(buf)); inset.reset(new InsetArgument(buf));
} else if (tmptok == "Float") { } else if (tmptok == "Float") {
inset.reset(new InsetFloat(buf, string())); inset.reset(new InsetFloat(buf, string()));

View File

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

View File

@ -39,7 +39,7 @@ private:
/// code of the inset /// code of the inset
InsetCode lyxCode() const { return ARG_CODE; } 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 /// Standard LaTeX output -- short-circuited
int latex(odocstream &, OutputParams const &) const; int latex(odocstream &, OutputParams const &) const;
/// Standard plain text output -- short-circuited /// Standard plain text output -- short-circuited