Kaydet (Commit) 9c59cd15 authored tarafından Thorsten Behrens's avatar Thorsten Behrens

Use SAL_N_ELEMENTS in slideshow where possible.

üst 8f468159
......@@ -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;
......
......@@ -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(
......
......@@ -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 */ );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment