Revision 13046 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/MemoryDriver.java
MemoryDriver.java | ||
---|---|---|
298 | 298 |
private void initializeFieldWidth(Object[] row) { |
299 | 299 |
fieldWidth=new int[row.length]; |
300 | 300 |
for (int i=0;i<row.length;i++) { |
301 |
fieldWidth[i]=((Value)row[i]).getWidth(); |
|
301 |
if (row[i] instanceof StringValue && row[i]==null) |
|
302 |
fieldWidth[i]=0; |
|
303 |
else |
|
304 |
fieldWidth[i]=((Value)row[i]).getWidth(); |
|
302 | 305 |
} |
303 | 306 |
} |
304 | 307 |
/** |
... | ... | |
308 | 311 |
private void actualizeFieldWidth(Object[] row) { |
309 | 312 |
for (int i=0;i<row.length;i++) { |
310 | 313 |
if (row[i] instanceof StringValue) { |
311 |
int width=((StringValue)row[i]).getWidth(); |
|
312 |
if (fieldWidth[i]<width) { |
|
313 |
fieldWidth[i]=width; |
|
314 |
if (row[i]!=null) { |
|
315 |
int width=((StringValue)row[i]).getWidth(); |
|
316 |
if (fieldWidth[i]<width) { |
|
317 |
fieldWidth[i]=width; |
|
318 |
} |
|
314 | 319 |
} |
315 | 320 |
} |
316 | 321 |
} |
Also available in: Unified diff