private int getStartOfParagraph ( int nPara , int checkedPara ) { if ( allParas != null && nPara >= 0 && nPara < allParas . size ( ) ) { int startPos ; if ( numParasToCheck < 1 ) { startPos = 0 ; } else { startPos = checkedPara - numParasToCheck ; if ( textIsChanged && doResetCheck ) { startPos -= numParasToCheck ; } if ( startPos < 0 ) startPos = 0 ; } int pos = 0 ; for ( int i = startPos ; i < nPara ; i ++ ) { pos += allParas . get ( i ) . length ( ) + 1 ; } return pos ; } return - 1 ; }
Gives Back the StartPosition of Paragraph