diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-06-01 14:54:33 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-06-01 15:50:39 +0200 |
commit | 5dc453ac9027828c6a2319126b620d8d9e6c08ba (patch) | |
tree | 4b2a12263c42a21ce9fa1c4b7f5b24543509c27c | |
parent | b265ddb9232f1c76e8c0aa5db9f117525bd4d4a7 (diff) |
sw: SwTxtNode::CutText() requires a destination
Remove dead code.
Change-Id: Ib6a75718d411effe87d59d30420e2e9d7f15984e
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 4956a35f51f3..976e5c323ea3 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -2024,29 +2024,15 @@ OUString SwTextNode::InsertText( const OUString & rStr, const SwIndex & rIdx, void SwTextNode::CutText( SwTextNode * const pDest, const SwIndex & rStart, const sal_Int32 nLen ) { - if(pDest) - { - SwIndex aDestStt(pDest, pDest->GetText().getLength()); - CutImpl( pDest, aDestStt, rStart, nLen, false ); - } - else - { - OSL_FAIL("mst: entering dead and bitrotted code; fasten your seatbelts!"); - assert(false); - EraseText( rStart, nLen ); - } + assert(pDest); // Cut requires a destination + SwIndex aDestStt(pDest, pDest->GetText().getLength()); + CutImpl( pDest, aDestStt, rStart, nLen, false ); } void SwTextNode::CutImpl( SwTextNode * const pDest, const SwIndex & rDestStart, const SwIndex & rStart, sal_Int32 nLen, const bool bUpdate ) { - if(!pDest) - { - OSL_FAIL("mst: entering dead and bitrotted code; fasten your seatbelts!"); - assert(false); - EraseText( rStart, nLen ); - return; - } + assert(pDest); // Cut requires a destination // nicht im Dokument verschieben ? if( GetDoc() != pDest->GetDoc() ) |