summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorKayo Hamid <revol.code@yahoo.com>2010-10-14 21:14:52 +0100
committerMichael Meeks <michael.meeks@novell.com>2010-10-14 21:15:24 +0100
commit8279868bb177cdfc07f3eeed380412616e4958db (patch)
tree5f138b0608affff85602ab4dabc641651508fb72 /ucb
parent939cd5666cb104ccaad67863258f9a67bb01434b (diff)
Switch to use SAL_N_ELEMENTS macro, everywhere
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/ext/ucpext_content.cxx2
-rw-r--r--ucb/source/ucp/gio/gio_content.cxx4
-rw-r--r--ucb/source/ucp/gvfs/gvfs_content.cxx5
-rw-r--r--ucb/source/ucp/hierarchy/hierarchycontentcaps.cxx4
-rw-r--r--ucb/source/ucp/package/pkgcontentcaps.cxx4
-rw-r--r--ucb/source/ucp/tdoc/tdoc_contentcaps.cxx4
6 files changed, 11 insertions, 12 deletions
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx
index 6cf2ddc132..666ceb8a9d 100644
--- a/ucb/source/ucp/ext/ucpext_content.cxx
+++ b/ucb/source/ucp/ext/ucpext_content.cxx
@@ -620,7 +620,7 @@ namespace ucb { namespace ucp { namespace ext
PropertyAttribute::BOUND | PropertyAttribute::READONLY
)
};
- return Sequence< Property >( aProperties, sizeof( aProperties ) / sizeof( aProperties[0] ) );
+ return Sequence< Property >( aProperties, SAL_N_ELEMENTS( aProperties ));
}
//------------------------------------------------------------------------------------------------------------------
diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx
index cc623d47c7..16ccdcfebd 100644
--- a/ucb/source/ucp/gio/gio_content.cxx
+++ b/ucb/source/ucp/gio/gio_content.cxx
@@ -1255,7 +1255,7 @@ uno::Sequence< beans::Property > Content::getProperties(
beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY )
};
- const int nProps = sizeof (aGenericProperties) / sizeof (aGenericProperties[0]);
+ const int nProps = SAL_N_ELEMENTS(aGenericProperties);
return uno::Sequence< beans::Property > ( aGenericProperties, nProps );
}
@@ -1297,7 +1297,7 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( const uno::Reference< uc
-1, getCppuType( static_cast<ucb::ContentInfo * >( 0 ) ) )
};
- const int nProps = sizeof (aCommandInfoTable) / sizeof (aCommandInfoTable[0]);
+ const int nProps = SAL_N_ELEMENTS(aCommandInfoTable);
return uno::Sequence< ucb::CommandInfo >(aCommandInfoTable, isFolder(xEnv) ? nProps : nProps - 2);
}
diff --git a/ucb/source/ucp/gvfs/gvfs_content.cxx b/ucb/source/ucp/gvfs/gvfs_content.cxx
index 5ca193ba6c..1009e2410a 100644
--- a/ucb/source/ucp/gvfs/gvfs_content.cxx
+++ b/ucb/source/ucp/gvfs/gvfs_content.cxx
@@ -1355,7 +1355,7 @@ uno::Sequence< beans::Property > Content::getProperties(
beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY )
};
- const int nProps = sizeof (aGenericProperties) / sizeof (aGenericProperties[0]);
+ const int nProps = SAL_N_ELEMENTS(aGenericProperties);
return uno::Sequence< beans::Property > ( aGenericProperties, nProps );
@@ -1399,8 +1399,7 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands(
-1, getCppuType( static_cast<ucb::ContentInfo * >( 0 ) ) )
};
- const int nProps
- = sizeof( aCommandInfoTable ) / sizeof( aCommandInfoTable[ 0 ] );
+ const int nProps = SAL_N_ELEMENTS( aCommandInfoTable );
return uno::Sequence< ucb::CommandInfo >(
aCommandInfoTable, isFolder( xEnv ) ? nProps : nProps - 2 );
}
diff --git a/ucb/source/ucp/hierarchy/hierarchycontentcaps.cxx b/ucb/source/ucp/hierarchy/hierarchycontentcaps.cxx
index 9699ec50d0..91410b34cb 100644
--- a/ucb/source/ucp/hierarchy/hierarchycontentcaps.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchycontentcaps.cxx
@@ -78,10 +78,10 @@ using namespace hierarchy_ucp;
//=========================================================================
#define MAKEPROPSEQUENCE( a ) \
- uno::Sequence< beans::Property >( a, sizeof( a ) / sizeof( a[ 0 ] ) )
+ uno::Sequence< beans::Property >( a, SAL_N_ELEMENTS( a ) )
#define MAKECMDSEQUENCE( a ) \
- uno::Sequence< ucb::CommandInfo >( a, sizeof( a ) / sizeof( a[ 0 ] ) )
+ uno::Sequence< ucb::CommandInfo >( a, SAL_N_ELEMENTS( a ) )
//=========================================================================
//
diff --git a/ucb/source/ucp/package/pkgcontentcaps.cxx b/ucb/source/ucp/package/pkgcontentcaps.cxx
index 01e1ef7fb8..28bd56dad0 100644
--- a/ucb/source/ucp/package/pkgcontentcaps.cxx
+++ b/ucb/source/ucp/package/pkgcontentcaps.cxx
@@ -79,10 +79,10 @@ using namespace package_ucp;
//=========================================================================
#define MAKEPROPSEQUENCE( a ) \
- uno::Sequence< beans::Property >( a, sizeof( a ) / sizeof( a[ 0 ] ) )
+ uno::Sequence< beans::Property >( a, SAL_N_ELEMENTS( a ) )
#define MAKECMDSEQUENCE( a ) \
- uno::Sequence< ucb::CommandInfo >( a, sizeof( a ) / sizeof( a[ 0 ] ) )
+ uno::Sequence< ucb::CommandInfo >( a, SAL_N_ELEMENTS( a ) )
//=========================================================================
//
diff --git a/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx b/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx
index d8674ebde0..d8aa7e1377 100644
--- a/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx
@@ -89,10 +89,10 @@ using namespace tdoc_ucp;
//=========================================================================
#define MAKEPROPSEQUENCE( a ) \
- uno::Sequence< beans::Property >( a, sizeof( a ) / sizeof( a[ 0 ] ) )
+ uno::Sequence< beans::Property >( a, SAL_N_ELEMTS( a ) )
#define MAKECMDSEQUENCE( a ) \
- uno::Sequence< ucb::CommandInfo >( a, sizeof( a ) / sizeof( a[ 0 ] ) )
+ uno::Sequence< ucb::CommandInfo >( a, SAL_N_ELEMENTS( a ) )
//=========================================================================
//