StyleRange[] styles = event.styles; for (int i = 0; i < styles.length; i++) { StyleRange styleCopy = null; if ((printOptions.options & ST.TEXT_BACKGROUND) == 0 && styles[i].background != null) { styleCopy = (StyleRange) styles[i].clone(); styleCopy.background = null; } if ((printOptions.options & ST.TEXT_FOREGROUND) == 0 && styles[i].foreground != null) { if (styleCopy == null) { styleCopy = (StyleRange) styles[i].clone(); } styleCopy.foreground = null; } if ((printOptions.options & ST.TEXT_FONT_STYLE) == 0 && styles[i].fontStyle != SWT.NORMAL) { if (styleCopy == null) { styleCopy = (StyleRange) styles[i].clone(); } styleCopy.fontStyle = SWT.NORMAL; } if (styleCopy != null) { styles[i] = styleCopy; } }
	void cacheLineStyle(int lineOffset, String line) {		StyledTextEvent event = getLineStyleData(lineOffset, line);				if (event != null) {			lineStyles.put(new Integer(lineOffset), event);		}	}