Browse Source

Fix perform templates if it has some of the same names areas.

develop
Mike Hiretsky 11 years ago
parent
commit
bf8b8337ff
  1. 8
      pym/cl_template.py
  2. 3
      pym/format/samba.py

8
pym/cl_template.py

@ -2006,9 +2006,9 @@ class blocText:
r = captionTxtBloc.search(text)
if r:
headersTxt.append(r.group(0))
txtSpl = text.split(r.group(0))
txtSpl = text.partition(r.group(0))
blocTxt = txtSpl[0]
txtWr = txtSpl[1]
txtWr = txtSpl[2]
rb = bodyTxtBloc.search(blocTxt)
if not blocTxt:
blocsTxt.append(blocTxt)
@ -2018,9 +2018,9 @@ class blocText:
r = captionTxtBloc.search(txtWr)
if r:
headersTxt.append(r.group(0))
txtSpl = txtWr.split(r.group(0))
txtSpl = txtWr.partition(r.group(0))
blocTxt = txtSpl[0]
txtWr = txtSpl[1]
txtWr = txtSpl[2]
rb = bodyTxtBloc.search(blocTxt)
if rb:
blocsTxt.append(rb.group(0))

3
pym/format/samba.py

@ -46,9 +46,6 @@ class samba(objShare):
# Для добавления перевода строки между областями если его нет
xmlAreas = xpath.Evaluate("child::area", self.docObj.body)
for xmlArea in xmlAreas:
if xmlArea.previousSibling and\
self.docObj.getTypeField(xmlArea.previousSibling) == "br":
continue
firstArea = False
xmlFields = xpath.Evaluate("child::field", xmlArea)
if not (xmlFields and\

Loading…
Cancel
Save