User: hr      
Date: 06/06/19 19:38:21

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

Log:
 INTEGRATION: CWS warnings01 (1.25.50); FILE MERGED
 2006/06/14 10:57:11 fs 1.25.50.2: #i66367# reverted previous changes related 
to replacing IdPropertyArrayHelper with PropertyArrayHelper - there's a subtle 
difference between both ids ...
 2006/03/24 15:35:47 fs 1.25.50.1: #i57457# warning-free code (unxlngi6/.pro + 
unxsoli4.pro)

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&r2=1.26
Delta lines:  +25 -8
--------------------
--- TableDeco.cxx       8 Sep 2005 10:04:30 -0000       1.25
+++ TableDeco.cxx       20 Jun 2006 02:38:18 -0000      1.26
@@ -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 !");
        }
 }
@@ -698,6 +708,12 @@
                xDrop->dropByName(_sName);
        }
 }
+
+// 
-----------------------------------------------------------------------------
+void ODBTableDecorator::columnCloned(const Reference< XPropertySet >& 
/*_xClone*/)
+{
+}
+
 // 
-----------------------------------------------------------------------------
 Reference< XPropertySet > ODBTableDecorator::createEmptyObject()
 {
@@ -721,8 +737,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