- No placement in floats

- Don't use .extend()


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5138 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Dekel Tsur 2002-08-28 13:07:50 +00:00
parent 9467fcfe57
commit 88836a4a74
2 changed files with 4 additions and 12 deletions

View File

@ -150,14 +150,14 @@ def update_tabular(lines):
paragraph = [] paragraph = []
if cell_info[m][4] == '1': if cell_info[m][4] == '1':
l = j l = j
paragraph.extend(cell_content[j][k]) paragraph = paragraph + cell_content[j][k]
while cell_info[m][4] == '1': while cell_info[m][4] == '1':
m = m + columns m = m + columns
l = l + 1 l = l + 1
paragraph.extend(cell_content[l][k]) paragraph = paragraph + cell_content[l][k]
else: else:
paragraph = cell_content[j][k] paragraph = cell_content[j][k]
tmp.extend(set_paragraph_properties(paragraph, prop_dict)) tmp = tmp + set_paragraph_properties(paragraph, prop_dict)
tmp.append('\\end_inset ') tmp.append('\\end_inset ')
tmp.append('</Cell>') tmp.append('</Cell>')
@ -169,10 +169,7 @@ def update_tabular(lines):
tmp.append('\\end_inset ') tmp.append('\\end_inset ')
tmp.append('') tmp.append('')
tmp.append('') tmp.append('')
tail = lines[i:] lines[i:i] = tmp
lines[i:] = []
lines.extend(tmp)
lines.extend(tail)
i = i + len(tmp) i = i + len(tmp)

View File

@ -25,23 +25,18 @@ floats = {
"margin": ["\\begin_inset Marginal", "margin": ["\\begin_inset Marginal",
"collapsed true"], "collapsed true"],
"fig": ["\\begin_inset Float figure", "fig": ["\\begin_inset Float figure",
"placement htbp",
"wide false", "wide false",
"collapsed false"], "collapsed false"],
"tab": ["\\begin_inset Float table", "tab": ["\\begin_inset Float table",
"placement htbp",
"wide false", "wide false",
"collapsed false"], "collapsed false"],
"alg": ["\\begin_inset Float algorithm", "alg": ["\\begin_inset Float algorithm",
"placement htbp",
"wide false", "wide false",
"collapsed false"], "collapsed false"],
"wide-fig": ["\\begin_inset Float figure", "wide-fig": ["\\begin_inset Float figure",
"placement htbp",
"wide true", "wide true",
"collapsed false"], "collapsed false"],
"wide-tab": ["\\begin_inset Float table", "wide-tab": ["\\begin_inset Float table",
"placement htbp",
"wide true", "wide true",
"collapsed false"] "collapsed false"]
} }