ListInfo::ListInfo( Word97::PAP& pap, ListInfoProvider& listInfoProvider ) : m_linkedIstd( istdNil ), m_restartingCounter( false ), m_numberFormat( 0 ), m_alignment( 0 ), m_isLegal( false ), m_notRestarted( false ), m_prev( false ), m_prevSpace( false ), m_isWord6( false ), m_followingChar( 0 ), m_lsid( 0 ) { if ( !listInfoProvider.setPAP( &pap ) ) return; const ListLevel* const level = listInfoProvider.formattingListLevel(); const ListData* const listData = listInfoProvider.m_currentLst; if ( listData ) { m_linkedIstd = listData->istdForLevel( pap.ilvl ); m_restartingCounter = listData->restartingCounter(); m_lsid = listData->lsid(); } else wvlog << "Bug: The ListData is 0!!" << std::endl; m_startAt = listInfoProvider.startAt(); if ( level ) { m_numberFormat = level->numberFormat(); m_alignment = level->alignment(); m_isLegal = level->isLegal(); m_notRestarted = level->notRestarted(); m_prev = level->prev(); m_prevSpace = level->prevSpace(); m_isWord6 = level->isWord6(); m_text = listInfoProvider.text(); m_followingChar = level->followingChar(); } else wvlog << "Bug: The ListLevel is 0!!" << std::endl; }
ListInfo::ListInfo( Word97::PAP& pap, Word97::CHP& chp, ListInfoProvider& listInfoProvider ) : m_linkedIstd( istdNil ), m_restartingCounter( false ), m_numberFormat( 0 ), m_alignment( 0 ), m_isLegal( false ), m_notRestarted( false ), m_prev( false ), m_prevSpace( false ), m_isWord6( false ), m_followingChar( 0 ), m_lsid( 0 ), m_space( 0 ), m_indent( 0 ), m_picAutoSize( false ), m_type( NumberType ) { if ( !listInfoProvider.setPAP( &pap ) ) { return; } const ListLevel* const level = listInfoProvider.formattingListLevel(); const ListData* const listData = listInfoProvider.m_currentLst; if ( listData ) { m_linkedIstd = listData->istdForLevel( pap.ilvl ); m_restartingCounter = listData->restartingCounter(); m_lsid = listData->lsid(); } else { wvlog << __FILE__ << ":" << __LINE__ << " - " <<"Bug: The ListData is 0!!" << endl; } m_startAt = listInfoProvider.startAt(); if ( level ) { m_numberFormat = level->numberFormat(); m_alignment = level->alignment(); m_isLegal = level->isLegal(); m_notRestarted = level->notRestarted(); m_prev = level->prev(); m_prevSpace = level->prevSpace(); m_isWord6 = level->isWord6(); m_followingChar = level->followingChar(); m_space = level->space(); m_indent = level->indent(); if (m_numberFormat == msonfcBullet) { m_type = BulletType; } // A label does NOT inherit Underline from text-properties of // the paragraph mark. A bullet does not inherit {Italics, // Bold}. if (m_type != NumberType) { chp.fItalic = 0; chp.fBold = 0; } chp.kul = 0; m_text = listInfoProvider.text(chp); if (m_text.chp->fPicBullet) { m_type = PictureType; m_picAutoSize = !m_text.chp->fNoAutoSize; } } else { wvlog << __FILE__ << ":" << __LINE__ << " - " <<"Bug: The ListLevel is 0!!" << endl; } }