mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
lyx_1_6.py: adjust the serial letter routine according to r22811
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22812 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
11b34c23ff
commit
427f0b739c
@ -1227,24 +1227,22 @@ def convert_serial_letter(document):
|
||||
" adds an EndLetter environment to scrlttr2 documents. "
|
||||
tc = document.textclass
|
||||
if (tc == "scrlttr2"):
|
||||
i = len(document.body)
|
||||
document.body[i-2] = '\\begin_layout EndLetter\n' \
|
||||
'\\begin_inset Note Note\n' \
|
||||
'status collapsed\n\n' \
|
||||
'\\begin_layout Standard\n' \
|
||||
'keep this environment empty\n' \
|
||||
'\\end_layout\n\n' \
|
||||
'\\end_inset\n\n\n' \
|
||||
'\\end_layout\n\n'
|
||||
i = 0
|
||||
# remove ERT insets containing "\end{letter}"
|
||||
while True:
|
||||
i = find_token(document.body, "\\begin_inset ERT", i)
|
||||
document.warning(str(i))
|
||||
if i == -1:
|
||||
return
|
||||
if document.body[i+7] == "end{letter}":
|
||||
del document.body[i-1:i+14]
|
||||
document.body[i-1] = '\\begin_layout EndLetter\n' \
|
||||
'\\begin_inset Note Note\n' \
|
||||
'status collapsed\n\n' \
|
||||
'\\begin_layout Standard\n' \
|
||||
'keep this environment empty\n' \
|
||||
'\\end_layout\n\n' \
|
||||
'\\end_inset\n\n\n' \
|
||||
'\\end_layout\n\n'
|
||||
i = i + 1
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user