Bug 125651 [Forms] Wrapped hyperlinks cause artifacts in FormText
There seems to be an off-by-one error in the FormText widget between images and text. See the example below and the corresponding screenshot: final FormText text = formToolkit.createFormText(parent, false/*no links so not a concern*/); text.setForeground(formColors.getColor(DataEntryFormColors.FORM_ELEMENT_FOREGROUND)); text.setBackground(formColors.getColor(DataEntryFormColors.FORM_LABEL_BACKGROUND)); text.setWhitespaceNormalized(false/*don't remove whitespace*/); text.setText("<form><p><img href=\"addNewLabel\"/> <img href=\"deleteLabel\"/>This is a really really really long line to test the wrapping of text. This is a really really really long line to test the wrapping of text. This is a really really really long line to test the wrapping of text.</p></form>", true/*parse tags*/, false/*no links so no concern*/); text.setImage("addNewLabel", addNewLabelImage); text.setImage("deleteLabel", deleteLabelImage); This widget is within a form using TableWrapLayout. (SWT 3.2M4)
bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/TextSegment.java
return false;
	}
	public boolean intersects(Rectangle rect) {
		for (int i = 0; i < areaRectangles.size(); i++) {
			AreaRectangle ar = (AreaRectangle) areaRectangles.get(i);
			if (ar.intersects(rect))
				return true;
			if (i<areaRectangles.size()-1) {
				
				Rectangle top = ar.rect;
				Rectangle bot = ((AreaRectangle)areaRectangles.get(i+1)).rect;
				if (top.y+top.height < bot.y) {
					int y = top.y+top.height;
					int height = bot.y-y;
					int left = Math.max(top.x, bot.x);
					int right = Math.min(top.x+top.width, bot.x+bot.width);
					Rectangle gap = new Rectangle(left, y, right-left, height);
					if (gap.intersects(rect))
						return true;
				}
			}
		}
		return false;
	}
	public Rectangle getBounds() {
		if (areaRectangles.size() == 0)
			return new Rectangle(0, 0, 0, 0);
		
		AreaRectangle ar0 = (AreaRectangle) areaRectangles.get(0);
		Rectangle bounds = Geometry.copy(ar0.rect);