diff options
author | Kayo Hamid <revol.code@yahoo.com> | 2010-10-14 21:14:52 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2010-10-14 21:15:24 +0100 |
commit | b7c82daa28526c566047e158ab2ace522fc442dc (patch) | |
tree | c71f33ee622add8de9013a170a7463ed564ad6e8 /shell | |
parent | 1b0c6da1c3bcc6a9c1412d221d029885f9998fa1 (diff) |
Switch to use SAL_N_ELEMENTS macro, everywhere
Diffstat (limited to 'shell')
5 files changed, 5 insertions, 6 deletions
diff --git a/shell/source/backends/gconfbe/gconfaccess.cxx b/shell/source/backends/gconfbe/gconfaccess.cxx index eff0bf4bbdb6..243032fbebe7 100644 --- a/shell/source/backends/gconfbe/gconfaccess.cxx +++ b/shell/source/backends/gconfbe/gconfaccess.cxx @@ -819,8 +819,7 @@ ConfigurationValue const ConfigurationValues[] = #endif // ENABLE_LOCKDOWN }; -std::size_t const nConfigurationValues = - sizeof ConfigurationValues / sizeof ConfigurationValues[0]; +std::size_t const nConfigurationValues = SAL_N_ELEMENTS(ConfigurationValues); css::beans::Optional< css::uno::Any > getValue(ConfigurationValue const & data) { diff --git a/shell/source/win32/shlxthandler/columninfo/columninfo.cxx b/shell/source/win32/shlxthandler/columninfo/columninfo.cxx index 21cd81a1cf80..bf83bb954bd5 100644 --- a/shell/source/win32/shlxthandler/columninfo/columninfo.cxx +++ b/shell/source/win32/shlxthandler/columninfo/columninfo.cxx @@ -53,7 +53,7 @@ namespace /* private */ {{PSGUID_SUMMARYINFORMATION, PIDSI_PAGECOUNT},VT_BSTR, LVCFMT_LEFT, 30, SHCOLSTATE_TYPE_STR, L"Pagecount", L"Pagecount"} }; - size_t ColumnInfoTableSize = sizeof(ColumnInfoTable)/sizeof(ColumnInfoTable[0]); + size_t ColumnInfoTableSize = SAL_N_ELEMENTS(ColumnInfoTable); } //---------------------------- diff --git a/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx index 8e7413b6cd66..8326ec38c0fa 100644 --- a/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx +++ b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx @@ -68,7 +68,7 @@ PROPERTYMAP g_rgPROPERTYMAP[] = { PKEY_Comment, L"OpenOffice.org", L"Comments" }, }; -size_t gPropertyMapTableSize = sizeof(g_rgPROPERTYMAP)/sizeof(g_rgPROPERTYMAP[0]); +size_t gPropertyMapTableSize = SAL_N_ELEMENTS(g_rgPROPERTYMAP); //---------------------------- // diff --git a/shell/source/win32/shlxthandler/util/fileextensions.cxx b/shell/source/win32/shlxthandler/util/fileextensions.cxx index 7a5c76154222..6318f9e943b0 100644 --- a/shell/source/win32/shlxthandler/util/fileextensions.cxx +++ b/shell/source/win32/shlxthandler/util/fileextensions.cxx @@ -68,7 +68,7 @@ FileExtensionEntry OOFileExtensionTable[] = { }; -size_t OOFileExtensionTableSize = sizeof(OOFileExtensionTable)/sizeof(OOFileExtensionTable[0]); +size_t OOFileExtensionTableSize = SAL_N_ELEMENTS(OOFileExtensionTable); //--------------------------------- /** Return the extension of a file diff --git a/shell/source/win32/simplemail/senddoc.cxx b/shell/source/win32/simplemail/senddoc.cxx index 0c205a25baac..72ef052a142b 100644 --- a/shell/source/win32/simplemail/senddoc.cxx +++ b/shell/source/win32/simplemail/senddoc.cxx @@ -187,7 +187,7 @@ char* KnownParameter[] = "--mapi-logon-ui" }; -const size_t nKnownParameter = (sizeof(KnownParameter)/sizeof(KnownParameter[0])); +const size_t nKnownParameter = (SAL_N_ELEMENTS(KnownParameter)); /** @internal */ bool isKnownParameter(const char* aParameterName) |