summaryrefslogtreecommitdiff
path: root/sd/source/ui/slideshow/slideshowimpl.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-03-28 17:12:04 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-03-31 08:00:13 +0000
commit1aa4df615fa5599d05e9dd5e925b5852676185fa (patch)
tree1f637fa13140941a5775c91f058d0742f911693f /sd/source/ui/slideshow/slideshowimpl.cxx
parent2bd1e7aafeebdfe0e1656ed1ff01762039be5af1 (diff)
use SAL_N_ELEMENTS in for loops
for with git grep -n 'for.*sizeof' Change-Id: I6211024385e03ac5eeeb38690d2c1c699e015c2f Reviewed-on: https://gerrit.libreoffice.org/23569 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sd/source/ui/slideshow/slideshowimpl.cxx')
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 954bdd32dd78..482d9cd9d66b 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -2418,7 +2418,7 @@ void SlideshowImpl::createSlideList( bool bAll, const OUString& rPresSlide )
typedef sal_uInt16 (*FncGetChildWindowId)();
-FncGetChildWindowId aShowChildren[] =
+static const FncGetChildWindowId aShowChildren[] =
{
&AnimationChildWindow::GetChildWindowId,
&Svx3DChildWindow::GetChildWindowId,
@@ -2441,7 +2441,7 @@ void SlideshowImpl::hideChildWindows()
if( pViewFrame )
{
- for( sal_uLong i = 0, nCount = sizeof( aShowChildren ) / sizeof( FncGetChildWindowId ); i < nCount; i++ )
+ for( sal_uLong i = 0; i < SAL_N_ELEMENTS( aShowChildren ); i++ )
{
const sal_uInt16 nId = ( *aShowChildren[ i ] )();
@@ -2462,7 +2462,7 @@ void SlideshowImpl::showChildWindows()
SfxViewFrame* pViewFrame = getViewFrame();
if( pViewFrame )
{
- for( sal_uLong i = 0, nCount = sizeof( aShowChildren ) / sizeof( FncGetChildWindowId ); i < nCount; i++ )
+ for( sal_uLong i = 0; i < SAL_N_ELEMENTS(aShowChildren); i++ )
{
if( mnChildMask & ( 1 << i ) )
pViewFrame->SetChildWindow( ( *aShowChildren[ i ] )(), true );