if (singleLine) { endLine = 0; } else { endLine = content.getLineCount() - 1; }
endLine = singleLine ? 0 : content.getLineCount() - 1;
	void initializeRenderer() {		Rectangle trim = printer.computeTrim(0, 0, 0, 0);		Point dpi = printer.getDPI();				printerFont = new Font(printer, displayFontData.getName(), displayFontData.getHeight(), SWT.NORMAL);		clientArea = printer.getClientArea();		pageWidth = clientArea.width;		// one inch margin around text		clientArea.x = dpi.x + trim.x; 						clientArea.y = dpi.y + trim.y;		clientArea.width -= (clientArea.x + trim.width);		clientArea.height -= (clientArea.y + trim.height); 				// make the orientation of the printer gc match the control		int style = mirrored ? SWT.RIGHT_TO_LEFT : SWT.LEFT_TO_RIGHT;		gc = new GC(printer, style);		gc.setFont(printerFont);		renderer = new PrintRenderer(			printer, printerFont, gc, printerContent,			lineBackgrounds, lineStyles, bidiSegments, 			parent.tabLength, clientArea);		if (printOptions.header != null) {			int lineHeight = renderer.getLineHeight();			clientArea.y += lineHeight * 2;			clientArea.height -= lineHeight * 2;		}		if (printOptions.footer != null) {			clientArea.height -= renderer.getLineHeight() * 2;		}		pageSize = clientArea.height / renderer.getLineHeight();		StyledTextContent content = renderer.getContent();		startLine = 0;		if (singleLine) {			endLine = 0;		}		else {			endLine = content.getLineCount() - 1;		}		PrinterData data = printer.getPrinterData();		if (data.scope == PrinterData.PAGE_RANGE) {			startLine = (startPage - 1) * pageSize;		} 		else		if (data.scope == PrinterData.SELECTION) {			startLine = content.getLineAtOffset(selection.x);			if (selection.y > 0) {				endLine = content.getLineAtOffset(selection.x + selection.y - 1);			} 			else {				endLine = startLine - 1;			}		}	}