diff options
author | Jan Holesovsky <kendy@suse.cz> | 2013-04-11 10:51:19 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2013-04-11 10:52:28 +0200 |
commit | e1695087a3755a80de6a14490b7e4395742cf161 (patch) | |
tree | a06d1ca39bdcf44f5505e620c6be724fd050e57f /sw | |
parent | 30704655570ea2b4c6943e18de02497284b2174c (diff) |
i#29679: Return early not to crash on ooo29679-57.odt in dbgutil build.
Change-Id: I467f6383ec469f5719fd49914d81605b2a5679a1
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/laycache.cxx | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index 20f23c1fd629..807a40b14c67 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -338,7 +338,6 @@ sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const if( !pImpl ) return sal_True; const SwRootFrm *pRootFrm = rDoc.GetCurrentLayout(); - sal_Bool bRet = sal_True; if( pRootFrm ) { sal_uInt16 nIndex = 0; @@ -350,11 +349,8 @@ sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const while( pPage ) { if( nIndex >= pImpl->size() ) - { - if( bRet ) - bRet = sal_False; - break; - } + return sal_False; + SwLayoutFrm* pLay = pPage->FindBodyCont(); SwFrm* pTmp = pLay ? pLay->ContainsAny() : NULL; if( pTmp && pTmp->IsSctFrm() ) @@ -374,8 +370,7 @@ sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const ( bFollow ? ((SwTxtFrm*)pTmp)->GetOfst() : STRING_LEN ) != pImpl->GetBreakOfst( nIndex ) ) { - if( bRet ) - bRet = sal_False; + return sal_False; } ++nIndex; } @@ -412,8 +407,7 @@ sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const pImpl->GetBreakType( nIndex ) || nOfst != pImpl->GetBreakOfst( nIndex ) ) { - if( bRet ) - bRet = sal_False; + return sal_False; } ++nIndex; } @@ -446,7 +440,7 @@ sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const pPage = (SwPageFrm*)pPage->GetNext(); } } - return bRet; + return sal_True; } #endif |