User: hr Date: 06/06/19 20:22:35 Modified: /dba/dbaccess/source/ui/misc/ WTypeSelect.cxx
Log: INTEGRATION: CWS warnings01 (1.23.4); FILE MERGED 2006/03/24 15:36:22 fs 1.23.4.1: #i57457# warning-free code (unxlngi6/.pro + unxsoli4.pro) File Changes: Directory: /dba/dbaccess/source/ui/misc/ ======================================== File [changed]: WTypeSelect.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/misc/WTypeSelect.cxx?r1=1.23&r2=1.24 Delta lines: +20 -18 --------------------- --- WTypeSelect.cxx 19 Jan 2006 15:44:51 -0000 1.23 +++ WTypeSelect.cxx 20 Jun 2006 03:22:33 -0000 1.24 @@ -138,16 +138,20 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId ) { DBG_ASSERT(nRow == -1,"nRow muss -1 sein!"); + (void)nRow; MultiListBox &aListBox = ((OWizTypeSelect*)GetParent())->m_lbColumnNames; - sal_uInt16 nPos = aListBox.GetEntryPos(String(pActFieldDescr->GetName())); - OSL_ENSURE(nPos != LISTBOX_ENTRY_NOTFOUND,"Columnname could not be found in the listbox"); - pActFieldDescr = static_cast<OFieldDescription*>(aListBox.GetEntryData(nPos)); - if ( !pActFieldDescr ) + OFieldDescription* pCurFieldDescr = getCurrentFieldDescData(); + + sal_uInt16 nPos = aListBox.GetEntryPos( String( pCurFieldDescr->GetName() ) ); + pCurFieldDescr = static_cast< OFieldDescription* >( aListBox.GetEntryData( nPos ) ); + OSL_ENSURE( pCurFieldDescr, "OWizTypeSelectControl::CellModified: Columnname/type not found in the listbox!" ); + if ( !pCurFieldDescr ) return; + setCurrentFieldDescData( pCurFieldDescr ); - ::rtl::OUString sName = pActFieldDescr->GetName(); + ::rtl::OUString sName = pCurFieldDescr->GetName(); ::rtl::OUString sNewName; const OPropColumnEditCtrl* pColumnName = getColumnCtrl(); if ( pColumnName ) @@ -186,14 +190,14 @@ String sTitle(ModuleRes(STR_STAT_WARNING)); OSQLMessageBox aMsg(this,sTitle,strMessage,WB_OK | WB_DEF_OK,OSQLMessageBox::Error); aMsg.Execute(); - pActFieldDescr->SetName(sName); - DisplayData(pActFieldDescr); + pCurFieldDescr->SetName(sName); + DisplayData(pCurFieldDescr); static_cast<OWizTypeSelect*>(GetParent())->setDuplicateName(sal_True); return; } - ::rtl::OUString sOldName = pActFieldDescr->GetName(); - pActFieldDescr->SetName(sNewName); + ::rtl::OUString sOldName = pCurFieldDescr->GetName(); + pCurFieldDescr->SetName(sNewName); static_cast<OWizTypeSelect*>(GetParent())->setDuplicateName(sal_False); // now we change the name @@ -211,17 +215,15 @@ } aListBox.RemoveEntry(nPos); - aListBox.InsertEntry(pActFieldDescr->GetName(),nPos); - aListBox.SetEntryData(nPos,pActFieldDescr); + aListBox.InsertEntry(pCurFieldDescr->GetName(),nPos); + aListBox.SetEntryData(nPos,pCurFieldDescr); - pWiz->replaceColumn(nPos,pActFieldDescr,sOldName); + pWiz->replaceColumn(nPos,pCurFieldDescr,sOldName); } break; } - SaveData(pActFieldDescr); + saveCurrentFieldDescData(); } -// ----------------------------------------------------------------------- -void OWizTypeSelectControl::SetModified(sal_Bool bModified) {} // ----------------------------------------------------------------------------- ::com::sun::star::lang::Locale OWizTypeSelectControl::GetLocale() const { @@ -278,8 +280,8 @@ ,m_etAuto( this, ModuleRes( ET_AUTO ) ) ,m_pbAuto( this, ModuleRes( PB_AUTO ) ) ,m_pParserStream(_pStream) - ,m_bAutoIncrementEnabled(sal_False) ,m_nDisplayRow(0) + ,m_bAutoIncrementEnabled(sal_False) ,m_bDuplicateName(sal_False) { DBG_CTOR(OWizTypeSelect,NULL); @@ -329,7 +331,7 @@ DBG_CHKTHIS(OWizTypeSelect,NULL); } // ----------------------------------------------------------------------- -IMPL_LINK( OWizTypeSelect, ColumnSelectHdl, MultiListBox *, pListBox ) +IMPL_LINK( OWizTypeSelect, ColumnSelectHdl, MultiListBox *, /*pListBox*/ ) { String aColumnName( m_lbColumnNames.GetSelectEntry() ); @@ -401,7 +403,7 @@ m_flAutoType.Show(bEnable); } //------------------------------------------------------------------------------ -IMPL_LINK( OWizTypeSelect, ButtonClickHdl, Button *, pButton ) +IMPL_LINK( OWizTypeSelect, ButtonClickHdl, Button *, /*pButton*/ ) { DBG_CHKTHIS(OWizTypeSelect,NULL); sal_Int32 nBreakPos; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
