mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Minor cleanup.
This commit is contained in:
parent
57272e837b
commit
8e33b681a8
@ -696,13 +696,13 @@ def revert_floatpclass(document):
|
||||
|
||||
i = 0
|
||||
while True:
|
||||
i = find_token(document.body, '\\begin_inset Float', i+1)
|
||||
i = find_token(document.body, '\\begin_inset Float', i + 1)
|
||||
if i == -1:
|
||||
break
|
||||
j = find_end_of_inset(document.body, i)
|
||||
k = find_token(document.body, 'placement class', i, i + 2)
|
||||
k = find_token(document.body, 'placement class', i, j)
|
||||
if k == -1:
|
||||
k = find_token(document.body, 'placement document', i, i + 2)
|
||||
k = find_token(document.body, 'placement document', i, j)
|
||||
if k != -1:
|
||||
del document.body[k]
|
||||
continue
|
||||
@ -716,14 +716,14 @@ def revert_floatalignment(document):
|
||||
|
||||
i = 0
|
||||
while True:
|
||||
i = find_token(document.body, '\\begin_inset Float', i+1)
|
||||
i = find_token(document.body, '\\begin_inset Float', i + 1)
|
||||
if i == -1:
|
||||
break
|
||||
j = find_end_of_inset(document.body, i)
|
||||
if j == -1:
|
||||
document.warning("Malformed LyX document: Can't find end of inset at line " + str(i))
|
||||
continue
|
||||
k = find_token(document.body, 'alignment', i, i+4)
|
||||
k = find_token(document.body, 'alignment', i, j)
|
||||
if k == -1:
|
||||
i = j
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user