• Caolán McNamara's avatar
    crash because iterator position wasn't changed in stl conversion · e4f5f504
    Caolán McNamara yazdı
    regression from e0284f4b
    
    Here's the original code using the pre stl iterators.
    
    if( !pPara && nDepth > 0 &&  rSet.GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_ON &&
        pOutliner->GetDepth( (sal_uInt16) pOutliner->GetAbsPos( (Paragraph*) pList->First() ) ) > 0 )
    	pPara = pOutliner->GetParagraph( 0 );  // Put NumBulletItem in outline level 1
    
    Hidden in there is a pList->First() which only gets called if the prior
    conditions are true.  pList->First() resets the index of the internal pList
    iterator position of pList to 0 i.e. the next call to pList->Prev will now return 0.
    
    The equivalent in the post-stl-conversion code is to jump the reverse_iterator
    iter to the last position in the reverse view.
    
    Create a level 10 entry in master view, select level 10, and use the bullets
    and numbering dropdown from the side panel to see this crash
    
    Change-Id: I52c22ea52020feb0fb75924f63ebe225be462071
    e4f5f504
drawview.cxx 21.1 KB