Kaydet (Commit) fcb20871 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

coverity#1157760 : Logically dead code

Change-Id: I774cdf3a1c2a3729379a50a3ae14cca2b12f5e19
üst f8b8e32d
...@@ -1132,9 +1132,8 @@ bool DocInsertStringSplitCR( ...@@ -1132,9 +1132,8 @@ bool DocInsertStringSplitCR(
SAL_INFO("sw.uno", "DocInsertStringSplitCR: need a text node"); SAL_INFO("sw.uno", "DocInsertStringSplitCR: need a text node");
return false; return false;
} }
const sal_Int32 nMaxLength = ( pTxtNd ) const sal_Int32 nMaxLength = COMPLETE_STRING - pTxtNd->GetTxt().getLength();
? COMPLETE_STRING - pTxtNd->GetTxt().getLength()
: COMPLETE_STRING;
sal_Int32 nIdx = rText.indexOf( '\r', nStartIdx ); sal_Int32 nIdx = rText.indexOf( '\r', nStartIdx );
if( ( nIdx == -1 && nMaxLength < rText.getLength() ) || if( ( nIdx == -1 && nMaxLength < rText.getLength() ) ||
( nIdx != -1 && nMaxLength < nIdx ) ) ( nIdx != -1 && nMaxLength < nIdx ) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment