gc.drawText(text, rectangle.x, rectangle.y, SWT.DRAW_TRANSPARENT | SWT.DRAW_DELIMITER);
int length = gc.textExtent(text).x;
paintDecoration(cellStyle, gc, rectangle.x, rectangle.y, length, fontHeight);
} else {
String[] lines = text.split("\n"); //$NON-NLS-1$
<BUG>boolean firstline = true;
for (String line : lines) {</BUG>
int lineContentWidth = Math.min(getLengthFromCache(gc, line), rectangle.height);
<BUG>if (!isRotateClockwise()) {
if (firstline) {</BUG>
transform.rotate(-90f);

gc.drawText(text, rectangle.x, rectangle.y, SWT.DRAW_TRANSPARENT | SWT.DRAW_DELIMITER);
int length = gc.textExtent(text).x;
paintDecoration(cellStyle, gc, rectangle.x, rectangle.y, length, fontHeight);
} else {
String[] lines = text.split("\n"); //$NON-NLS-1$
boolean firstline = true;
int previousXOffset = 0;
for (String line : lines) {
int lineContentWidth = Math.min(getLengthFromCache(gc, line), rectangle.height);
if (!isRotateClockwise()) {
int xOffset = -rectangle.x
+ (-lineContentWidth - rectangle.y)
- CellStyleUtil.getVerticalAlignmentPadding(cellStyle, rectangle, lineContentWidth);
if (firstline) {
