summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2011-09-20 22:55:27 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2011-09-20 23:14:00 +0900
commit1ac1b1499f94cbdea153faff2238b1a2e8a48b5f (patch)
tree628cc4e93595a7c6a9470461231587de22ed52cf /sw
parentd91df661db19e3e4a28e1875edec832c832a62e4 (diff)
removed unsatisfiable equalities of conditionals
by definition of ComparePosition(), neither *pEnd is equal to *pREnd in case of POS_OVERLAP_BEFORE, nor *pStt is equal to *pRStt in case of POS_OVERLAP_BEHIND
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docredln.cxx22
1 files changed, 3 insertions, 19 deletions
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 179168a0483b..851174f531e5 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -1408,33 +1408,25 @@ bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo,
SwPosition* pRStt = pRedl->Start(),
* pREnd = pRStt == pRedl->GetPoint() ? pRedl->GetMark()
: pRedl->GetPoint();
- sal_Bool bDel = sal_False;
switch( ComparePosition( *pStt, *pEnd, *pRStt, *pREnd ) )
{
case POS_EQUAL:
case POS_OUTSIDE:
- bDel = sal_True;
+ pRedl->InvalidateRange();
+ pRedlineTbl->DeleteAndDestroy( n-- );
+ bChg = sal_True;
break;
case POS_OVERLAP_BEFORE:
- if( *pEnd == *pREnd )
- bDel = sal_True;
- else
- {
pRedl->InvalidateRange();
pRedl->SetStart( *pEnd, pRStt );
// neu einsortieren
pRedlineTbl->Remove( n );
pRedlineTbl->Insert( pRedl );
--n;
- }
break;
case POS_OVERLAP_BEHIND:
- if( *pStt == *pRStt )
- bDel = sal_True;
- else
- {
pRedl->InvalidateRange();
pRedl->SetEnd( *pStt, pREnd );
if( !pRedl->HasValidRange() )
@@ -1444,7 +1436,6 @@ bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo,
pRedlineTbl->Insert( pRedl );
--n;
}
- }
break;
case POS_INSIDE:
@@ -1490,13 +1481,6 @@ bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo,
default:
break;
}
-
- if( bDel )
- {
- pRedl->InvalidateRange();
- pRedlineTbl->DeleteAndDestroy( n-- );
- bChg = sal_True;
- }
}
if( bChg )