OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 182 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 182 Rev 185
Line 275... Line 275...
275
                                result += suffix;
275
                                result += suffix;
276
                            }
276
                            }
277
                            if (cellSize != null && cellSize.trim().length() != 0) {
277
                            if (cellSize != null && cellSize.trim().length() != 0) {
278
                                result = splitStringCell(cellSize, result);
278
                                result = splitStringCell(cellSize, result);
279
                            }
279
                            }
-
 
280
                            String attributeValueMaxChar = this.elt.getAttributeValue("maxChar");
-
 
281
                            if (attributeValueMaxChar != null) {
-
 
282
                                int maxChar = Integer.valueOf(attributeValueMaxChar);
-
 
283
                                if (result != null && result.length() > maxChar) {
-
 
284
                                    result = result.substring(0, maxChar);
-
 
285
                                }
-
 
286
                            }
-
 
287
 
280
                            return result;
288
                            return result;
281
                        } else {
289
                        } else {
282
                            if (display == null || !display.equalsIgnoreCase("false")) {
290
                            if (display == null || !display.equalsIgnoreCase("false")) {
-
 
291
 
-
 
292
                                String attributeValueMaxChar = this.elt.getAttributeValue("maxChar");
-
 
293
                                if (attributeValueMaxChar != null) {
-
 
294
                                    int maxChar = Integer.valueOf(attributeValueMaxChar);
-
 
295
                                    if (o != null && o.toString().length() > maxChar) {
-
 
296
                                        o = o.toString().substring(0, maxChar);
-
 
297
                                    }
-
 
298
                                }
-
 
299
 
283
                                if (cellSize != null && cellSize.trim().length() != 0 && o != null) {
300
                                if (cellSize != null && cellSize.trim().length() != 0 && o != null) {
284
                                    return splitStringCell(cellSize, o.toString());
301
                                    return splitStringCell(cellSize, o.toString());
285
                                } else {
302
                                } else {
286
                                    return (o == null) ? "" : o;
303
                                    return (o == null) ? "" : o;
287
                                }
304
                                }