summaryrefslogtreecommitdiff
path: root/sfx2
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 /sfx2
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 'sfx2')
-rw-r--r--sfx2/source/appl/shutdowniconw32.cxx2
-rw-r--r--sfx2/source/view/frmload.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx
index 34cfb292c831..ce37d3032b31 100644
--- a/sfx2/source/appl/shutdowniconw32.cxx
+++ b/sfx2/source/appl/shutdowniconw32.cxx
@@ -180,7 +180,7 @@ static HMENU createSystrayMenu( )
};
// insert the menu entries for launching the applications
- for ( size_t i = 0; i < sizeof( aMenuItems ) / sizeof( aMenuItems[0] ); ++i )
+ for ( size_t i = 0; i < SAL_N_ELEMENTS(aMenuItems); ++i )
{
if ( !aModuleOptions.IsModuleInstalled( aMenuItems[i].eModuleIdentifier ) )
// the complete application is not even installed
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index d3045287441c..c7eea129ff85 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -528,13 +528,13 @@ void SfxFrameLoader_Impl::impl_removeLoaderArguments( ::comphelper::NamedValueCo
::comphelper::NamedValueCollection SfxFrameLoader_Impl::impl_extractViewCreationArgs( ::comphelper::NamedValueCollection& io_rDescriptor )
{
- const sal_Char* pKnownViewArgs[] = {
+ static const char* pKnownViewArgs[] = {
"JumpMark",
"PickListEntry"
};
::comphelper::NamedValueCollection aViewArgs;
- for ( size_t i=0; i < sizeof( pKnownViewArgs ) / sizeof( pKnownViewArgs[0] ); ++i )
+ for ( size_t i=0; i < SAL_N_ELEMENTS(pKnownViewArgs); ++i )
{
if ( io_rDescriptor.has( pKnownViewArgs[i] ) )
{