summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2014-01-26 03:33:28 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-01-26 03:50:22 -0600
commitfcb208718396fe994936181f8bbfcc2346092564 (patch)
tree383ced5408f503c20e1616b086742a529050972a
parentf8b8e32d2ab92b48d6a680056d6ddb7bdc1c0a08 (diff)
coverity#1157760 : Logically dead code
Change-Id: I774cdf3a1c2a3729379a50a3ae14cca2b12f5e19
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index 1d3a5ec04dcb..ac1a62832df5 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -1132,9 +1132,8 @@ bool DocInsertStringSplitCR(
SAL_INFO("sw.uno", "DocInsertStringSplitCR: need a text node");
return false;
}
- const sal_Int32 nMaxLength = ( pTxtNd )
- ? COMPLETE_STRING - pTxtNd->GetTxt().getLength()
- : COMPLETE_STRING;
+ const sal_Int32 nMaxLength = COMPLETE_STRING - pTxtNd->GetTxt().getLength();
+
sal_Int32 nIdx = rText.indexOf( '\r', nStartIdx );
if( ( nIdx == -1 && nMaxLength < rText.getLength() ) ||
( nIdx != -1 && nMaxLength < nIdx ) )