]> git.lyx.org Git - lyx.git/blobdiff - lib/lyx2lyx/lyxconvert_216.py
Fix the missing "Figure #:" label from the caption of a figure float.
[lyx.git] / lib / lyx2lyx / lyxconvert_216.py
index 99f715fdedc5758cd6682a3c44ad8a419bc7f6b4..1b0a6c75d99eff846d6e950f33c9a4286b3b91e8 100644 (file)
@@ -1,4 +1,5 @@
 # This file is part of lyx2lyx
+# -*- coding: iso-8859-1 -*-
 # Copyright (C) 2002 José Matos <jamatos@lyx.org>
 #
 # This program is free software; you can redistribute it and/or
@@ -46,7 +47,7 @@ def update_tabular(lines):
         lines.insert(i, '<Features rotate="%s" islongtable="%s" endhead="%s" endfirsthead="%s" endfoot="%s" endlastfoot="%s">' % (head[2],head[3],head[4],head[5],head[6],head[7]))
 
         i = i +1
-        
+
         row_info = []
         cont_row = []
         for j in range(rows):
@@ -78,7 +79,7 @@ def update_tabular(lines):
         del lines[i]
         if not lines[i]:
             del lines[i]
-        
+
         # Read cells
         l = 0
         cell_content = []
@@ -154,11 +155,12 @@ def update_tabular(lines):
                         while cell_info[m][4] == '1':
                             m = m + columns
                             l = l + 1
+                            if l >= rows: break
                             paragraph = paragraph + cell_content[l][k]
                     else:
                         paragraph = cell_content[j][k]
                     tmp = tmp + set_paragraph_properties(paragraph, prop_dict)
-                
+
                 tmp.append('\\end_inset ')
                 tmp.append('</Cell>')
                 tmp.append('</Column>')
@@ -249,7 +251,7 @@ def set_paragraph_properties(lines, prop_dict):
 
     if not lines[start:] and not lines[end:]:
         return []
-    
+
     result = lines[:start] + aux[:] + lines[end:]
     if insert and result[0] != '':
         return [''] + result[:]