개정판 7b3d1572
line no newline test and db save fix
Change-Id: Iface48db86b84baeeedaad3df05a5226d3f5a69d
DTI_PID/DTI_PID/Configs.py | ||
---|---|---|
30 | 30 |
if int(configs[0].value) == 1: |
31 | 31 |
allowSpace = True |
32 | 32 |
|
33 |
configs = appDocData.getConfigs('Line No', 'Newline') |
|
34 |
newline = False |
|
35 |
if configs: |
|
36 |
if int(configs[0].value) == 1: |
|
37 |
newline = True |
|
38 |
|
|
33 | 39 |
configs = list(csv.reader([self.value], delimiter=LineNoConfig.DELIMITER, |
34 | 40 |
escapechar=LineNoConfig.ESCAPE_CHAR))[0] |
35 | 41 |
|
... | ... | |
38 | 44 |
|
39 | 45 |
res = [] |
40 | 46 |
if not allowSpace: |
41 |
_text = text.replace(' ', '').replace('\n', '') |
|
42 |
else: |
|
43 |
_text = text.replace('\n', '') |
|
44 |
index = [] |
|
45 |
|
|
47 |
_text = text.replace(' ', '') |
|
48 |
|
|
46 | 49 |
# code for new line in line no |
47 |
#_text = text.replace(' ', '')
|
|
48 |
#index = sorted(list(set([_text.find('\n', i) for i in range(len(_text)) if _text.find('\n', i) != -1])), reverse=True)
|
|
49 |
#if index:
|
|
50 |
# _text = _text.replace('\n', '')
|
|
50 |
index = []
|
|
51 |
if newline:
|
|
52 |
index = sorted(list(set([_text.find('\n', i) for i in range(len(_text)) if _text.find('\n', i) != -1])), reverse=True)
|
|
53 |
_text = _text.replace('\n', '') |
|
51 | 54 |
|
52 | 55 |
for propertyName in configs: |
53 | 56 |
lineProp = appDocData.getLinePropertiesByUID(propertyName) |
내보내기 Unified diff