X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Flyx2lyx%2Flyx_1_1_6_0.py;h=dd6112423f7bf19afcb792867d6e0c1bf3411231;hb=9da74fe2078e24e1e7891784ecbfe33ff77e7f85;hp=77443c2364f0dd6ce84836453d9816f269d918bb;hpb=695bfd88ed8f02e35c4a31664ed5a2b9f135cf72;p=lyx.git diff --git a/lib/lyx2lyx/lyx_1_1_6_0.py b/lib/lyx2lyx/lyx_1_1_6_0.py index 77443c2364..dd6112423f 100644 --- a/lib/lyx2lyx/lyx_1_1_6_0.py +++ b/lib/lyx2lyx/lyx_1_1_6_0.py @@ -14,12 +14,11 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -""" Convert files to the file format generated by lyx 1.1.6""" +""" Convert files to the file format generated by lyx 1.1.6, until fix2""" import re -import string from parser_tools import find_re, find_tokens, find_token, check_token lyxtable_re = re.compile(r".*\\LyXTable$") @@ -43,7 +42,7 @@ def update_tabular(document): i = i + 1 lines[i] = "\\begin_inset Tabular" i = i + 1 - head = string.split(lines[i]) + head = lines[i].split() rows = int(head[0]) columns = int(head[1]) @@ -56,8 +55,8 @@ def update_tabular(document): row_info = [] cont_row = [] for j in range(rows): - row_info.append(string.split(lines[i])) - if string.split(lines[i])[2] == '1': + row_info.append(lines[i].split()) + if lines[i].split()[2] == '1': cont_row.append(j) del lines[i] @@ -116,7 +115,7 @@ def update_tabular(document): del lines[i] end = end -1 - if string.find(lines[i],'\\newline') != -1: + if lines[i].find('\\newline') != -1: del lines[i] l = l + 1 @@ -266,8 +265,8 @@ def set_paragraph_properties(lines, prop_dict): def update_language(document): - " Update document language, if language is default convert it to - english." + """ Update document language, if language is default convert it to + english.""" header = document.header i = find_token(header, "\\language", 0) if i == -1: @@ -275,7 +274,7 @@ def update_language(document): header.append('\\language english') return # This is the lyx behaviour: defaults to english - if string.split(header[i])[1] == 'default': + if header[i].split()[1] == 'default': header[i] = '\\language english' return