summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/postgresql
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-03-29 10:25:17 +0200
committerNoel Grandin <noel@peralex.com>2016-03-31 11:30:36 +0200
commit6439005484bdf6754b910b1ce025b3fb33b6623f (patch)
tree1a00f48ae11d3da3d928f2d3d68b3e299216328c /connectivity/source/drivers/postgresql
parent1aa4df615fa5599d05e9dd5e925b5852676185fa (diff)
use SAL_N_ELEMENTS more widely
found using git grep -n 'sizeof.*/.*sizeof.*[0]' Change-Id: Icd4a6cc1ca8ec8ebd68e1701a02789c74cf0eb2a
Diffstat (limited to 'connectivity/source/drivers/postgresql')
-rw-r--r--connectivity/source/drivers/postgresql/pq_statics.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_statics.cxx b/connectivity/source/drivers/postgresql/pq_statics.cxx
index ffc95798a3cf..66a399bdedcd 100644
--- a/connectivity/source/drivers/postgresql/pq_statics.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statics.cxx
@@ -217,7 +217,7 @@ Statics & getStatics()
PropertyDef( statics.SCHEMA_NAME , tString )
};
statics.refl.tableDescriptor.pProps = createPropertyArrayHelper(
- tableDescDef, sizeof(tableDescDef)/sizeof(PropertyDef), 0 );
+ tableDescDef, SAL_N_ELEMENTS(tableDescDef), 0 );
// Column props set
statics.refl.column.implName = "org.openoffice.comp.pq.sdbcx.Column";
@@ -265,7 +265,7 @@ Statics & getStatics()
};
statics.refl.columnDescriptor.pProps = createPropertyArrayHelper(
- columnDescDef, sizeof(columnDescDef)/sizeof(PropertyDef), 0 );
+ columnDescDef, SAL_N_ELEMENTS(columnDescDef), 0 );
// Key properties
statics.refl.key.implName = "org.openoffice.comp.pq.sdbcx.Key";
@@ -300,7 +300,7 @@ Statics & getStatics()
PropertyDef( statics.UPDATE_RULE, tInt )
};
statics.refl.keyDescriptor.pProps = createPropertyArrayHelper(
- keyDescDef, sizeof(keyDescDef)/sizeof(PropertyDef), 0 );
+ keyDescDef, SAL_N_ELEMENTS(keyDescDef), 0 );
// KeyColumn props set
@@ -338,7 +338,7 @@ Statics & getStatics()
PropertyDef( statics.RELATED_COLUMN, tString )
};
statics.refl.keycolumnDescriptor.pProps = createPropertyArrayHelper(
- keycolumnDescDef, sizeof(keycolumnDescDef)/sizeof(PropertyDef), 0 );
+ keycolumnDescDef, SAL_N_ELEMENTS(keycolumnDescDef), 0 );
// view props set
statics.refl.view.implName = "org.openoffice.comp.pq.sdbcx.View";
@@ -360,7 +360,7 @@ Statics & getStatics()
statics.refl.viewDescriptor.serviceNames = Sequence< OUString > ( 1 );
statics.refl.viewDescriptor.serviceNames[0] = "com.sun.star.sdbcx.ViewDescriptor";
statics.refl.viewDescriptor.pProps = createPropertyArrayHelper(
- viewDef, sizeof(viewDef)/sizeof(PropertyDef), 0 ); // reuse view, as it is identical
+ viewDef, SAL_N_ELEMENTS(viewDef), 0 ); // reuse view, as it is identical
// user props set
statics.refl.user.implName = "org.openoffice.comp.pq.sdbcx.User";
statics.refl.user.serviceNames = Sequence< OUString > ( 1 );
@@ -384,7 +384,7 @@ Statics & getStatics()
PropertyDef( statics.PASSWORD , tString )
};
statics.refl.userDescriptor.pProps = createPropertyArrayHelper(
- userDefWR, sizeof(userDefWR)/sizeof(PropertyDef), 0 );
+ userDefWR, SAL_N_ELEMENTS(userDefWR), 0 );
// index props set
statics.refl.index.implName = "org.openoffice.comp.pq.sdbcx.Index";
@@ -409,7 +409,7 @@ Statics & getStatics()
statics.refl.indexDescriptor.serviceNames[0] =
"com.sun.star.sdbcx.IndexDescriptor";
statics.refl.indexDescriptor.pProps = createPropertyArrayHelper(
- indexDef, sizeof(indexDef)/sizeof(PropertyDef), 0 );
+ indexDef, SAL_N_ELEMENTS(indexDef), 0 );
// indexColumn props set
statics.refl.indexColumn.implName = "org.openoffice.comp.pq.sdbcx.IndexColumn";
@@ -446,7 +446,7 @@ Statics & getStatics()
PropertyDef( statics.NAME , tString )
};
statics.refl.indexColumnDescriptor.pProps = createPropertyArrayHelper(
- indexColumnDescDef, sizeof(indexColumnDescDef)/sizeof(PropertyDef), 0 );
+ indexColumnDescDef, SAL_N_ELEMENTS(indexColumnDescDef), 0 );
// resultset
statics.refl.resultSet.implName = "org.openoffice.comp.pq.ResultSet";
@@ -464,7 +464,7 @@ Statics & getStatics()
PropertyDef( statics.RESULT_SET_TYPE , tInt )
};
statics.refl.resultSet.pProps = createPropertyArrayHelper(
- resultSet, sizeof(resultSet)/sizeof(PropertyDef), 0 );
+ resultSet, SAL_N_ELEMENTS(resultSet), 0 );
// updateableResultset
statics.refl.updateableResultSet.implName = "org.openoffice.comp.pq.UpdateableResultSet";
@@ -472,7 +472,7 @@ Statics & getStatics()
statics.refl.updateableResultSet.serviceNames[0] = "com.sun.star.sdbc.ResultSet";
statics.refl.updateableResultSet.types = UpdateableResultSet::getStaticTypes( true /* updateable */ );
statics.refl.updateableResultSet.pProps = createPropertyArrayHelper(
- resultSet, sizeof(resultSet)/sizeof(PropertyDef), 0 );
+ resultSet, SAL_N_ELEMENTS(resultSet), 0 );
// databasemetadata
statics.tablesRowNames = std::vector< OUString > ( 5 );