Aggiunta format field nella parte di lettura
git-svn-id: svn://10.65.10.50/trunk@5300 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
b9a32f04f3
commit
8384210d6b
@ -416,6 +416,7 @@ int TFile_text::read(TRecord_text& rec)
|
||||
int pos = tc.position();
|
||||
int len = tc.length();
|
||||
lavoro = buffer.mid(pos, len);
|
||||
lavoro = format_field(tc, lavoro);
|
||||
rec.add(lavoro, i);
|
||||
}
|
||||
}
|
||||
@ -447,7 +448,9 @@ int TFile_text::read(TRecord_text& rec)
|
||||
ts.restart();
|
||||
for (int i = 0; i < items; i++)
|
||||
{
|
||||
TTracciato_campo& tc = tr.get(i);
|
||||
lavoro = ts.get();
|
||||
lavoro = format_field(tc, lavoro);
|
||||
rec.add(lavoro, i);
|
||||
}
|
||||
}
|
||||
@ -563,8 +566,9 @@ TString& TFile_text::format_field(TTracciato_campo& tc, TString& campo)
|
||||
else
|
||||
campo.left_just(length, tc.filler());
|
||||
}
|
||||
else
|
||||
campo.cut(length);
|
||||
else
|
||||
if (length > 0)
|
||||
campo.cut(length);
|
||||
return campo;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user