User: hr      
Date: 2007-09-26 14:48:48+0000
Modified:
   dba/dbaccess/source/ui/control/RelationControl.cxx

Log:
 INTEGRATION: CWS dba24a (1.20.18); FILE MERGED
 2007/09/25 11:24:06 oj 1.20.18.1: #i81922# new method to compare relation data

File Changes:

Directory: /dba/dbaccess/source/ui/control/
===========================================

File [changed]: RelationControl.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/control/RelationControl.cxx?r1=1.20&r2=1.21
Delta lines:  +8 -9
-------------------
--- RelationControl.cxx 2007-07-06 08:06:17+0000        1.20
+++ RelationControl.cxx 2007-09-26 14:48:46+0000        1.21
@@ -369,7 +369,11 @@
                        fillListBox(xDef,nRow,nColumnId);
                        String sName = GetCellText( nRow, nColumnId );
                        m_pListCell->SelectEntry( sName );
-                       OSL_ENSURE(m_pListCell->GetSelectEntry() == sName,"Name 
was not selected!");
+            if ( m_pListCell->GetSelectEntry() != sName )
+            {
+                m_pListCell->InsertEntry( sName );
+                m_pListCell->SelectEntry( sName );
+            }
 
                        m_pListCell->SetHelpId(nHelpId);
                }
@@ -409,14 +413,14 @@
                        rDev.SetClipRegion();
        }
        // 
-----------------------------------------------------------------------------
-       void ORelationControl::fillListBox(const Reference< XPropertySet>& 
_xDest,long _nRow,USHORT nColumnId)
+       void ORelationControl::fillListBox(const Reference< XPropertySet>& 
_xDest,long /*_nRow*/,USHORT /*nColumnId*/)
        {
                m_pListCell->Clear();
                try
                {
                        if ( _xDest.is() )
                        {
-                               sal_Int32 nRows = GetRowCount();
+                               //sal_Int32 nRows = GetRowCount();
                                Reference<XColumnsSupplier> 
xSup(_xDest,UNO_QUERY);
                                Reference<XNameAccess> xColumns = 
xSup->getColumns();
                                Sequence< ::rtl::OUString> aNames = 
xColumns->getElementNames();
@@ -425,11 +429,6 @@
                                for(;pBegin != pEnd;++pBegin)
                                {
                                        String sName = *pBegin;
-                                       sal_Int32 i = 0;
-                                       for (; i < nRows; ++i)
-                                               if(i != _nRow && 
GetCellText(i,nColumnId) == sName)
-                                                       break;
-                                       if ( i == nRows )
                                                m_pListCell->InsertEntry( 
*pBegin );
                                }
                                m_pListCell->InsertEntry(String(), 0);




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

Reply via email to