diff options
author | Thorsten Behrens <tbehrens@suse.com> | 2012-01-09 18:56:42 +0100 |
---|---|---|
committer | Thorsten Behrens <tbehrens@suse.com> | 2012-01-09 18:57:11 +0100 |
commit | 9c59cd15b150638c845bbc275b9b04460afc23bd (patch) | |
tree | 0f2ea894356cf422976b5f8f354930fb582c727f /slideshow | |
parent | 8f468159691f051ea2fa5d28486b989ecc75d69a (diff) |
Use SAL_N_ELEMENTS in slideshow where possible.
Diffstat (limited to 'slideshow')
-rw-r--r-- | slideshow/source/engine/attributemap.cxx | 2 | ||||
-rw-r--r-- | slideshow/source/engine/shapes/shapeimporter.cxx | 4 | ||||
-rw-r--r-- | slideshow/source/engine/transitions/transitionfactorytab.cxx | 7 |
3 files changed, 6 insertions, 7 deletions
diff --git a/slideshow/source/engine/attributemap.cxx b/slideshow/source/engine/attributemap.cxx index beb403a9fbd5..006a830a01a7 100644 --- a/slideshow/source/engine/attributemap.cxx +++ b/slideshow/source/engine/attributemap.cxx @@ -79,7 +79,7 @@ namespace slideshow }; static AnimateAttributeMap aMap( lcl_attributeMap, - sizeof(lcl_attributeMap)/sizeof(*lcl_attributeMap), + SAL_N_ELEMENTS(lcl_attributeMap), false ); AttributeType eAttributeType = ATTRIBUTE_INVALID; diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx index 82946438b1ae..f9df63bfd83a 100644 --- a/slideshow/source/engine/shapes/shapeimporter.cxx +++ b/slideshow/source/engine/shapes/shapeimporter.cxx @@ -311,7 +311,7 @@ ShapeSharedPtr ShapeImporter::createShape( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.sfx2.PluginObject" )), aPropertyValues, - sizeof(aPropertyValues)/sizeof(*aPropertyValues), + SAL_N_ELEMENTS(aPropertyValues), mrContext ); } else if( shapeType.equalsAsciiL( @@ -334,7 +334,7 @@ ShapeSharedPtr ShapeImporter::createShape( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.sfx2.AppletObject" )), aPropertyValues, - sizeof(aPropertyValues)/sizeof(*aPropertyValues), + SAL_N_ELEMENTS(aPropertyValues), mrContext ); } else if( shapeType.equalsAsciiL( diff --git a/slideshow/source/engine/transitions/transitionfactorytab.cxx b/slideshow/source/engine/transitions/transitionfactorytab.cxx index 2ceed3483a4a..f5cea7bbe7c6 100644 --- a/slideshow/source/engine/transitions/transitionfactorytab.cxx +++ b/slideshow/source/engine/transitions/transitionfactorytab.cxx @@ -2120,9 +2120,8 @@ static const TransitionInfo lcl_transitionInfo[] = const TransitionInfo* TransitionFactory::getTransitionInfo( sal_Int16 nTransitionType, sal_Int16 nTransitionSubType ) { - static const ::std::size_t lcl_tableSize( - sizeof(lcl_transitionInfo)/sizeof(TransitionInfo) ); - static const TransitionInfo* pTableEnd = lcl_transitionInfo+lcl_tableSize; + static const TransitionInfo* pTableEnd = lcl_transitionInfo+ + SAL_N_ELEMENTS(lcl_transitionInfo); const TransitionInfo* pRes = ::std::find_if( lcl_transitionInfo, pTableEnd, @@ -2137,7 +2136,7 @@ const TransitionInfo* TransitionFactory::getTransitionInfo( const TransitionInfo* TransitionFactory::getRandomTransitionInfo() { return lcl_transitionInfo + getRandomOrdinal( - sizeof(lcl_transitionInfo) / sizeof(TransitionInfo) + SAL_N_ELEMENTS(lcl_transitionInfo) - 1 /* exclude random transition at end of table */ ); } |