mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 22:06:15 +00:00
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:
parent
098f722a1f
commit
0345bef67b
@ -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
|
||||||
|
@ -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]],
|
||||||
|
@ -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;
|
||||||
|
@ -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()));
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user