diff options
author | Michael Meeks <michael.meeks@suse.com> | 2012-05-29 17:23:51 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-05-29 18:03:34 +0100 |
commit | 6e6d81e9cfc593d865e409ad22b2307f87a37859 (patch) | |
tree | 4d578e5be2dfd3a403576d7c638f83f041d56911 /ucb/source | |
parent | b7c6716b4bc0742af4206035495d161e7eb49424 (diff) |
targetted SAL_N_ELEMENTS reversion.
Change-Id: I30be93ccaeb1f9fd17cbe9e3ed3165e094810b2e
Diffstat (limited to 'ucb/source')
-rw-r--r-- | ucb/source/ucp/ext/ucpext_content.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/gio/gio_content.cxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/gvfs/gvfs_content.cxx | 5 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchycontentcaps.cxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/package/pkgcontentcaps.cxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_contentcaps.cxx | 4 |
6 files changed, 12 insertions, 11 deletions
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx index 5138eabf5dc6..1d05a2197426 100644 --- a/ucb/source/ucp/ext/ucpext_content.cxx +++ b/ucb/source/ucp/ext/ucpext_content.cxx @@ -635,7 +635,7 @@ namespace ucb { namespace ucp { namespace ext PropertyAttribute::BOUND | PropertyAttribute::READONLY ) }; - return Sequence< Property >( aProperties, SAL_N_ELEMENTS( aProperties )); + return Sequence< Property >( aProperties, sizeof( aProperties ) / sizeof( aProperties[0] ) ); } //------------------------------------------------------------------------------------------------------------------ diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx index 8b0ff7d918b2..fbaf0f198c4a 100644 --- a/ucb/source/ucp/gio/gio_content.cxx +++ b/ucb/source/ucp/gio/gio_content.cxx @@ -1258,7 +1258,7 @@ uno::Sequence< beans::Property > Content::getProperties( beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ) }; - const int nProps = SAL_N_ELEMENTS(aGenericProperties); + const int nProps = sizeof (aGenericProperties) / sizeof (aGenericProperties[0]); return uno::Sequence< beans::Property > ( aGenericProperties, nProps ); } @@ -1300,7 +1300,7 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( const uno::Reference< uc -1, getCppuType( static_cast<ucb::ContentInfo * >( 0 ) ) ) }; - const int nProps = SAL_N_ELEMENTS(aCommandInfoTable); + const int nProps = sizeof (aCommandInfoTable) / sizeof (aCommandInfoTable[0]); 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 cb1bb50dea5e..7b0605a1cd33 100644 --- a/ucb/source/ucp/gvfs/gvfs_content.cxx +++ b/ucb/source/ucp/gvfs/gvfs_content.cxx @@ -1352,7 +1352,7 @@ uno::Sequence< beans::Property > Content::getProperties( beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ) }; - const int nProps = SAL_N_ELEMENTS(aGenericProperties); + const int nProps = sizeof (aGenericProperties) / sizeof (aGenericProperties[0]); return uno::Sequence< beans::Property > ( aGenericProperties, nProps ); @@ -1396,7 +1396,8 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( -1, getCppuType( static_cast<ucb::ContentInfo * >( 0 ) ) ) }; - const int nProps = SAL_N_ELEMENTS( aCommandInfoTable ); + const int nProps + = sizeof( aCommandInfoTable ) / sizeof( aCommandInfoTable[ 0 ] ); 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 5d7c4fbf8f2f..f8bca868a62d 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontentcaps.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontentcaps.cxx @@ -77,10 +77,10 @@ using namespace hierarchy_ucp; //========================================================================= #define MAKEPROPSEQUENCE( a ) \ - uno::Sequence< beans::Property >( a, SAL_N_ELEMENTS( a ) ) + uno::Sequence< beans::Property >( a, sizeof( a ) / sizeof( a[ 0 ] ) ) #define MAKECMDSEQUENCE( a ) \ - uno::Sequence< ucb::CommandInfo >( a, SAL_N_ELEMENTS( a ) ) + uno::Sequence< ucb::CommandInfo >( a, sizeof( a ) / sizeof( a[ 0 ] ) ) //========================================================================= // diff --git a/ucb/source/ucp/package/pkgcontentcaps.cxx b/ucb/source/ucp/package/pkgcontentcaps.cxx index 02af0829f6ea..5eff46a369c6 100644 --- a/ucb/source/ucp/package/pkgcontentcaps.cxx +++ b/ucb/source/ucp/package/pkgcontentcaps.cxx @@ -78,10 +78,10 @@ using namespace package_ucp; //========================================================================= #define MAKEPROPSEQUENCE( a ) \ - uno::Sequence< beans::Property >( a, SAL_N_ELEMENTS( a ) ) + uno::Sequence< beans::Property >( a, sizeof( a ) / sizeof( a[ 0 ] ) ) #define MAKECMDSEQUENCE( a ) \ - uno::Sequence< ucb::CommandInfo >( a, SAL_N_ELEMENTS( a ) ) + uno::Sequence< ucb::CommandInfo >( a, sizeof( a ) / sizeof( a[ 0 ] ) ) //========================================================================= // diff --git a/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx b/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx index 7f8e49a0b3c2..90d5cc13c50c 100644 --- a/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx +++ b/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx @@ -87,10 +87,10 @@ using namespace tdoc_ucp; //========================================================================= #define MAKEPROPSEQUENCE( a ) \ - uno::Sequence< beans::Property >( a, SAL_N_ELEMENTS( a ) ) + uno::Sequence< beans::Property >( a, (sizeof (a) / sizeof (a[0])) ) #define MAKECMDSEQUENCE( a ) \ - uno::Sequence< ucb::CommandInfo >( a, SAL_N_ELEMENTS( a ) ) + uno::Sequence< ucb::CommandInfo >( a, (sizeof (a) / sizeof (a[0])) ) //========================================================================= // |