summaryrefslogtreecommitdiff
path: root/xmloff/source/forms/elementexport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/forms/elementexport.cxx')
-rw-r--r--xmloff/source/forms/elementexport.cxx46
1 files changed, 23 insertions, 23 deletions
diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx
index 0b24033477da..d6ecb786a74d 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -584,9 +584,9 @@ namespace xmloff
BOOLATTR_DEFAULT_FALSE, BOOLATTR_DEFAULT_FALSE | BOOLATTR_INVERSE_SEMANTICS, BOOLATTR_DEFAULT_FALSE, BOOLATTR_DEFAULT_TRUE, BOOLATTR_DEFAULT_FALSE, BOOLATTR_DEFAULT_FALSE, BOOLATTR_DEFAULT_VOID, BOOLATTR_DEFAULT_FALSE
};
#if OSL_DEBUG_LEVEL > 0
- static const sal_Int32 nIdCount = sizeof(nBooleanPropertyAttributeIds) / sizeof(nBooleanPropertyAttributeIds[0]);
- static const sal_Int32 nNameCount = sizeof(pBooleanPropertyNames) / sizeof(pBooleanPropertyNames[0]);
- static const sal_Int32 nFlagsCount = sizeof(nBooleanPropertyAttrFlags) / sizeof(nBooleanPropertyAttrFlags[0]);
+ static const sal_Int32 nIdCount = SAL_N_ELEMENTS(nBooleanPropertyAttributeIds);
+ static const sal_Int32 nNameCount = SAL_N_ELEMENTS(pBooleanPropertyNames);
+ static const sal_Int32 nFlagsCount = SAL_N_ELEMENTS(nBooleanPropertyAttrFlags);
OSL_ENSURE((nIdCount == nNameCount) && (nNameCount == nFlagsCount),
"OControlExport::exportCommonControlAttributes: somebody tampered with the maps (2)!");
#endif
@@ -625,9 +625,9 @@ namespace xmloff
exportedProperty(PROPERTY_MAXTEXTLENGTH);
#if OSL_DEBUG_LEVEL > 0
- static const sal_Int32 nIdCount = sizeof(nIntegerPropertyAttributeIds) / sizeof(nIntegerPropertyAttributeIds[0]);
- static const sal_Int32 nNameCount = sizeof(pIntegerPropertyNames) / sizeof(pIntegerPropertyNames[0]);
- static const sal_Int32 nDefaultCount = sizeof(nIntegerPropertyAttrDefaults) / sizeof(nIntegerPropertyAttrDefaults[0]);
+ static const sal_Int32 nIdCount = SAL_N_ELEMENTS(nIntegerPropertyAttributeIds);
+ static const sal_Int32 nNameCount = SAL_N_ELEMENTS(pIntegerPropertyNames);
+ static const sal_Int32 nDefaultCount = SAL_N_ELEMENTS(nIntegerPropertyAttrDefaults);
OSL_ENSURE((nIdCount == nNameCount) && (nNameCount == nDefaultCount),
"OControlExport::exportCommonControlAttributes: somebody tampered with the maps (3)!");
#endif
@@ -977,9 +977,9 @@ namespace xmloff
PROPERTY_DEFAULTBUTTON, PROPERTY_TRISTATE,
PROPERTY_TOGGLE, PROPERTY_FOCUS_ON_CLICK
};
- static const sal_Int32 nIdCount = sizeof(nBooleanPropertyAttributeIds) / sizeof(nBooleanPropertyAttributeIds[0]);
+ static const sal_Int32 nIdCount = SAL_N_ELEMENTS(nBooleanPropertyAttributeIds);
#if OSL_DEBUG_LEVEL > 0
- static const sal_Int32 nNameCount = sizeof(pBooleanPropertyNames) / sizeof(pBooleanPropertyNames[0]);
+ static const sal_Int32 nNameCount = SAL_N_ELEMENTS(pBooleanPropertyNames);
OSL_ENSURE((nIdCount == nNameCount),
"OControlExport::exportSpecialAttributes: somebody tampered with the maps (1)!");
#endif
@@ -1017,12 +1017,12 @@ namespace xmloff
10
};
- static const sal_Int32 nIdCount = sizeof( nIntegerPropertyAttributeIds ) / sizeof( nIntegerPropertyAttributeIds[0] );
+ static const sal_Int32 nIdCount = SAL_N_ELEMENTS( nIntegerPropertyAttributeIds );
#if OSL_DEBUG_LEVEL > 0
- static const sal_Int32 nNameCount = sizeof( pIntegerPropertyNames ) / sizeof( pIntegerPropertyNames[0] );
+ static const sal_Int32 nNameCount = SAL_N_ELEMENTS( pIntegerPropertyNames );
OSL_ENSURE( ( nIdCount == nNameCount ),
"OControlExport::exportSpecialAttributes: somebody tampered with the maps (2)!" );
- static const sal_Int32 nDefaultCount = sizeof( nIntegerPropertyAttrDefaults ) / sizeof( nIntegerPropertyAttrDefaults[0] );
+ static const sal_Int32 nDefaultCount = SAL_N_ELEMENTS( nIntegerPropertyAttrDefaults );
OSL_ENSURE( ( nIdCount == nDefaultCount ),
"OControlExport::exportSpecialAttributes: somebody tampered with the maps (3)!" );
#endif
@@ -1164,9 +1164,9 @@ namespace xmloff
OUString(PROPERTY_GROUP_NAME)
};
- static const sal_Int32 nIdCount = sizeof( nStringPropertyAttributeIds ) / sizeof( nStringPropertyAttributeIds[0] );
+ static const sal_Int32 nIdCount = SAL_N_ELEMENTS( nStringPropertyAttributeIds );
#if OSL_DEBUG_LEVEL > 0
- static const sal_Int32 nNameCount = sizeof( pStringPropertyNames ) / sizeof( pStringPropertyNames[0] );
+ static const sal_Int32 nNameCount = SAL_N_ELEMENTS( pStringPropertyNames );
OSL_ENSURE( ( nIdCount == nNameCount ),
"OControlExport::exportSpecialAttributes: somebody tampered with the maps (2)!" );
#endif
@@ -2093,9 +2093,9 @@ namespace xmloff
{
PROPERTY_NAME, /*PROPERTY_TARGETURL,*/ PROPERTY_COMMAND, PROPERTY_FILTER, PROPERTY_ORDER
};
- static const sal_Int32 nIdCount = sizeof(eStringPropertyIds) / sizeof(eStringPropertyIds[0]);
+ static const sal_Int32 nIdCount = SAL_N_ELEMENTS(eStringPropertyIds);
#if OSL_DEBUG_LEVEL > 0
- static const sal_Int32 nNameCount = sizeof(aStringPropertyNames) / sizeof(aStringPropertyNames[0]);
+ static const sal_Int32 nNameCount = SAL_N_ELEMENTS(aStringPropertyNames);
OSL_ENSURE((nIdCount == nNameCount),
"OFormExport::exportAttributes: somebody tampered with the maps (1)!");
#endif
@@ -2146,10 +2146,10 @@ namespace xmloff
{
BOOLATTR_DEFAULT_TRUE, BOOLATTR_DEFAULT_TRUE, BOOLATTR_DEFAULT_TRUE, BOOLATTR_DEFAULT_FALSE, BOOLATTR_DEFAULT_TRUE, BOOLATTR_DEFAULT_FALSE
};
- static const sal_Int32 nIdCount = sizeof(eBooleanPropertyIds) / sizeof(eBooleanPropertyIds[0]);
+ static const sal_Int32 nIdCount = SAL_N_ELEMENTS(eBooleanPropertyIds);
#if OSL_DEBUG_LEVEL > 0
- static const sal_Int32 nNameCount = sizeof(pBooleanPropertyNames) / sizeof(pBooleanPropertyNames[0]);
- static const sal_Int32 nFlagsCount = sizeof(nBooleanPropertyAttrFlags) / sizeof(nBooleanPropertyAttrFlags[0]);
+ static const sal_Int32 nNameCount = SAL_N_ELEMENTS(pBooleanPropertyNames);
+ static const sal_Int32 nFlagsCount = SAL_N_ELEMENTS(nBooleanPropertyAttrFlags);
OSL_ENSURE((nIdCount == nNameCount) && (nNameCount == nFlagsCount),
"OFormExport::exportAttributes: somebody tampered with the maps (2)!");
#endif
@@ -2184,12 +2184,12 @@ namespace xmloff
{
sal_False, sal_False, sal_False, sal_False, sal_True
};
- static const sal_Int32 nIdCount = sizeof(eEnumPropertyIds) / sizeof(eEnumPropertyIds[0]);
+ static const sal_Int32 nIdCount = SAL_N_ELEMENTS(eEnumPropertyIds);
#if OSL_DEBUG_LEVEL > 0
- static const sal_Int32 nNameCount = sizeof(pEnumPropertyNames) / sizeof(pEnumPropertyNames[0]);
- static const sal_Int32 nDefaultCount = sizeof(nEnumPropertyAttrDefaults) / sizeof(nEnumPropertyAttrDefaults[0]);
- static const sal_Int32 nDefaultFlagCount = sizeof(nEnumPropertyAttrDefaultFlags) / sizeof(nEnumPropertyAttrDefaultFlags[0]);
- static const sal_Int32 nMapCount = sizeof(eEnumPropertyMaps) / sizeof(eEnumPropertyMaps[0]);
+ static const sal_Int32 nNameCount = SAL_N_ELEMENTS(pEnumPropertyNames);
+ static const sal_Int32 nDefaultCount = SAL_N_ELEMENTS(nEnumPropertyAttrDefaults);
+ static const sal_Int32 nDefaultFlagCount = SAL_N_ELEMENTS(nEnumPropertyAttrDefaultFlags);
+ static const sal_Int32 nMapCount = SAL_N_ELEMENTS(eEnumPropertyMaps);
OSL_ENSURE((nIdCount == nNameCount) && (nNameCount == nDefaultCount) && (nDefaultCount == nDefaultFlagCount) && (nDefaultFlagCount == nMapCount),
"OFormExport::exportAttributes: somebody tampered with the maps (3)!");
#endif