private String getDocAsString ( int numCurPara ) { if ( numCurPara < 0 || allParas == null || allParas . size ( ) < numCurPara - 1 ) { return "" ; } int startPos ; int endPos ; if ( numParasToCheck < 1 ) { startPos = 0 ; endPos = allParas . size ( ) ; } else { startPos = numCurPara - numParasToCheck ; if ( textIsChanged && doResetCheck ) { startPos -= numParasToCheck ; } if ( startPos < 0 ) { startPos = 0 ; } endPos = numCurPara + 1 + numParasToCheck ; if ( ! textIsChanged ) { endPos += defaultParaCheck ; } else if ( doResetCheck ) { endPos += numParasToCheck ; } if ( endPos > allParas . size ( ) ) { endPos = allParas . size ( ) ; } } StringBuilder docText = new StringBuilder ( fixLinebreak ( allParas . get ( startPos ) ) ) ; for ( int i = startPos + 1 ; i < endPos ; i ++ ) { docText . append ( END_OF_PARAGRAPH ) . append ( fixLinebreak ( allParas . get ( i ) ) ) ; } return docText . toString ( ) ; }
Gives Back the full Text as String