mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Check for Plain Layout as well as for Standard in these cases. We should always do this in the 1.6.x lyx2lyx.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24270 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
5ae2f40671
commit
fa9959fd41
@ -1278,7 +1278,9 @@ def revert_framed_notes(document):
|
||||
status = document.body[k]
|
||||
l = find_token(document.body, "\\begin_layout Standard", i + 1, j)
|
||||
if l == -1:
|
||||
document.warning("Malformed LyX document: Missing `\\begin_layout Standard' in Box inset.")
|
||||
l = find_token(document.body, "\\begin_layout Plain", i + 1, j)
|
||||
if l == -1:
|
||||
document.warning("Malformed LyX document: Missing `\\begin_layout' in Box inset.")
|
||||
return
|
||||
m = find_token(document.body, "\\end_layout", i + 1, j)
|
||||
if m == -1:
|
||||
@ -1460,7 +1462,9 @@ def revert_rotfloat(document):
|
||||
if get_value(document.body, 'sideways', i, j) != "false":
|
||||
l = find_token(document.body, "\\begin_layout Standard", i + 1, j)
|
||||
if l == -1:
|
||||
document.warning("Malformed LyX document: Missing `\\begin_layout Standard' in Float inset.")
|
||||
l = find_token(document.body, "\\begin_layout Plain", i + 1, j)
|
||||
if l == -1:
|
||||
document.warning("Malformed LyX document: Missing `\\begin_layout' in Float inset.")
|
||||
return
|
||||
document.body[j] = '\\begin_layout Standard\n\\begin_inset ERT\nstatus collapsed\n\n' \
|
||||
'\\begin_layout Standard\n\n\n\\backslash\n' \
|
||||
@ -1506,7 +1510,9 @@ def revert_widesideways(document):
|
||||
if get_value(document.body, 'wide', i, j) != "false":
|
||||
l = find_token(document.body, "\\begin_layout Standard", i + 1, j)
|
||||
if l == -1:
|
||||
document.warning("Malformed LyX document: Missing `\\begin_layout Standard' in Float inset.")
|
||||
l = find_token(document.body, "\\begin_layout Plain", i + 1, j)
|
||||
if l == -1:
|
||||
document.warning("Malformed LyX document: Missing `\\begin_layout' in Float inset.")
|
||||
return
|
||||
document.body[j] = '\\begin_layout Standard\n\\begin_inset ERT\nstatus collapsed\n\n' \
|
||||
'\\begin_layout Standard\n\n\n\\backslash\n' \
|
||||
|
Loading…
Reference in New Issue
Block a user