From: Richard Heck Date: Mon, 29 Mar 2010 16:37:30 +0000 (+0000) Subject: Rename a routine. The new one comes next. X-Git-Tag: 2.0.0~3665 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=9f3253a34ea69a04b4e21196f17b2725d2396d22;p=features.git Rename a routine. The new one comes next. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33914 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/lib/lyx2lyx/lyx_2_0.py b/lib/lyx2lyx/lyx_2_0.py index b5ab97e447..97f1c507b2 100644 --- a/lib/lyx2lyx/lyx_2_0.py +++ b/lib/lyx2lyx/lyx_2_0.py @@ -90,7 +90,7 @@ def read_unicodesymbols(): unicode_reps = read_unicodesymbols() -def put_cmd_in_ert(string): +def old_put_cmd_in_ert(string): for rep in unicode_reps: string = string.replace(rep[1], rep[0].replace('\\\\', '\\')) string = string.replace('\\', "\\backslash\n") @@ -581,7 +581,7 @@ def revert_splitindex(document): content = lyx2latex(document, document.body[i:k]) # escape quotes content = content.replace('"', r'\"') - subst = [put_cmd_in_ert("\\sindex[" + itype + "]{" + content + "}")] + subst = [old_put_cmd_in_ert("\\sindex[" + itype + "]{" + content + "}")] document.body[i:k+1] = subst i = i + 1 i = 0 @@ -597,7 +597,7 @@ def revert_splitindex(document): elif indices == "false": del document.body[i:k+1] else: - subst = [put_cmd_in_ert("\\printindex[" + ptype + "]{}")] + subst = [old_put_cmd_in_ert("\\printindex[" + ptype + "]{}")] document.body[i:k+1] = subst i = i + 1 @@ -647,7 +647,7 @@ def revert_subindex(document): if indices == "false": del document.body[i:k+1] else: - subst = [put_cmd_in_ert("\\printsubindex[" + ptype + "]{}")] + subst = [old_put_cmd_in_ert("\\printsubindex[" + ptype + "]{}")] document.body[i:k+1] = subst i = i + 1 @@ -672,7 +672,7 @@ def revert_printindexall(document): if indices == "false": del document.body[i:k+1] else: - subst = [put_cmd_in_ert("\\" + ctype + "{}")] + subst = [old_put_cmd_in_ert("\\" + ctype + "{}")] document.body[i:k+1] = subst i = i + 1 @@ -887,9 +887,9 @@ def revert_percent_vspace_lengths(document): # revert the VSpace inset to ERT if percent == "True": if protected: - subst = [put_cmd_in_ert("\\vspace*{" + length + "}")] + subst = [old_put_cmd_in_ert("\\vspace*{" + length + "}")] else: - subst = [put_cmd_in_ert("\\vspace{" + length + "}")] + subst = [old_put_cmd_in_ert("\\vspace{" + length + "}")] document.body[i:i+2] = subst i = i + 1 @@ -916,9 +916,9 @@ def revert_percent_hspace_lengths(document): # revert the HSpace inset to ERT if percent == "True": if protected: - subst = [put_cmd_in_ert("\\hspace*{" + length + "}")] + subst = [old_put_cmd_in_ert("\\hspace*{" + length + "}")] else: - subst = [put_cmd_in_ert("\\hspace{" + length + "}")] + subst = [old_put_cmd_in_ert("\\hspace{" + length + "}")] document.body[i:i+3] = subst i = i + 2 @@ -943,9 +943,9 @@ def revert_hspace_glue_lengths(document): length = latex_length(length).split(",")[1] # revert the HSpace inset to ERT if protected: - subst = [put_cmd_in_ert("\\hspace*{" + length + "}")] + subst = [old_put_cmd_in_ert("\\hspace*{" + length + "}")] else: - subst = [put_cmd_in_ert("\\hspace{" + length + "}")] + subst = [old_put_cmd_in_ert("\\hspace{" + length + "}")] document.body[i:i+3] = subst i = i + 2 @@ -1182,13 +1182,13 @@ def revert_multirow(document): # write ERT to create the multirow cell # use 2 rows and 2cm as default with because the multirow span # and the column width is only hardly accessible - subst = [put_cmd_in_ert("\\multirow{2}{2cm}{")] + subst = [old_put_cmd_in_ert("\\multirow{2}{2cm}{")] document.body[i + 4:i + 4] = subst i = find_token(document.body, "", i) if i == -1: document.warning("Malformed LyX document: Could not find end of tabular cell.") break - subst = [put_cmd_in_ert("}")] + subst = [old_put_cmd_in_ert("}")] document.body[i - 3:i - 3] = subst # cell type 4 is multirow part cell i = find_token(document.body, '