Tag: cws_src680_qiq
User: fs      
Date: 2006/06/27 04:56:56

Modified:
   dba/dbaccess/source/core/api/TableDeco.cxx

Log:
 RESYNC: (1.25-1.26); FILE MERGED

File Changes:

Directory: /dba/dbaccess/source/core/api/
=========================================

File [changed]: TableDeco.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/TableDeco.cxx?r1=1.25.124.1&r2=1.25.124.2
Delta lines:  +28 -11
---------------------
--- TableDeco.cxx       16 Jun 2006 11:47:36 -0000      1.25.124.1
+++ TableDeco.cxx       27 Jun 2006 11:56:53 -0000      1.25.124.2
@@ -127,15 +127,15 @@
                ) throw(SQLException)
        :OTableDescriptor_BASE(m_aMutex)
        ,ODataSettings(OTableDescriptor_BASE::rBHelper)
-       ,m_nPrivileges(-1)
-       ,m_xMetaData(_rxMetaData)
        ,m_xTable(_rxNewTable)
-       ,m_xNumberFormats( _rxNumberFormats )
        ,m_xColumnDefinitions(_xColumnDefinitions)
+       ,m_xMetaData(_rxMetaData)
+       ,m_xNumberFormats( _rxNumberFormats )
+       ,m_nPrivileges(-1)
        ,m_pColumns(NULL)
 {
        DBG_CTOR(ODBTableDecorator, NULL);
-       ODataSettings::registerProperties(this);
+       ODataSettings::registerPropertiesFor(this);
 }
 // -------------------------------------------------------------------------
 ODBTableDecorator::~ODBTableDecorator()
@@ -392,7 +392,7 @@
                                                &m_nPrivileges, 
::getCppuType(static_cast<sal_Int32*>(NULL)));
 }
 // 
-----------------------------------------------------------------------------
-::cppu::IPropertyArrayHelper* ODBTableDecorator::createArrayHelper(sal_Int32 
_nId) const
+::cppu::IPropertyArrayHelper* ODBTableDecorator::createArrayHelper(sal_Int32 
/*_nId*/) const
 {
        Reference<XPropertySet> xProp(m_xTable,UNO_QUERY);
        Reference<XPropertySetInfo> xInfo = xProp->getPropertySetInfo();
@@ -431,9 +431,19 @@
 ::cppu::IPropertyArrayHelper & SAL_CALL ODBTableDecorator::getInfoHelper() 
 {
        Reference<XPropertySet> xProp(m_xTable,UNO_QUERY);
+
        Reference<XPropertySetInfo> xInfo = xProp->getPropertySetInfo();
+    bool bIsDescriptor = (xInfo->getPropertyByName(PROPERTY_NAME).Attributes & 
PropertyAttribute::READONLY) == 0;
 
-       return 
*ODBTableDecorator_PROP::getArrayHelper((xInfo->getPropertyByName(PROPERTY_NAME).Attributes
 & PropertyAttribute::READONLY) == PropertyAttribute::READONLY ? 1 : 0);
+    return *ODBTableDecorator_PROP::getArrayHelper( bIsDescriptor ? 0 : 1 );
+
+    // TODO: this is a HACK, and prone to errors
+    // The OIdPropertyArrayUsageHelper is intended for classes where there 
exists a known, limited
+    // number of different property set infos (distinguished by the ID), all 
implemented by this very
+    // same class.
+    // However, in this case here we have an unknown, potentially unlimited 
number of different
+    // property set infos: Depending on the table for which we act as 
decorator, different property
+    // sets might exist.
 }
 // -------------------------------------------------------------------------
 // XServiceInfo
@@ -601,7 +611,7 @@
        }
        catch(const SQLException& e)
        {
-               UNUSED(e);
+        (void)e;
                DBG_ERROR("ODBTableDecorator::ODBTableDecorator : could not 
collect the privileges !");
        }
 }
@@ -703,6 +713,12 @@
                xDrop->dropByName(_sName);
        }
 }
+
+// 
-----------------------------------------------------------------------------
+void ODBTableDecorator::columnCloned(const Reference< XPropertySet >& 
/*_xClone*/)
+{
+}
+
 // 
-----------------------------------------------------------------------------
 Reference< XPropertySet > ODBTableDecorator::createColumnDescriptor()
 {
@@ -726,8 +742,9 @@
 }
 
 // 
-----------------------------------------------------------------------------
-void SAL_CALL ODBTableDecorator::setName( const ::rtl::OUString& aName ) throw 
(::com::sun::star::uno::RuntimeException)
+void SAL_CALL ODBTableDecorator::setName( const ::rtl::OUString& /*aName*/ ) 
throw (::com::sun::star::uno::RuntimeException)
 {
+    throwFunctionNotSupportedException( "XNamed::setName", *this );
 }
 
 // 
-----------------------------------------------------------------------------




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

Reply via email to