int contentHeight = (fontHeight * numberOfNewLines) + (spacing * 2);
int contentToCellDiff = (cell.getBounds().height - rectangle.height);
if (performRowResize(contentHeight, rectangle)) {
ILayer layer = cell.getLayer();
layer.doCommand(new RowResizeCommand(layer, cell
.getRowPosition(), contentHeight + contentToCellDiff));
}
if (numberOfNewLines == 1) {
int contentWidth = Math.min(getLengthFromCache(gc, text),