lyx_2_0.py: fix revert_tabularvalign

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30476 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2009-07-11 13:01:16 +00:00
parent 48dd95812d
commit fa76010250

View File

@ -207,7 +207,17 @@ def revert_tabularvalign(document):
document.warning("Malformed LyX document: Could not find end of tabular.")
i = j
continue
# don't set a box for longtables, only delete tabularvalignment
p = find_token(document.body, "<features islongtable=", i)
if p > -1:
q = document.body[p].find("tabularvalignment")
if q > -1:
document.body[p] = document.body[p][:q-1]
document.body[p] = document.body[p] + '>'
i = i + 1
# when no longtable
if p == -1:
k = find_token(document.body, "<features tabularvalignment=", i)
if k == -1:
i = j