summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 )