OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 93 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 93 Rev 156
Line 425... Line 425...
425
     * @param y the row.
425
     * @param y the row.
426
     * @return the cell.
426
     * @return the cell.
427
     * @see #getImmutableCellAt(int, int)
427
     * @see #getImmutableCellAt(int, int)
428
     */
428
     */
429
    public final MutableCell<D> getCellAt(int x, int y) {
429
    public final MutableCell<D> getCellAt(int x, int y) {
-
 
430
        final Row<D> r = this.getMutableRow(y);
-
 
431
        try {
430
        return this.getMutableRow(y).getMutableCellAt(x);
432
            return r.getMutableCellAt(x);
-
 
433
        } catch (Exception e) {
-
 
434
            throw new IllegalArgumentException("Couldn't get mutable cell at " + getAddress(x, y), e);
-
 
435
        }
431
    }
436
    }
432
 
437
 
433
    public final MutableCell<D> getCellAt(String ref) {
438
    public final MutableCell<D> getCellAt(String ref) {
434
        return this.getCellAt(resolveHint(ref));
439
        return this.getCellAt(resolveHint(ref));
435
    }
440
    }
Line 1389... Line 1394...
1389
     * 
1394
     * 
1390
     * @param p the numeric coordinates, e.g. {26, 33}.
1395
     * @param p the numeric coordinates, e.g. {26, 33}.
1391
     * @return the string address, e.g. "AA34".
1396
     * @return the string address, e.g. "AA34".
1392
     */
1397
     */
1393
    static final String getAddress(Point p) {
1398
    static final String getAddress(Point p) {
-
 
1399
        return getAddress(p.x, p.y);
-
 
1400
    }
-
 
1401
 
-
 
1402
    static final String getAddress(final int x, final int y) {
1394
        if (p.x < 0 || p.y < 0)
1403
        if (x < 0 || y < 0)
1395
            throw new IllegalArgumentException("negative coordinates : " + p);
1404
            throw new IllegalArgumentException("negative coordinates : " + x + ":" + y);
1396
        return toStr(p.x) + (p.y + 1);
1405
        return toStr(x) + (y + 1);
1397
    }
1406
    }
1398
}
1407
}