+# Figure insert are hidden feature of lyx 1.1.6. This might be removed in the future.
+def fix_oldfloatinset(lines):
+ i = 0
+ while 1:
+ i = find_token(lines, "\\begin_inset Float", i)
+ if i == -1:
+ break
+ j = find_token(lines, "collapsed", i)
+ if j != -1:
+ lines[j:j] = ["wide false"]
+ i = i+1
+
+def change_listof(lines):
+ i = 0
+ while 1:
+ i = find_token(lines, "\\begin_inset LatexCommand \\listof", i)
+ if i == -1:
+ break
+ type = lines[i][33:-3]
+ lines[i] = "\\begin_inset FloatList "+type
+ i = i+1
+