]> git.lyx.org Git - lyx.git/blobdiff - lib/lyx2lyx/lyx_1_3.py
fix bug 1332
[lyx.git] / lib / lyx2lyx / lyx_1_3.py
index ffb3c431dbcb36ba7b48f2dc9a430753fd59715d..7ced9af7fd123df542330959eeb74bb89cddb370 100644 (file)
@@ -22,7 +22,8 @@ import re
 from parser_tools import find_token, find_end_of_inset, get_value,\
                          find_token2, del_token
 
-def change_insetgraphics(lines):
+def change_insetgraphics(file):
+    lines = file.body
     i = 0
     while 1:
        i = find_token(lines, "\\begin_inset Graphics", i)
@@ -79,7 +80,8 @@ def change_insetgraphics(lines):
        i = i+1
 
 
-def change_tabular(lines):
+def change_tabular(file):
+    lines = file.body
     i = 0
     while 1:
         i = find_token(lines, "<column", i)
@@ -90,14 +92,8 @@ def change_tabular(lines):
         i = i+1
 
 
-def convert(header, body, opt):
-    change_insetgraphics(body)
-    change_tabular(body)
-    opt.format = 221
-
-
-def revert(header, body, opt):
-    opt.error("The convertion to an older format (%s) is not implemented." % opt.format)
+convert = [[221, [change_insetgraphics, change_tabular]]]
+revert  = []
 
 
 if __name__ == "__main__":