[Libreoffice-commits] core.git: sw/source
Jan Holesovsky
kendy at suse.cz
Thu Apr 11 01:53:01 PDT 2013
sw/source/core/layout/laycache.cxx | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
New commits:
commit e1695087a3755a80de6a14490b7e4395742cf161
Author: Jan Holesovsky <kendy at suse.cz>
Date: Thu Apr 11 10:51:19 2013 +0200
i#29679: Return early not to crash on ooo29679-57.odt in dbgutil build.
Change-Id: I467f6383ec469f5719fd49914d81605b2a5679a1
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index 20f23c1..807a40b 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
More information about the Libreoffice-commits
mailing list