User: hr      
Date: 05/09/23 05:45:09

Modified:
 /dba/dbaccess/source/ui/relationdesign/
  RelationController.cxx

Log:
 INTEGRATION: CWS dba201b (1.40.38); FILE MERGED
 2005/09/21 10:23:49 oj 1.40.38.2: RESYNC: (1.40-1.41); FILE MERGED
 2005/07/11 13:37:28 fs 1.40.38.1: merging CWS dba201 into CWS dba201b

File Changes:

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

File [changed]: RelationController.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/relationdesign/RelationController.cxx?r1=1.41&r2=1.42
Delta lines:  +17 -14
---------------------
--- RelationController.cxx      8 Sep 2005 16:36:25 -0000       1.41
+++ RelationController.cxx      23 Sep 2005 12:45:06 -0000      1.42
@@ -298,15 +298,18 @@
 void ORelationController::impl_initialize( const Sequence< Any >& aArguments )
 {
        PropertyValue aValue;
-       const Any* pBegin       = aArguments.getConstArray();
-       const Any* pEnd         = pBegin + aArguments.getLength();
+       const Any* pIter        = aArguments.getConstArray();
+       const Any* pEnd         = pIter + aArguments.getLength();
 
-       for(;pBegin != pEnd;++pBegin)
+       for(;pIter != pEnd;++pIter)
        {
-               if((*pBegin >>= aValue) && (0 == 
aValue.Name.compareToAscii(PROPERTY_ACTIVECONNECTION)))
+        if (!(*pIter >>= aValue))
+                       throw 
Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid type in argument 
list. PropertyValue expected.")),*this);
+               if ( 0 == aValue.Name.compareToAscii(PROPERTY_ACTIVECONNECTION) 
)
                {
                        Reference< XConnection > xConn;
-                       aValue.Value >>= xConn;
+            if ( !(aValue.Value >>= xConn) )
+                throw 
Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid argument type 
for ActiveConnection.")),*this);
                        initializeConnection( xConn );
                        break;
                }
@@ -428,13 +431,13 @@
                
                Reference< XDatabaseMetaData> xMetaData = 
getConnection()->getMetaData();
                Sequence< ::rtl::OUString> aNames = 
m_xTables->getElementNames();
-               const ::rtl::OUString* pBegin = aNames.getConstArray();
-               const ::rtl::OUString* pEnd = pBegin + aNames.getLength();
-               for(;pBegin != pEnd;++pBegin)
+               const ::rtl::OUString* pIter = aNames.getConstArray();
+               const ::rtl::OUString* pEnd = pIter + aNames.getLength();
+               for(;pIter != pEnd;++pIter)
                {
                        ::rtl::OUString sCatalog,sSchema,sTable;
                        ::dbtools::qualifiedNameComponents(xMetaData,
-                                                                               
                *pBegin,
+                                                                               
                *pIter,
                                                                                
                sCatalog, 
                                                                                
                sSchema, 
                                                                                
                sTable,
@@ -445,7 +448,7 @@
 
                        Reference< XResultSet > xResult = 
xMetaData->getImportedKeys(aCatalog, sSchema,sTable);
                        if ( xResult.is() && xResult->next() )
-                               loadTableData(m_xTables->getByName(*pBegin));
+                               loadTableData(m_xTables->getByName(*pIter));
                }
        }
        catch(SQLException& e)
@@ -510,13 +513,13 @@
                                        OSL_ENSURE(xColsSup.is(),"Key is no 
XColumnsSupplier!");
                                        Reference<XNameAccess> xColumns         
= xColsSup->getColumns();
                                        Sequence< ::rtl::OUString> aNames       
= xColumns->getElementNames();
-                                       const ::rtl::OUString* pBegin   = 
aNames.getConstArray();
-                                       const ::rtl::OUString* pEnd             
= pBegin + aNames.getLength();
+                                       const ::rtl::OUString* pIter    = 
aNames.getConstArray();
+                                       const ::rtl::OUString* pEnd             
= pIter + aNames.getLength();
                                        ::rtl::OUString 
sColumnName,sRelatedName;
-                                       for(sal_uInt16 j=0;pBegin != 
pEnd;++pBegin,++j)
+                                       for(sal_uInt16 j=0;pIter != 
pEnd;++pIter,++j)
                                        {
                                                Reference<XPropertySet> 
xPropSet;
-                                               xColumns->getByName(*pBegin) 
>>= xPropSet;
+                                               xColumns->getByName(*pIter) >>= 
xPropSet;
                                                
OSL_ENSURE(xPropSet.is(),"Invalid column found in KeyColumns!");
                                                
xPropSet->getPropertyValue(PROPERTY_NAME)                       >>= sColumnName;
                                                
xPropSet->getPropertyValue(PROPERTY_RELATEDCOLUMN)      >>= sRelatedName;




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

Reply via email to