Tag: cws_src680_warnings01 User: fs Date: 06/06/14 03:57:14 Modified: /dba/dbaccess/source/core/api/ TableDeco.cxx
Log: #i66367# reverted previous changes related to replacing IdPropertyArrayHelper with PropertyArrayHelper - there's a subtle difference between both ids ... 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.50.1&r2=1.25.50.2 Delta lines: +14 -4 -------------------- --- TableDeco.cxx 24 Mar 2006 15:35:47 -0000 1.25.50.1 +++ TableDeco.cxx 14 Jun 2006 10:57:11 -0000 1.25.50.2 @@ -4,9 +4,9 @@ * * $RCSfile: TableDeco.cxx,v $ * - * $Revision: 1.25.50.1 $ + * $Revision: 1.25.50.2 $ * - * last change: $Author: fs $ $Date: 2006/03/24 15:35:47 $ + * last change: $Author: fs $ $Date: 2006/06/14 10:57:11 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -392,7 +392,7 @@ &m_nPrivileges, ::getCppuType(static_cast<sal_Int32*>(NULL))); } // ----------------------------------------------------------------------------- -::cppu::IPropertyArrayHelper* ODBTableDecorator::createArrayHelper() 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( bIsDescriptor ? 0 : 1 ); - return *ODBTableDecorator_PROP::getArrayHelper(); + // 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
