summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2014-01-26 03:27:47 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-01-26 03:50:22 -0600
commitf8b8e32d2ab92b48d6a680056d6ddb7bdc1c0a08 (patch)
tree05bf861816029696c7ec625e3cfa761ac80849ad /sw/source
parentefd02d15c61990f165a0b9f03db58450571775df (diff)
coverity#1157763 : Logically dead code
Change-Id: I88b9c661903ea2d5d243b071e2732cdf6efb801e
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 18d5dff0da57..288e1c7f9ec8 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -2044,10 +2044,10 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
// das Ende liegt dahinter
else if (RES_TXTATR_REFMARK != nWhich && !pHt->HasDummyChar())
{
- pNewHt = MakeTxtAttr( *GetDoc(), pHt->GetAttr(),
- nAttrStartIdx - nTxtStartIdx,
- !pEndIdx ? 0
- : ( *pEndIdx > nEnd
+ pNewHt = MakeTxtAttr( *GetDoc(),
+ pHt->GetAttr(),
+ nAttrStartIdx - nTxtStartIdx,
+ ( *pEndIdx > nEnd
? nLen
: *pEndIdx - nTxtStartIdx ));
}
@@ -2223,11 +2223,10 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
else if( RES_TXTATR_REFMARK != nWhich || bUndoNodes )
{
pNewHt = MakeTxtAttr( *GetDoc(), pHt->GetAttr(),
- nDestStart + (nAttrStartIdx - nTxtStartIdx),
- !pEndIdx ? 0
- : nDestStart + ( *pEndIdx > nEnd
- ? nLen
- : *pEndIdx - nTxtStartIdx ));
+ nDestStart + (nAttrStartIdx - nTxtStartIdx),
+ nDestStart + ( *pEndIdx > nEnd
+ ? nLen
+ : *pEndIdx - nTxtStartIdx ));
}
}
if ( pNewHt )