paragraph = []
if cell_info[m][4] == '1':
l = j
- paragraph.extend(cell_content[j][k])
+ paragraph = paragraph + cell_content[j][k]
while cell_info[m][4] == '1':
m = m + columns
l = l + 1
- paragraph.extend(cell_content[l][k])
+ paragraph = paragraph + cell_content[l][k]
else:
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('</Cell>')
tmp.append('\\end_inset ')
tmp.append('')
tmp.append('')
- tail = lines[i:]
- lines[i:] = []
- lines.extend(tmp)
- lines.extend(tail)
+ lines[i:i] = tmp
i = i + len(tmp)
# remove final char properties
n = len(lines)
+ changed_prop = []
+
while n:
n = n - 1
if not lines[n]:
result = prop_exp.match(lines[n])
prop = result.group(1)
if prop in properties:
+ changed_prop.append(prop)
prop_dict[prop] = result.group(2)
del lines[n]
continue
lines.append('')
break
+ for line in lines[end:]:
+ if line[:1] == '\\':
+ result = prop_exp.match(line)
+ prop = result.group(1)
+ if prop in properties and prop not in changed_prop:
+ prop_dict[prop] = result.group(2)
+
if not lines[start:] and not lines[end:]:
return []