diff options
Diffstat (limited to 'sw/source/ui/dbui/dbinsdlg.cxx')
-rw-r--r-- | sw/source/ui/dbui/dbinsdlg.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index 5777bfc1569c..0a48c570f1da 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -480,7 +480,7 @@ IMPL_LINK_TYPED( SwInsertDBColAutoPilot, PageHdl, Button*, pButton, void ) if( bShowTable ) m_pPbTableFormat->Enable( 0 != m_pLbTableCol->GetEntryCount() ); - SelectHdl( bShowTable ? m_pLbTableDbColumn : m_pLbTextDbColumn ); + SelectHdl( bShowTable ? *m_pLbTableDbColumn : *m_pLbTextDbColumn ); } IMPL_LINK_TYPED( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton, void ) @@ -784,24 +784,24 @@ IMPL_LINK_TYPED( SwInsertDBColAutoPilot, AutoFormatHdl, Button*, pButton, void ) pDlg->FillAutoFormatOfIndex( pTAutoFormat ); } -IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox ) +IMPL_LINK_TYPED( SwInsertDBColAutoPilot, SelectHdl, ListBox&, rBox, void ) { - ListBox* pGetBox = pBox == m_pLbDbFormatFromUsr + ListBox* pGetBox = &rBox == m_pLbDbFormatFromUsr ? ( m_pRbAsTable->IsChecked() ? ( 0 == m_pLbTableCol->GetEntryData( 0 ) ? m_pLbTableDbColumn.get() : m_pLbTableCol.get() ) : m_pLbTextDbColumn.get() ) - : pBox; + : &rBox; SwInsDBColumn aSrch( pGetBox->GetSelectEntry(), 0 ); SwInsDBColumns::const_iterator it = aDBColumns.find( &aSrch ); - if( pBox == m_pLbDbFormatFromUsr ) + if( &rBox == m_pLbDbFormatFromUsr ) { if( !aSrch.sColumn.isEmpty() ) { - aOldNumFormatLnk.Call( pBox ); + aOldNumFormatLnk.Call( rBox ); (*it)->nUsrNumFormat = m_pLbDbFormatFromUsr->GetFormat(); } } @@ -839,10 +839,9 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox ) // to know later on, what ListBox was the "active", a Flag // is remembered in the 1st entry - void* pPtr = pBox == m_pLbTableCol ? m_pLbTableCol.get() : 0; + void* pPtr = &rBox == m_pLbTableCol ? m_pLbTableCol.get() : 0; m_pLbTableCol->SetEntryData( 0, pPtr ); } - return 0; } IMPL_LINK_TYPED( SwInsertDBColAutoPilot, HeaderHdl, Button*, pButton, void ) |