Tag: cws_src680_dba202b User: oj Date: 05/11/28 03:08:26 Modified: /dba/dbaccess/source/ui/inc/ TableRow.hxx /dba/dbaccess/source/ui/tabledesign/ TEditControl.cxx, TableRow.cxx
Log: #128264# check row field desc File Changes: Directory: /dba/dbaccess/source/ui/inc/ ======================================= File [changed]: TableRow.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/TableRow.hxx?r1=1.6&r2=1.6.54.1 Delta lines: +4 -3 ------------------- --- TableRow.hxx 8 Sep 2005 15:37:29 -0000 1.6 +++ TableRow.hxx 28 Nov 2005 11:08:22 -0000 1.6.54.1 @@ -4,9 +4,9 @@ * * $RCSfile: TableRow.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.6.54.1 $ * - * last change: $Author: rt $ $Date: 2005/09/08 15:37:29 $ + * last change: $Author: oj $ $Date: 2005/11/28 11:08:22 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -87,6 +87,7 @@ the current position in the table */ inline long GetPos() const { return m_nPos; } + inline void SetPos(sal_Int32 _nPos) { m_nPos = _nPos; } /** set the row readonly @param _bRead Directory: /dba/dbaccess/source/ui/tabledesign/ =============================================== File [changed]: TEditControl.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/tabledesign/TEditControl.cxx?r1=1.44&r2=1.44.42.1 Delta lines: +8 -7 ------------------- --- TEditControl.cxx 23 Sep 2005 12:45:38 -0000 1.44 +++ TEditControl.cxx 28 Nov 2005 11:08:23 -0000 1.44.42.1 @@ -4,9 +4,9 @@ * * $RCSfile: TEditControl.cxx,v $ * - * $Revision: 1.44 $ + * $Revision: 1.44.42.1 $ * - * last change: $Author: hr $ $Date: 2005/09/23 12:45:38 $ + * last change: $Author: oj $ $Date: 2005/11/28 11:08:23 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -890,7 +890,7 @@ { pRow = (*m_pRowList)[nIndex]; OSL_ENSURE(pRow,"OTableEditorCtrl::CopyRows: Row is NULL!"); - if ( pRow ) + if ( pRow && pRow->GetActFieldDescr() ) { pClipboardRow = new OTableRow( *pRow ); vClipboardList.push_back( pClipboardRow); @@ -964,12 +964,13 @@ (*aStreamRef) >> *pRow; pRow->SetReadOnly( sal_False ); sal_Int32 nType = pRow->GetActFieldDescr()->GetType(); + if ( pRow->GetActFieldDescr() ) pRow->GetActFieldDescr()->SetType(GetView()->getController()->getTypeInfoByType(nType)); ////////////////////////////////////////////////////////////////////// // Anpassen des Feldnamens aFieldName = GenerateName( pRow->GetActFieldDescr()->GetName() ); pRow->GetActFieldDescr()->SetName( aFieldName ); - + pRow->SetPos(nInsertRow); m_pRowList->insert( m_pRowList->begin()+nInsertRow,pRow ); vInsertedUndoRedoRows.push_back(new OTableRow(*pRow)); nInsertRow++; @@ -1601,7 +1602,7 @@ if ( HANDLE_ID != nColId ) { - if ( nRow < 0 ) + if ( nRow < 0 && nColId != BROWSER_INVALIDID ) { // hit the header if ( 3 != nColId ) { // 3 would mean the last column, and this last column is auto-sized File [changed]: TableRow.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/tabledesign/TableRow.cxx?r1=1.16&r2=1.16.54.1 Delta lines: +13 -11 --------------------- --- TableRow.cxx 8 Sep 2005 16:42:34 -0000 1.16 +++ TableRow.cxx 28 Nov 2005 11:08:23 -0000 1.16.54.1 @@ -4,9 +4,9 @@ * * $RCSfile: TableRow.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.16.54.1 $ * - * last change: $Author: rt $ $Date: 2005/09/08 16:42:34 $ + * last change: $Author: oj $ $Date: 2005/11/28 11:08:23 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -139,6 +139,7 @@ OFieldDescription* pFieldDesc = _rRow.GetActFieldDescr(); if(pFieldDesc) { + _rStr << (sal_Int32)1; _rStr.WriteByteString(pFieldDesc->GetName()); _rStr.WriteByteString(pFieldDesc->GetDescription()); double nValue = 0.0; @@ -164,18 +165,21 @@ _rStr << sal_Int32(pFieldDesc->IsAutoIncrement() ? 1 : 0); _rStr << sal_Int32(pFieldDesc->IsPrimaryKey() ? 1 : 0); _rStr << sal_Int32(pFieldDesc->IsCurrency() ? 1 : 0); - } + } // if(pFieldDesc) + else + _rStr << (sal_Int32)0; return _rStr; } // ----------------------------------------------------------------------------- SvStream& operator>>( SvStream& _rStr, OTableRow& _rRow ) { _rStr >> _rRow.m_nPos; - + sal_Int32 nValue = 0; + _rStr >> nValue; + if ( nValue ) + { OFieldDescription* pFieldDesc = new OFieldDescription(); _rRow.m_pActFieldDescr = pFieldDesc; - if(pFieldDesc) - { String sValue; _rStr.ReadByteString(sValue); pFieldDesc->SetName(sValue); @@ -224,8 +228,6 @@ pFieldDesc->SetPrimaryKey(nValue != 0); _rStr >> nValue; pFieldDesc->SetCurrency(nValue != 0); - - } return _rStr; } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
