Kaydet (Commit) e1695087 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

i#29679: Return early not to crash on ooo29679-57.odt in dbgutil build.

Change-Id: I467f6383ec469f5719fd49914d81605b2a5679a1
üst 30704655
...@@ -338,7 +338,6 @@ sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const ...@@ -338,7 +338,6 @@ sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const
if( !pImpl ) if( !pImpl )
return sal_True; return sal_True;
const SwRootFrm *pRootFrm = rDoc.GetCurrentLayout(); const SwRootFrm *pRootFrm = rDoc.GetCurrentLayout();
sal_Bool bRet = sal_True;
if( pRootFrm ) if( pRootFrm )
{ {
sal_uInt16 nIndex = 0; sal_uInt16 nIndex = 0;
...@@ -350,11 +349,8 @@ sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const ...@@ -350,11 +349,8 @@ sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const
while( pPage ) while( pPage )
{ {
if( nIndex >= pImpl->size() ) if( nIndex >= pImpl->size() )
{ return sal_False;
if( bRet )
bRet = sal_False;
break;
}
SwLayoutFrm* pLay = pPage->FindBodyCont(); SwLayoutFrm* pLay = pPage->FindBodyCont();
SwFrm* pTmp = pLay ? pLay->ContainsAny() : NULL; SwFrm* pTmp = pLay ? pLay->ContainsAny() : NULL;
if( pTmp && pTmp->IsSctFrm() ) if( pTmp && pTmp->IsSctFrm() )
...@@ -374,8 +370,7 @@ sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const ...@@ -374,8 +370,7 @@ sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const
( bFollow ? ((SwTxtFrm*)pTmp)->GetOfst() ( bFollow ? ((SwTxtFrm*)pTmp)->GetOfst()
: STRING_LEN ) != pImpl->GetBreakOfst( nIndex ) ) : STRING_LEN ) != pImpl->GetBreakOfst( nIndex ) )
{ {
if( bRet ) return sal_False;
bRet = sal_False;
} }
++nIndex; ++nIndex;
} }
...@@ -412,8 +407,7 @@ sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const ...@@ -412,8 +407,7 @@ sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const
pImpl->GetBreakType( nIndex ) || pImpl->GetBreakType( nIndex ) ||
nOfst != pImpl->GetBreakOfst( nIndex ) ) nOfst != pImpl->GetBreakOfst( nIndex ) )
{ {
if( bRet ) return sal_False;
bRet = sal_False;
} }
++nIndex; ++nIndex;
} }
...@@ -446,7 +440,7 @@ sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const ...@@ -446,7 +440,7 @@ sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const
pPage = (SwPageFrm*)pPage->GetNext(); pPage = (SwPageFrm*)pPage->GetNext();
} }
} }
return bRet; return sal_True;
} }
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment