throw new java.lang.IndexOutOfBoundsException("Range out of bound (left,top,right,bottom): "+left+", "+top+", "+right+", "+bottom);
}
_matrix.insertRange(left, top, right, bottom, toRight);
final Collection changed = _matrixMerge.insertRange(left, top, right, bottom, toRight);
final Range rng = new RangeSimple(this, null, left, top, right, bottom);
_book.fireSSDataEvent(new SSDataEvent(rng, SSDataEvent.RANGE_INSERT,
toRight ? SSDataEvent.MOVE_H : SSDataEvent.MOVE_V));
if (toRight) { //copy left hand side
copyLeftFormat(left, top, right, bottom);
} else {
copyTopFormat(left, top, right, bottom);
}
for (final Iterator it = changed.iterator(); it.hasNext(); ) {
final Range[] rngs = (Range[]) it.next();
final Range org = rngs[0];
final Range mod = rngs[1];
_book.fireSSDataEvent(new SSDataEvent(mod, org, SSDataEvent.MERGE_CHANGE,
toRight ? SSDataEvent.MOVE_H : SSDataEvent.MOVE_V));
}
}