mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +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
|
# Find beginning and end of the containing paragraph
|
||||||
parbeg = find_token_backwards(document.body, "\\begin_layout", i)
|
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:
|
if parbeg == -1:
|
||||||
document.warning("Malformed lyx document: Can't find parent paragraph layout")
|
document.warning("Malformed lyx document: Can't find parent paragraph layout")
|
||||||
continue
|
continue
|
||||||
@ -1675,11 +1678,12 @@ def convert_literate(document):
|
|||||||
|
|
||||||
def revert_itemargs(document):
|
def revert_itemargs(document):
|
||||||
" Reverts \\item arguments to TeX-code "
|
" Reverts \\item arguments to TeX-code "
|
||||||
|
i = 0
|
||||||
while True:
|
while True:
|
||||||
i = find_token(document.body, "\\begin_inset Argument item:", 0)
|
i = find_token(document.body, "\\begin_inset Argument item:", i)
|
||||||
j = find_end_of_inset(document.body, i)
|
|
||||||
if i == -1:
|
if i == -1:
|
||||||
break
|
return
|
||||||
|
j = find_end_of_inset(document.body, i)
|
||||||
lastlay = find_token_backwards(document.body, "\\begin_layout", i)
|
lastlay = find_token_backwards(document.body, "\\begin_layout", i)
|
||||||
beginPlain = find_token(document.body, "\\begin_layout Plain Layout", i)
|
beginPlain = find_token(document.body, "\\begin_layout Plain Layout", i)
|
||||||
endLayout = find_token(document.body, "\\end_layout", beginPlain)
|
endLayout = find_token(document.body, "\\end_layout", beginPlain)
|
||||||
|
@ -229,21 +229,6 @@ FontInfo InsetArgument::getLabelfont() const
|
|||||||
return getLayout().labelfont();
|
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 InsetArgument::decoration() const
|
||||||
{
|
{
|
||||||
InsetLayout::InsetDecoration dec = getLayout().decoration();
|
InsetLayout::InsetDecoration dec = getLayout().decoration();
|
||||||
|
@ -47,8 +47,6 @@ InsetLayout::InsetLayout() :
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
InsetLayout::InsetDecoration translateDecoration(std::string const & str)
|
InsetLayout::InsetDecoration translateDecoration(std::string const & str)
|
||||||
{
|
{
|
||||||
if (support::compare_ascii_no_case(str, "classic") == 0)
|
if (support::compare_ascii_no_case(str, "classic") == 0)
|
||||||
@ -60,6 +58,8 @@ InsetLayout::InsetDecoration translateDecoration(std::string const & str)
|
|||||||
return InsetLayout::DEFAULT;
|
return InsetLayout::DEFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
InsetLayout::InsetLaTeXType translateLaTeXType(std::string const & str)
|
InsetLayout::InsetLaTeXType translateLaTeXType(std::string const & str)
|
||||||
{
|
{
|
||||||
if (support::compare_ascii_no_case(str, "command") == 0)
|
if (support::compare_ascii_no_case(str, "command") == 0)
|
||||||
|
@ -272,6 +272,7 @@ private:
|
|||||||
|
|
||||||
///
|
///
|
||||||
InsetLayout::InsetLyXType translateLyXType(std::string const & str);
|
InsetLayout::InsetLyXType translateLyXType(std::string const & str);
|
||||||
|
InsetLayout::InsetDecoration translateDecoration(std::string const & str);
|
||||||
|
|
||||||
} // namespace lyx
|
} // namespace lyx
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user