[Libreoffice-commits] .: dbaccess/source

Caolán McNamara caolan at kemper.freedesktop.org
Fri Jan 7 03:31:41 PST 2011


 dbaccess/source/core/api/CRowSetColumn.cxx     |    6 ++----
 dbaccess/source/core/api/CRowSetDataColumn.cxx |    6 ++----
 dbaccess/source/core/api/definitioncolumn.cxx  |   10 ++++------
 3 files changed, 8 insertions(+), 14 deletions(-)

New commits:
commit 3304e69b8689bcb3c03665e4f5c1dd10405aef5c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 7 11:31:35 2011 +0000

    fix this up but keep cppcheck silent

diff --git a/dbaccess/source/core/api/CRowSetColumn.cxx b/dbaccess/source/core/api/CRowSetColumn.cxx
index bbda9df..e464648 100644
--- a/dbaccess/source/core/api/CRowSetColumn.cxx
+++ b/dbaccess/source/core/api/CRowSetColumn.cxx
@@ -55,9 +55,7 @@ ORowSetColumn::ORowSetColumn(	const Reference < XResultSetMetaData >& _xMetaData
 
 ::cppu::IPropertyArrayHelper* ORowSetColumn::createArrayHelper( ) const
 {
-    const sal_Int32 nDerivedProperties = 21;
-    Sequence< Property> aDerivedProperties( nDerivedProperties );
-    sal_Int32 nPos = 0;
+    BEGIN_PROPERTY_SEQUENCE(21)
 
     DECL_PROP1( CATALOGNAME,                ::rtl::OUString,    READONLY );
     DECL_PROP1( DISPLAYSIZE,                sal_Int32,          READONLY );
@@ -85,7 +83,7 @@ ORowSetColumn::ORowSetColumn(	const Reference < XResultSetMetaData >& _xMetaData
     Sequence< Property > aRegisteredProperties;
     describeProperties( aRegisteredProperties );
 
-    return new ::cppu::OPropertyArrayHelper( ::comphelper::concatSequences( aDerivedProperties, aRegisteredProperties ), sal_False );
+    return new ::cppu::OPropertyArrayHelper( ::comphelper::concatSequences( aDescriptor, aRegisteredProperties ), sal_False );
 }
 
 ::cppu::IPropertyArrayHelper& ORowSetColumn::getInfoHelper()
diff --git a/dbaccess/source/core/api/CRowSetDataColumn.cxx b/dbaccess/source/core/api/CRowSetDataColumn.cxx
index 6942dd9..333a8f4 100644
--- a/dbaccess/source/core/api/CRowSetDataColumn.cxx
+++ b/dbaccess/source/core/api/CRowSetDataColumn.cxx
@@ -77,9 +77,7 @@ ORowSetDataColumn::~ORowSetDataColumn()
 // comphelper::OPropertyArrayUsageHelper
 ::cppu::IPropertyArrayHelper* ORowSetDataColumn::createArrayHelper( ) const
 {
-    const sal_Int32 nDerivedProperties = 21;
-    Sequence< Property> aDerivedProperties( nDerivedProperties );
-    sal_Int32 nPos = 0;
+    BEGIN_PROPERTY_HELPER(21)
 
     DECL_PROP1( CATALOGNAME,                ::rtl::OUString,    READONLY );
     DECL_PROP1( DISPLAYSIZE,                sal_Int32,          READONLY );
@@ -107,7 +105,7 @@ ORowSetDataColumn::~ORowSetDataColumn()
     Sequence< Property > aRegisteredProperties;
     describeProperties( aRegisteredProperties );
 
-    return new ::cppu::OPropertyArrayHelper( ::comphelper::concatSequences( aDerivedProperties, aRegisteredProperties ), sal_False );
+    return new ::cppu::OPropertyArrayHelper( ::comphelper::concatSequences( aDescriptor, aRegisteredProperties ), sal_False );
 }
 
 // cppu::OPropertySetHelper
diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx
index 044039a..bf7c39d 100644
--- a/dbaccess/source/core/api/definitioncolumn.cxx
+++ b/dbaccess/source/core/api/definitioncolumn.cxx
@@ -469,9 +469,7 @@ Sequence< ::rtl::OUString > OTableColumnDescriptorWrapper::getSupportedServiceNa
     if ( nId & HAS_AUTOINCREMENT_CREATION )
         ++nHaveOptionally;
 
-    const sal_Int32 nPropertyCount( nHaveAlways + nHaveOptionally );
-    Sequence< Property > aTableDescProperties( nPropertyCount );
-    sal_Int32 nPos = 0;
+    BEGIN_PROPERTY_SEQUENCE( nHaveAlways + nHaveOptionally )
 
     DECL_PROP0_BOOL( ISAUTOINCREMENT                );
     DECL_PROP0_BOOL( ISCURRENCY                     );
@@ -502,8 +500,8 @@ Sequence< ::rtl::OUString > OTableColumnDescriptorWrapper::getSupportedServiceNa
 
     if ( !m_bIsDescriptor )
     {
-        for (   Property* prop = aTableDescProperties.getArray();
-                prop != aTableDescProperties.getArray() + aTableDescProperties.getLength();
+        for (   Property* prop = aDescriptor.getArray();
+                prop != aDescriptor.getArray() + aDescriptor.getLength();
                 ++prop
             )
         {
@@ -515,7 +513,7 @@ Sequence< ::rtl::OUString > OTableColumnDescriptorWrapper::getSupportedServiceNa
     Sequence< Property > aBaseProperties;
     describeProperties( aBaseProperties );
 
-    Sequence< Property > aAllProperties( ::comphelper::concatSequences( aTableDescProperties, aBaseProperties ) );
+    Sequence< Property > aAllProperties( ::comphelper::concatSequences( aDescriptor, aBaseProperties ) );
     return new ::cppu::OPropertyArrayHelper( aAllProperties, sal_False );
 }
 


More information about the Libreoffice-commits mailing list