mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Merge branch 'master' of git.lyx.org:lyx
This commit is contained in:
commit
6c70da4d9e
@ -1210,6 +1210,9 @@ def convert_latexargs(document):
|
||||
|
||||
# Find beginning and end of the containing paragraph
|
||||
parbeg = find_token_backwards(document.body, "\\begin_layout", i)
|
||||
while get_value(document.body, "\\begin_layout", parbeg) == "Plain Layout":
|
||||
# Probably a preceding inset. Continue searching ...
|
||||
parbeg = find_token_backwards(document.body, "\\begin_layout", parbeg - 1)
|
||||
if parbeg == -1:
|
||||
document.warning("Malformed lyx document: Can't find parent paragraph layout")
|
||||
continue
|
||||
@ -1675,11 +1678,12 @@ def convert_literate(document):
|
||||
|
||||
def revert_itemargs(document):
|
||||
" Reverts \\item arguments to TeX-code "
|
||||
i = 0
|
||||
while True:
|
||||
i = find_token(document.body, "\\begin_inset Argument item:", 0)
|
||||
j = find_end_of_inset(document.body, i)
|
||||
i = find_token(document.body, "\\begin_inset Argument item:", i)
|
||||
if i == -1:
|
||||
break
|
||||
return
|
||||
j = find_end_of_inset(document.body, i)
|
||||
lastlay = find_token_backwards(document.body, "\\begin_layout", i)
|
||||
beginPlain = find_token(document.body, "\\begin_layout Plain Layout", i)
|
||||
endLayout = find_token(document.body, "\\end_layout", beginPlain)
|
||||
|
@ -229,21 +229,6 @@ FontInfo InsetArgument::getLabelfont() const
|
||||
return getLayout().labelfont();
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
InsetLayout::InsetDecoration translateDecoration(std::string const & str)
|
||||
{
|
||||
if (support::compare_ascii_no_case(str, "classic") == 0)
|
||||
return InsetLayout::CLASSIC;
|
||||
if (support::compare_ascii_no_case(str, "minimalistic") == 0)
|
||||
return InsetLayout::MINIMALISTIC;
|
||||
if (support::compare_ascii_no_case(str, "conglomerate") == 0)
|
||||
return InsetLayout::CONGLOMERATE;
|
||||
return InsetLayout::DEFAULT;
|
||||
}
|
||||
|
||||
}// namespace anon
|
||||
|
||||
InsetLayout::InsetDecoration InsetArgument::decoration() const
|
||||
{
|
||||
InsetLayout::InsetDecoration dec = getLayout().decoration();
|
||||
|
@ -47,8 +47,6 @@ InsetLayout::InsetLayout() :
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
InsetLayout::InsetDecoration translateDecoration(std::string const & str)
|
||||
{
|
||||
if (support::compare_ascii_no_case(str, "classic") == 0)
|
||||
@ -60,6 +58,8 @@ InsetLayout::InsetDecoration translateDecoration(std::string const & str)
|
||||
return InsetLayout::DEFAULT;
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
InsetLayout::InsetLaTeXType translateLaTeXType(std::string const & str)
|
||||
{
|
||||
if (support::compare_ascii_no_case(str, "command") == 0)
|
||||
|
@ -272,6 +272,7 @@ private:
|
||||
|
||||
///
|
||||
InsetLayout::InsetLyXType translateLyXType(std::string const & str);
|
||||
InsetLayout::InsetDecoration translateDecoration(std::string const & str);
|
||||
|
||||
} // namespace lyx
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user