From 686edf1a795b79fcbe8f97b63d81e0536ba18d90 Mon Sep 17 00:00:00 2001 From: Matteo Casalin Date: Fri, 22 Nov 2013 22:55:29 +0100 Subject: Bail out early Change-Id: I6dfa1ae680a71fef55fdd7e891cfa058a05dffa0 --- sw/source/filter/ww8/wrtw8nds.cxx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'sw') diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index a136113ad9f1..695c11382dcc 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -1180,24 +1180,22 @@ int SwWW8AttrIter::OutAttrWithRange(sal_Int32 nPos) bool SwWW8AttrIter::IsRedlineAtEnd( sal_Int32 nEnd ) const { - bool bRet = false; // search next Redline for( sal_uInt16 nPos = nCurRedlinePos; nPos < m_rExport.pDoc->GetRedlineTbl().size(); ++nPos ) { const SwPosition* pEnd = m_rExport.pDoc->GetRedlineTbl()[ nPos ]->End(); - if( pEnd->nNode == rNd ) + if( pEnd->nNode != rNd ) { - if( pEnd->nContent.GetIndex() == nEnd ) - { - bRet = true; - break; - } - } - else break; + } + + if( pEnd->nContent.GetIndex() == nEnd ) + { + return true; + } } - return bRet; + return false; } const SwRedlineData* SwWW8AttrIter::GetRedline( sal_Int32 nPos ) -- cgit