diff options
Diffstat (limited to 'sw/source/ui/index/swuiidxmrk.cxx')
-rw-r--r-- | sw/source/ui/index/swuiidxmrk.cxx | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 39443f7e7b..8a6f74b86e 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -287,19 +287,20 @@ void SwIndexMarkPane::InitControls() bool bShow = false; pMoveMark = &m_pSh->GotoTOXMark( *pMark, TOX_PRV ); - if (!SfxPoolItem::areSame( pMoveMark, pMark )) + // tdf#158783 ptr compare OK for SwTOXMark (more below) + if (!areSfxPoolItemPtrsEqual( pMoveMark, pMark )) { m_pSh->GotoTOXMark( *pMoveMark, TOX_NXT ); bShow = true; } - m_xPrevBT->set_sensitive(!SfxPoolItem::areSame(pMoveMark, pMark)); + m_xPrevBT->set_sensitive(!areSfxPoolItemPtrsEqual(pMoveMark, pMark)); pMoveMark = &m_pSh->GotoTOXMark( *pMark, TOX_NXT ); - if (!SfxPoolItem::areSame( pMoveMark, pMark )) + if (!areSfxPoolItemPtrsEqual( pMoveMark, pMark )) { m_pSh->GotoTOXMark( *pMoveMark, TOX_PRV ); bShow = true; } - m_xNextBT->set_sensitive(!SfxPoolItem::areSame(pMoveMark, pMark)); + m_xNextBT->set_sensitive(!areSfxPoolItemPtrsEqual(pMoveMark, pMark)); if( bShow ) { m_xPrevBT->show(); @@ -308,19 +309,19 @@ void SwIndexMarkPane::InitControls() } pMoveMark = &m_pSh->GotoTOXMark( *pMark, TOX_SAME_PRV ); - if (!SfxPoolItem::areSame( pMoveMark, pMark )) + if (!areSfxPoolItemPtrsEqual( pMoveMark, pMark )) { m_pSh->GotoTOXMark( *pMoveMark, TOX_SAME_NXT ); bShow = true; } - m_xPrevSameBT->set_sensitive(!SfxPoolItem::areSame(pMoveMark, pMark)); + m_xPrevSameBT->set_sensitive(!areSfxPoolItemPtrsEqual(pMoveMark, pMark)); pMoveMark = &m_pSh->GotoTOXMark( *pMark, TOX_SAME_NXT ); - if (!SfxPoolItem::areSame( pMoveMark, pMark )) + if (!areSfxPoolItemPtrsEqual( pMoveMark, pMark )) { m_pSh->GotoTOXMark( *pMoveMark, TOX_SAME_PRV ); bShow = true; } - m_xNextSameBT->set_sensitive(!SfxPoolItem::areSame(pMoveMark, pMark)); + m_xNextSameBT->set_sensitive(!areSfxPoolItemPtrsEqual(pMoveMark, pMark)); if( bShow ) { m_xNextSameBT->show(); @@ -894,25 +895,26 @@ void SwIndexMarkPane::UpdateDialog() if( m_xPrevBT->get_visible() ) { const SwTOXMark* pMoveMark = &m_pSh->GotoTOXMark( *pMark, TOX_PRV ); - if (!SfxPoolItem::areSame( pMoveMark, pMark )) + // tdf#158783 ptr compare OK for SwTOXMark (more below) + if (!areSfxPoolItemPtrsEqual( pMoveMark, pMark )) m_pSh->GotoTOXMark( *pMoveMark, TOX_NXT ); - m_xPrevBT->set_sensitive( !SfxPoolItem::areSame(pMoveMark, pMark) ); + m_xPrevBT->set_sensitive( !areSfxPoolItemPtrsEqual(pMoveMark, pMark) ); pMoveMark = &m_pSh->GotoTOXMark( *pMark, TOX_NXT ); - if (!SfxPoolItem::areSame( pMoveMark, pMark )) + if (!areSfxPoolItemPtrsEqual( pMoveMark, pMark )) m_pSh->GotoTOXMark( *pMoveMark, TOX_PRV ); - m_xNextBT->set_sensitive( !SfxPoolItem::areSame(pMoveMark, pMark) ); + m_xNextBT->set_sensitive( !areSfxPoolItemPtrsEqual(pMoveMark, pMark) ); } if (m_xPrevSameBT->get_visible()) { const SwTOXMark* pMoveMark = &m_pSh->GotoTOXMark( *pMark, TOX_SAME_PRV ); - if (!SfxPoolItem::areSame( pMoveMark, pMark )) + if (!areSfxPoolItemPtrsEqual( pMoveMark, pMark )) m_pSh->GotoTOXMark( *pMoveMark, TOX_SAME_NXT ); - m_xPrevSameBT->set_sensitive( !SfxPoolItem::areSame(pMoveMark, pMark) ); + m_xPrevSameBT->set_sensitive( !areSfxPoolItemPtrsEqual(pMoveMark, pMark) ); pMoveMark = &m_pSh->GotoTOXMark( *pMark, TOX_SAME_NXT ); - if (!SfxPoolItem::areSame( pMoveMark, pMark )) + if (!areSfxPoolItemPtrsEqual( pMoveMark, pMark )) m_pSh->GotoTOXMark( *pMoveMark, TOX_SAME_PRV ); - m_xNextSameBT->set_sensitive( !SfxPoolItem::areSame(pMoveMark, pMark) ); + m_xNextSameBT->set_sensitive( !areSfxPoolItemPtrsEqual(pMoveMark, pMark) ); } const bool bEnable = !m_pSh->HasReadonlySel(); @@ -1013,7 +1015,8 @@ void SwIndexMarkPane::ReInitDlg(SwWrtShell& rWrtShell, SwTOXMark const * pCurTOX if(pCurTOXMark) { for(sal_uInt16 i = 0; i < m_pTOXMgr->GetTOXMarkCount(); i++) - if (SfxPoolItem::areSame(m_pTOXMgr->GetTOXMark(i), pCurTOXMark)) + // tdf#158783 ptr compare OK for SwTOXMark (more below) + if (areSfxPoolItemPtrsEqual(m_pTOXMgr->GetTOXMark(i), pCurTOXMark)) { m_pTOXMgr->SetCurTOXMark(i); break; |