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 | 8279868bb177cdfc07f3eeed380412616e4958db (patch) | |
tree | 5f138b0608affff85602ab4dabc641651508fb72 /shell | |
parent | 939cd5666cb104ccaad67863258f9a67bb01434b (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 2258f5f475..bccae4daca 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 5d5bc820a0..7bfdb4a17e 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 8c7b21ba28..7daa879077 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 714cde7961..d302ef431c 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 55059cf57c..aa1ca65c12 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) |