From 8384210d6be1a25df5e2d6ae578c41e12e1fd013 Mon Sep 17 00:00:00 2001 From: sauro Date: Mon, 29 Sep 1997 10:06:39 +0000 Subject: [PATCH] Aggiunta format field nella parte di lettura git-svn-id: svn://10.65.10.50/trunk@5300 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/filetext.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/filetext.cpp b/include/filetext.cpp index 5859a5480..be09c3bcf 100755 --- a/include/filetext.cpp +++ b/include/filetext.cpp @@ -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; }