Tag: cws_src680_oj14 User: oj Date: 2006/07/04 01:14:05 Modified: dba/dbaccess/source/ui/misc/WTypeSelect.cxx
Log: RESYNC: (1.23-1.24); FILE MERGED 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.22.4.4&r2=1.22.4.5 Delta lines: +23 -21 --------------------- --- WTypeSelect.cxx 25 Apr 2006 13:03:18 -0000 1.22.4.4 +++ WTypeSelect.cxx 4 Jul 2006 08:14:02 -0000 1.22.4.5 @@ -135,16 +135,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 ) @@ -183,14 +187,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 @@ -208,17 +212,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 { @@ -275,8 +277,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); @@ -326,7 +328,7 @@ DBG_CHKTHIS(OWizTypeSelect,NULL); } // ----------------------------------------------------------------------- -IMPL_LINK( OWizTypeSelect, ColumnSelectHdl, MultiListBox *, pListBox ) +IMPL_LINK( OWizTypeSelect, ColumnSelectHdl, MultiListBox *, /*pListBox*/ ) { String aColumnName( m_lbColumnNames.GetSelectEntry() ); @@ -398,7 +400,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]
