diff --git a/lib/lyx2lyx/lyxconvert_217.py b/lib/lyx2lyx/lyxconvert_217.py index 875b4f57cb..4a389fecc6 100644 --- a/lib/lyx2lyx/lyxconvert_217.py +++ b/lib/lyx2lyx/lyxconvert_217.py @@ -22,7 +22,7 @@ bool_table = {"0": "false", "1":"true" } align_table = {"0": "top", "2": "left", "4": "right", "8": "center"} use_table = {"0": "none", "1": "parbox"} -table_meta_re = re.compile(r'') +#table_meta_re = re.compile(r'') def update_tabular(lines): i=0 while 1: diff --git a/lib/lyx2lyx/lyxconvert_218.py b/lib/lyx2lyx/lyxconvert_218.py index 4896ff6921..9759fb40c0 100644 --- a/lib/lyx2lyx/lyxconvert_218.py +++ b/lib/lyx2lyx/lyxconvert_218.py @@ -399,6 +399,31 @@ def remove_figinset(lines): new = new + ["\end_inset"] lines[i:j+1] = new +attr_re = re.compile(r' \w*="(false|0|)"') +line_re = re.compile(r'<(features|column|row|cell)') + +def update_tabular(lines): + i = 0 + while 1: + i = find_token(lines, '\\begin_inset Tabular', i) + if i == -1: + break + + # scan table header meta-info + lines[i+1] = string.replace(lines[i+1], 'version="2"', 'version="3"') + + j = find_token(lines, '', i) + if j == -1: + break + + for k in xrange(i+2,j): + if check_token(lines[k], "