/*
================
CSyntaxRichEditCtrl::GetText
================
*/
void CSyntaxRichEditCtrl::GetText( idStr &text, int startCharIndex, int endCharIndex ) const {
	tom::ITextRange *range;
	BSTR bstr;
	USES_CONVERSION;

	m_TextDoc->Range( startCharIndex, endCharIndex, &range );
	range->get_Text( &bstr );
	text = W2A( bstr );
	range->Release();
	text.StripTrailingOnce( "\r" );		// remove last carriage return which is always added to a tom::ITextRange
}