diff options
author | Kenneth Venken <kenneth.venken@gmail.com> | 2010-10-15 18:15:35 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2010-10-15 18:15:35 +0100 |
commit | 394235bba1f7c474c9655f929f4fe27a550aba45 (patch) | |
tree | 266bd52b9f0b82dc5b21c4c7a9d829fb1ff87003 /forms/source | |
parent | 7d4ffef8b74cd9ac2959006bac8d5c582b313e61 (diff) |
SAL_N_ELEMENTS changes for components
Diffstat (limited to 'forms/source')
-rw-r--r-- | forms/source/richtext/richtextvclcontrol.cxx | 4 | ||||
-rw-r--r-- | forms/source/runtime/formoperations.cxx | 3 | ||||
-rw-r--r-- | forms/source/solar/control/navtoolbar.cxx | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx index 6dea7285ea86..53e7d9091f80 100644 --- a/forms/source/richtext/richtextvclcontrol.cxx +++ b/forms/source/richtext/richtextvclcontrol.cxx @@ -262,7 +262,7 @@ namespace frm ::sfx2::FileDialogHelper aFP( bLoad ? com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE : com::sun::star::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION, 0, this ); - for ( size_t i = 0; i < sizeof( aExportFormats ) / sizeof( aExportFormats[ 0 ] ); ++i ) + for ( size_t i = 0; i < SAL_N_ELEMENTS( aExportFormats ); ++i ) { aFP.AddFilter( String::CreateFromAscii( aExportFormats[i].pDescription ), @@ -279,7 +279,7 @@ namespace frm { EETextFormat eFormat = EE_FORMAT_XML; String sFilter = aFP.GetCurrentFilter(); - for ( size_t i = 0; i < sizeof( aExportFormats ) / sizeof( aExportFormats[ 0 ] ); ++i ) + for ( size_t i = 0; i < SAL_N_ELEMENTS( aExportFormats ); ++i ) { if ( sFilter.EqualsAscii( aExportFormats[i].pDescription ) ) { diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx index c6c700acdc1b..b1d7e01f837b 100644 --- a/forms/source/runtime/formoperations.cxx +++ b/forms/source/runtime/formoperations.cxx @@ -69,6 +69,7 @@ #include <comphelper/namedvaluecollection.hxx> #include <cppuhelper/exc_hlp.hxx> #include <vos/mutex.hxx> +#include <sal/macros.h> //-------------------------------------------------------------------------- extern "C" void SAL_CALL createRegistryInfo_FormOperations() @@ -1124,7 +1125,7 @@ namespace frm FormFeature::SaveRecordChanges, FormFeature::UndoRecordChanges }; - size_t nFeatureCount = sizeof( pModifyDependentFeatures ) / sizeof( pModifyDependentFeatures[ 0 ] ); + size_t nFeatureCount = SAL_N_ELEMENTS( pModifyDependentFeatures ); s_aModifyDependentFeatures = Sequence< sal_Int16 >( pModifyDependentFeatures, nFeatureCount ); } diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx index 747cf3379aef..7e5974971283 100644 --- a/forms/source/solar/control/navtoolbar.cxx +++ b/forms/source/solar/control/navtoolbar.cxx @@ -43,6 +43,7 @@ #include <vcl/fixed.hxx> #include <memory> +#include <sal/macros.h> #define LID_RECORD_LABEL 1000 #define LID_RECORD_FILLER 1001 @@ -295,7 +296,7 @@ namespace frm { FormFeature::RemoveFilterAndSort, false, false }, }; - size_t nSupportedFeatures = sizeof( aSupportedFeatures ) / sizeof( aSupportedFeatures[0] ); + size_t nSupportedFeatures = SAL_N_ELEMENTS( aSupportedFeatures ); FeatureDescription* pSupportedFeatures = aSupportedFeatures; FeatureDescription* pSupportedFeaturesEnd = aSupportedFeatures + nSupportedFeatures; for ( ; pSupportedFeatures < pSupportedFeaturesEnd; ++pSupportedFeatures ) |