Tag: cws_src680_warnings01
User: sb      
Date: 06/05/23 17:01:31

Modified:
 /dba/dbaccess/source/ui/tabledesign/
  TEditControl.cxx

Log:
 RESYNC: (1.47-1.50); FILE MERGED

File Changes:

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.46.6.2&r2=1.46.6.3
Delta lines:  +21 -22
---------------------
--- TEditControl.cxx    7 Apr 2006 20:55:55 -0000       1.46.6.2
+++ TEditControl.cxx    24 May 2006 00:01:28 -0000      1.46.6.3
@@ -236,7 +236,6 @@
     ,pTypeCell(NULL)
     ,pDescrCell(NULL)
     ,pDescrWin(NULL)
-    ,pActRow(NULL)
     ,nIndexEvent(0)
     ,nCutEvent(0)
     ,nPasteEvent(0)
@@ -341,6 +340,7 @@
        //////////////////////////////////////////////////////////////////////
        // Zelle Typ
        pTypeCell = new ListBoxControl( &GetDataWindow() );
+    pTypeCell->SetDropDownLineCount( 15 );
 
        //////////////////////////////////////////////////////////////////////
        // Zelle Beschreibung
@@ -610,7 +610,7 @@
 
        ::comphelper::UStringMixEqual bCase(xMetaData.is() ? 
xMetaData->storesMixedCaseQuotedIdentifiers() : sal_True);
 
-       ::std::vector<OTableRow*>::iterator aIter = m_pRowList->begin();
+       ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aIter = 
m_pRowList->begin();
        OFieldDescription* pFieldDescr;
        sal_Int32 nCount(0);
        for(;aIter != m_pRowList->end();++aIter)
@@ -878,9 +878,9 @@
 
        //////////////////////////////////////////////////////////////////////
        // Selektierte Zeilen in die ClipboardListe kopieren
-       OTableRow* pClipboardRow;
-       OTableRow* pRow;
-       ::std::vector<OTableRow*> vClipboardList;
+        ::boost::shared_ptr<OTableRow>  pClipboardRow;
+        ::boost::shared_ptr<OTableRow>  pRow;
+       ::std::vector< ::boost::shared_ptr<OTableRow> > vClipboardList;
        vClipboardList.reserve(GetSelectRowCount());
 
        for( long nIndex=FirstSelectedRow(); nIndex >= 0 && nIndex < 
static_cast<long>(m_pRowList->size()); nIndex=NextSelectedRow() )
@@ -889,7 +889,7 @@
         OSL_ENSURE(pRow,"OTableEditorCtrl::CopyRows: Row is NULL!");
         if ( pRow && pRow->GetActFieldDescr() )
         {
-                   pClipboardRow = new OTableRow( *pRow );
+                   pClipboardRow.reset(new OTableRow( *pRow ));
                    vClipboardList.push_back( pClipboardRow);
         }
        }
@@ -937,7 +937,7 @@
 {
        DBG_CHKTHIS(OTableEditorCtrl,NULL);
 
-       ::std::vector< OTableRow*> vInsertedUndoRedoRows; // need for undo/redo 
handling
+       ::std::vector<  ::boost::shared_ptr<OTableRow> > vInsertedUndoRedoRows; 
// need for undo/redo handling
        //////////////////////////////////////////////////////////////////////
        // get rows from clipboard
        TransferableDataHelper 
aTransferData(TransferableDataHelper::CreateFromSystemClipboard(GetParent()));
@@ -951,13 +951,13 @@
                        aStreamRef->ResetError();
                        long nInsertRow = nRow;
                        String aFieldName;
-                       OTableRow* pRow;
+                        ::boost::shared_ptr<OTableRow>  pRow;
                        sal_Int32 nSize = 0;
                        (*aStreamRef) >> nSize;
                        vInsertedUndoRedoRows.reserve(nSize);
                        for(sal_Int32 i=0;i < nSize;++i)
                        {
-                               pRow = new OTableRow();
+                               pRow.reset(new OTableRow());
                                (*aStreamRef) >> *pRow;
                                pRow->SetReadOnly( sal_False );
                                sal_Int32 nType = 
pRow->GetActFieldDescr()->GetType();
@@ -969,7 +969,7 @@
                                pRow->GetActFieldDescr()->SetName( aFieldName );
                                pRow->SetPos(nInsertRow);
                                m_pRowList->insert( 
m_pRowList->begin()+nInsertRow,pRow );
-                               vInsertedUndoRedoRows.push_back(new 
OTableRow(*pRow));
+                               
vInsertedUndoRedoRows.push_back(::boost::shared_ptr<OTableRow>(new 
OTableRow(*pRow)));
                                nInsertRow++;
                        }
                }
@@ -1008,13 +1008,12 @@
        {
                
//////////////////////////////////////////////////////////////////////
                // Zeile entfernen
-               delete (*m_pRowList)[nIndex];
                m_pRowList->erase( m_pRowList->begin()+nIndex );
                RowRemoved( nIndex, 1, sal_True );
 
                
//////////////////////////////////////////////////////////////////////
                // Leerzeile am Ende wieder einfuegen
-               m_pRowList->push_back( new OTableRow());
+               m_pRowList->push_back( ::boost::shared_ptr<OTableRow>(new 
OTableRow()));
                RowInserted( GetRowCount()-1, 1, sal_True );
 
                nIndex = FirstSelectedRow();
@@ -1048,7 +1047,7 @@
        //////////////////////////////////////////////////////////////////////
        // Zahl der selektierten Zeilen werden neu eingefuegt
        for( long i=nRow; i<(nRow+nInsertRows); i++ )
-               m_pRowList->insert( m_pRowList->begin()+i ,new OTableRow());
+               m_pRowList->insert( m_pRowList->begin()+i 
,::boost::shared_ptr<OTableRow>(new OTableRow()));
        RowInserted( nRow, nInsertRows, sal_True );
 
        GetView()->getController()->setModified( sal_True );
@@ -1290,7 +1289,7 @@
 }
 
 
//------------------------------------------------------------------------------
-ULONG OTableEditorCtrl::GetTotalCellWidth(long nRow, sal_uInt16 nColId)
+sal_uInt32 OTableEditorCtrl::GetTotalCellWidth(long nRow, sal_uInt16 nColId)
 {
        DBG_CHKTHIS(OTableEditorCtrl,NULL);
        return GetTextWidth(GetCellText(nRow, nColId)) + 2 * GetTextWidth('0');
@@ -1306,7 +1305,7 @@
                OSL_ENSURE(0,"(nRow<0) || (nRow>=nListCount)");
                return NULL;
        }
-       OTableRow* pRow = (*m_pRowList)[ nRow ];
+        ::boost::shared_ptr<OTableRow>  pRow = (*m_pRowList)[ nRow ];
        if( !pRow )
                return NULL;
        return pRow->GetActFieldDescr();
@@ -1358,7 +1357,7 @@
 
                
//////////////////////////////////////////////////////////////////////
                // Wenn eine der markierten Zeilen leer ist, kein Copy moeglich
-               OTableRow* pRow;
+                ::boost::shared_ptr<OTableRow>  pRow;
                long nIndex = FirstSelectedRow();
         while( nIndex >= 0 && nIndex < static_cast<long>(m_pRowList->size()) )
                {
@@ -1533,7 +1532,7 @@
        // - kein Eintrag vom Typ Memo oder Image ist
        // - kein DROP erlaubt ist (s.o.) und die Spalte noch kein Required 
(not null) gesetzt hatte.
        long nIndex = FirstSelectedRow();
-       OTableRow* pRow;
+        ::boost::shared_ptr<OTableRow>  pRow;
        while( nIndex >= 0 && nIndex < static_cast<long>(m_pRowList->size()) )
        {
                pRow = (*m_pRowList)[nIndex];
@@ -1699,7 +1698,7 @@
                // belegte Zeilen erscheinen
 
                sal_Int32 nFreeFromPos; // ab da nur freie Zeilen
-               ::std::vector<OTableRow*>::reverse_iterator aIter = 
m_pRowList->rbegin();
+               ::std::vector< ::boost::shared_ptr<OTableRow> 
>::reverse_iterator aIter = m_pRowList->rbegin();
                for(nFreeFromPos = m_pRowList->size();
                        aIter != m_pRowList->rend() && (!(*aIter) || 
!(*aIter)->GetActFieldDescr() || 
!(*aIter)->GetActFieldDescr()->GetName().getLength());
                        --nFreeFromPos, ++aIter)
@@ -1768,7 +1767,7 @@
        aDeletedPrimKeys.SetTotalRange( Range(0,GetRowCount()) );
        long nIndex = 0;
 
-       ::std::vector<OTableRow*>::const_iterator aIter = m_pRowList->begin();
+       ::std::vector< ::boost::shared_ptr<OTableRow> >::const_iterator aIter = 
m_pRowList->begin();
        for(;aIter != m_pRowList->end();++aIter)
        {
                OFieldDescription* pFieldDescr = (*aIter)->GetActFieldDescr();
@@ -1790,7 +1789,7 @@
                {
                        
//////////////////////////////////////////////////////////////////////
                        // Key setzen
-                       OTableRow* pRow = (*m_pRowList)[nIndex];
+                        ::boost::shared_ptr<OTableRow>  pRow = 
(*m_pRowList)[nIndex];
                        OFieldDescription* pFieldDescr = 
pRow->GetActFieldDescr();
                        if(pFieldDescr)
                                
AdjustFieldDescription(pFieldDescr,aInsertedPrimKeys,nIndex,sal_False,sal_True);
@@ -1819,7 +1818,7 @@
        //////////////////////////////////////////////////////////////////////
        // Gehoeren alle markierten Felder zu einem Primary Key ?
        long nPrimaryKeys = 0;
-       ::std::vector<OTableRow*>::const_iterator aIter = m_pRowList->begin();
+       ::std::vector< ::boost::shared_ptr<OTableRow> >::const_iterator aIter = 
m_pRowList->begin();
        for(sal_Int32 nRow=0;aIter != m_pRowList->end();++aIter,++nRow)
        {
                if( IsRowSelected(nRow) && !(*aIter)->IsPrimaryKey() )
@@ -1850,7 +1849,7 @@
         return;
        //////////////////////////////////////////////////////////////////////
        // Neue Beschreibung darstellen
-       OTableRow* pRow = (*m_pRowList)[nRow];
+        ::boost::shared_ptr<OTableRow>  pRow = (*m_pRowList)[nRow];
        pRow->SetFieldType( _pType, sal_True );
        if ( _pType.get() )
        {




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to