Kaydet (Commit) c1487cf7 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

coverity#984156 : Uninitialized scalar field

Change-Id: I03829d3fe431632f3c2ab585d19f812b9c2a94be
üst abfa6fed
......@@ -490,11 +490,19 @@ SwActualSection::SwActualSection( SwActualSection *pUp,
*/
SwLayHelper::SwLayHelper( SwDoc *pD, SwFrm* &rpF, SwFrm* &rpP, SwPageFrm* &rpPg,
SwLayoutFrm* &rpL, SwActualSection* &rpA, sal_Bool &rB,
sal_uLong nNodeIndex, bool bCache )
: rpFrm( rpF ), rpPrv( rpP ), rpPage( rpPg ), rpLay( rpL ),
rpActualSection( rpA ), rbBreakAfter(rB), pDoc(pD), nMaxParaPerPage( 25 ),
nParagraphCnt( bCache ? 0 : USHRT_MAX ), bFirst( bCache )
SwLayoutFrm* &rpL, SwActualSection* &rpA, sal_Bool &rB,
sal_uLong nNodeIndex, bool bCache )
: rpFrm( rpF )
, rpPrv( rpP )
, rpPage( rpPg )
, rpLay( rpL )
, rpActualSection( rpA )
, rbBreakAfter(rB)
, pDoc(pD)
, nMaxParaPerPage( 25 )
, nParagraphCnt( bCache ? 0 : USHRT_MAX )
, nFlyIdx( 0 )
, bFirst( bCache )
{
pImpl = pDoc->GetLayoutCache() ? pDoc->GetLayoutCache()->LockImpl() : NULL;
if( pImpl )
......@@ -504,9 +512,10 @@ SwLayHelper::SwLayHelper( SwDoc *pD, SwFrm* &rpF, SwFrm* &rpP, SwPageFrm* &rpPg,
->GetIndex();
nNodeIndex -= nStartOfContent;
nIndex = 0;
nFlyIdx = 0;
while( nIndex < pImpl->size() && (*pImpl)[ nIndex ] < nNodeIndex )
{
++nIndex;
}
if( nIndex >= pImpl->size() )
{
pDoc->GetLayoutCache()->UnlockImpl();
......
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