]> git.lyx.org Git - lyx.git/blobdiff - lib/lyx2lyx/lyx_1_1_6_3.py
File missing in the tarball
[lyx.git] / lib / lyx2lyx / lyx_1_1_6_3.py
index 73383fae64c0b2b6084b8ee91a6e5102c244fa4f..f0be612103b2d940ea87044b27256827dc27bbed 100644 (file)
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
-""" Convert files to the file format generated by lyx 1.1.6fix3"""
+""" Convert files to the file format generated by lyx 1.1.6, fix3 and fix4"""
 
 import re
-import string
 from parser_tools import find_token, find_re
 
 def bool_table(item):
@@ -70,7 +69,7 @@ row_re = re.compile(r'<row topline="?(\d)"? bottomline="?(\d)"? newpage="?(\d)"?
 
 def table_update(lines):
     " Update table's internal content to format 2."
-    lines[1] = string.replace(lines[1], '<Features', '<features')
+    lines[1] = lines[1].replace('<Features', '<features')
     res = features_re.match( lines[1] )
     if res:
         val = res.groups()
@@ -81,14 +80,14 @@ def table_update(lines):
     i = 2
     col_info = []
     while i < len(lines):
-        lines[i] = string.replace(lines[i], '<Cell', '<cell')
-        lines[i] = string.replace(lines[i], '</Cell', '</cell')
-        lines[i] = string.replace(lines[i], '<Row', '<row')
-        lines[i] = string.replace(lines[i], '</Row', '</row')
-        lines[i] = string.replace(lines[i], '<Column', '<column')
-        lines[i] = string.replace(lines[i], '</Column', '</column')
-        lines[i] = string.replace(lines[i], '</LyXTabular', '</lyxtabular')
-        k = string.find (lines[i], '<column ')
+        lines[i] = lines[i].replace('<Cell', '<cell')
+        lines[i] = lines[i].replace('</Cell', '</cell')
+        lines[i] = lines[i].replace('<Row', '<row')
+        lines[i] = lines[i].replace('</Row', '</row')
+        lines[i] = lines[i].replace('<Column', '<column')
+        lines[i] = lines[i].replace('</Column', '</column')
+        lines[i] = lines[i].replace('</LyXTabular', '</lyxtabular')
+        k = lines[i].find ('<column ')
         if k != -1:
             col_info.append(lines[i])
             del lines[i]