diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2013-07-18 22:16:42 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2013-07-18 22:18:25 +0900 |
commit | a2e599f16ba253c706aa84d0a17f2936f78c3892 (patch) | |
tree | 11c78b5b134392de9f27dc6f0d3ff8adb3a557f3 /xmloff/source/forms | |
parent | 90e3d0fef329917218ffb121179e06ab73ff01a5 (diff) |
Mark as static and/or const
Change-Id: I45a890bb793a6d92546c05bd75738d4dd753a01e
Diffstat (limited to 'xmloff/source/forms')
-rw-r--r-- | xmloff/source/forms/elementexport.cxx | 72 | ||||
-rw-r--r-- | xmloff/source/forms/formenums.cxx | 34 |
2 files changed, 53 insertions, 53 deletions
diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index ca2834822586..d4eeda78af6f 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -566,12 +566,12 @@ namespace xmloff // some string properties { // the attribute ids of all properties which are expected to be of type string - static sal_Int32 nStringPropertyAttributeIds[] = + static const sal_Int32 nStringPropertyAttributeIds[] = { CCA_LABEL, CCA_TITLE }; // the names of all properties which are expected to be of type string - static OUString aStringPropertyNames[] = + static const OUString aStringPropertyNames[] = { OUString(PROPERTY_LABEL), OUString(PROPERTY_TITLE) }; @@ -597,7 +597,7 @@ namespace xmloff // -------------------------------------------------------------------- // some boolean properties { - static sal_Int32 nBooleanPropertyAttributeIds[] = + static const sal_Int32 nBooleanPropertyAttributeIds[] = { // attribute flags CCA_CURRENT_SELECTED, CCA_DISABLED, CCA_DROPDOWN, CCA_PRINTABLE, CCA_READONLY, CCA_SELECTED, CCA_TAB_STOP, CCA_ENABLEVISIBLE }; @@ -608,14 +608,14 @@ namespace xmloff OUString(PROPERTY_READONLY), OUString(PROPERTY_DEFAULT_STATE), OUString(PROPERTY_TABSTOP), OUString(PROPERTY_ENABLEVISIBLE) }; - static sal_Bool nBooleanPropertyAttrFlags[] = + static const sal_Bool nBooleanPropertyAttrFlags[] = { // attribute defaults 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 - sal_Int32 nIdCount = sizeof(nBooleanPropertyAttributeIds) / sizeof(nBooleanPropertyAttributeIds[0]); - sal_Int32 nNameCount = sizeof(pBooleanPropertyNames) / sizeof(pBooleanPropertyNames[0]); - sal_Int32 nFlagsCount = sizeof(nBooleanPropertyAttrFlags) / sizeof(nBooleanPropertyAttrFlags[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]); OSL_ENSURE((nIdCount == nNameCount) && (nNameCount == nFlagsCount), "OControlExport::exportCommonControlAttributes: somebody tampered with the maps (2)!"); #endif @@ -656,9 +656,9 @@ namespace xmloff exportedProperty(PROPERTY_MAXTEXTLENGTH); #if OSL_DEBUG_LEVEL > 0 - sal_Int32 nIdCount = sizeof(nIntegerPropertyAttributeIds) / sizeof(nIntegerPropertyAttributeIds[0]); - sal_Int32 nNameCount = sizeof(pIntegerPropertyNames) / sizeof(pIntegerPropertyNames[0]); - sal_Int32 nDefaultCount = sizeof(nIntegerPropertyAttrDefaults) / sizeof(nIntegerPropertyAttrDefaults[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]); OSL_ENSURE((nIdCount == nNameCount) && (nNameCount == nDefaultCount), "OControlExport::exportCommonControlAttributes: somebody tampered with the maps (3)!"); #endif @@ -1013,9 +1013,9 @@ namespace xmloff OUString(PROPERTY_DEFAULTBUTTON), OUString(PROPERTY_TRISTATE), OUString(PROPERTY_TOGGLE), OUString(PROPERTY_FOCUS_ON_CLICK) }; - sal_Int32 nIdCount = sizeof(nBooleanPropertyAttributeIds) / sizeof(nBooleanPropertyAttributeIds[0]); + static const sal_Int32 nIdCount = sizeof(nBooleanPropertyAttributeIds) / sizeof(nBooleanPropertyAttributeIds[0]); #if OSL_DEBUG_LEVEL > 0 - sal_Int32 nNameCount = sizeof(pBooleanPropertyNames) / sizeof(pBooleanPropertyNames[0]); + static const sal_Int32 nNameCount = sizeof(pBooleanPropertyNames) / sizeof(pBooleanPropertyNames[0]); OSL_ENSURE((nIdCount == nNameCount), "OControlExport::exportSpecialAttributes: somebody tampered with the maps (1)!"); #endif @@ -1053,12 +1053,12 @@ namespace xmloff 10 }; - sal_Int32 nIdCount = sizeof( nIntegerPropertyAttributeIds ) / sizeof( nIntegerPropertyAttributeIds[0] ); + static const sal_Int32 nIdCount = sizeof( nIntegerPropertyAttributeIds ) / sizeof( nIntegerPropertyAttributeIds[0] ); #if OSL_DEBUG_LEVEL > 0 - sal_Int32 nNameCount = sizeof( pIntegerPropertyNames ) / sizeof( pIntegerPropertyNames[0] ); + static const sal_Int32 nNameCount = sizeof( pIntegerPropertyNames ) / sizeof( pIntegerPropertyNames[0] ); OSL_ENSURE( ( nIdCount == nNameCount ), "OControlExport::exportSpecialAttributes: somebody tampered with the maps (2)!" ); - sal_Int32 nDefaultCount = sizeof( nIntegerPropertyAttrDefaults ) / sizeof( nIntegerPropertyAttrDefaults[0] ); + static const sal_Int32 nDefaultCount = sizeof( nIntegerPropertyAttrDefaults ) / sizeof( nIntegerPropertyAttrDefaults[0] ); OSL_ENSURE( ( nIdCount == nDefaultCount ), "OControlExport::exportSpecialAttributes: somebody tampered with the maps (3)!" ); #endif @@ -1195,7 +1195,7 @@ namespace xmloff // ---------------------------------- // the string properties { - static sal_Int32 nStringPropertyAttributeIds[] = + static const sal_Int32 nStringPropertyAttributeIds[] = { // attribute flags SCA_GROUP_NAME }; @@ -1204,9 +1204,9 @@ namespace xmloff OUString(PROPERTY_GROUP_NAME) }; - sal_Int32 nIdCount = sizeof( nStringPropertyAttributeIds ) / sizeof( nStringPropertyAttributeIds[0] ); + static const sal_Int32 nIdCount = sizeof( nStringPropertyAttributeIds ) / sizeof( nStringPropertyAttributeIds[0] ); #if OSL_DEBUG_LEVEL > 0 - sal_Int32 nNameCount = sizeof( pStringPropertyNames ) / sizeof( pStringPropertyNames[0] ); + static const sal_Int32 nNameCount = sizeof( pStringPropertyNames ) / sizeof( pStringPropertyNames[0] ); OSL_ENSURE( ( nIdCount == nNameCount ), "OControlExport::exportSpecialAttributes: somebody tampered with the maps (2)!" ); #endif @@ -2160,17 +2160,17 @@ namespace xmloff // --------------------- // the string properties { - static FormAttributes eStringPropertyIds[] = + static const FormAttributes eStringPropertyIds[] = { faName, /*faAction,*/ faCommand, faFilter, faOrder }; - static OUString aStringPropertyNames[] = + static const OUString aStringPropertyNames[] = { OUString(PROPERTY_NAME), /*OUString(PROPERTY_TARGETURL),*/ OUString(PROPERTY_COMMAND), OUString(PROPERTY_FILTER), OUString(PROPERTY_ORDER) }; - sal_Int32 nIdCount = sizeof(eStringPropertyIds) / sizeof(eStringPropertyIds[0]); + static const sal_Int32 nIdCount = sizeof(eStringPropertyIds) / sizeof(eStringPropertyIds[0]); #if OSL_DEBUG_LEVEL > 0 - sal_Int32 nNameCount = sizeof(aStringPropertyNames) / sizeof(aStringPropertyNames[0]); + static const sal_Int32 nNameCount = sizeof(aStringPropertyNames) / sizeof(aStringPropertyNames[0]); OSL_ENSURE((nIdCount == nNameCount), "OFormExport::exportAttributes: somebody tampered with the maps (1)!"); #endif @@ -2204,7 +2204,7 @@ namespace xmloff // the boolean properties { - static FormAttributes eBooleanPropertyIds[] = + static const FormAttributes eBooleanPropertyIds[] = { faAllowDeletes, faAllowInserts, faAllowUpdates, faApplyFilter, faEscapeProcessing, faIgnoreResult }; @@ -2217,14 +2217,14 @@ namespace xmloff OUString(PROPERTY_ESCAPEPROCESSING), OUString(PROPERTY_IGNORERESULT) }; - static sal_Int8 nBooleanPropertyAttrFlags[] = + static const sal_Int8 nBooleanPropertyAttrFlags[] = { BOOLATTR_DEFAULT_TRUE, BOOLATTR_DEFAULT_TRUE, BOOLATTR_DEFAULT_TRUE, BOOLATTR_DEFAULT_FALSE, BOOLATTR_DEFAULT_TRUE, BOOLATTR_DEFAULT_FALSE }; - sal_Int32 nIdCount = sizeof(eBooleanPropertyIds) / sizeof(eBooleanPropertyIds[0]); + static const sal_Int32 nIdCount = sizeof(eBooleanPropertyIds) / sizeof(eBooleanPropertyIds[0]); #if OSL_DEBUG_LEVEL > 0 - sal_Int32 nNameCount = sizeof(pBooleanPropertyNames) / sizeof(pBooleanPropertyNames[0]); - sal_Int32 nFlagsCount = sizeof(nBooleanPropertyAttrFlags) / sizeof(nBooleanPropertyAttrFlags[0]); + static const sal_Int32 nNameCount = sizeof(pBooleanPropertyNames) / sizeof(pBooleanPropertyNames[0]); + static const sal_Int32 nFlagsCount = sizeof(nBooleanPropertyAttrFlags) / sizeof(nBooleanPropertyAttrFlags[0]); OSL_ENSURE((nIdCount == nNameCount) && (nNameCount == nFlagsCount), "OFormExport::exportAttributes: somebody tampered with the maps (2)!"); #endif @@ -2239,7 +2239,7 @@ namespace xmloff // the enum properties { - static FormAttributes eEnumPropertyIds[] = + static const FormAttributes eEnumPropertyIds[] = { faEnctype, faMethod, faCommandType, faNavigationMode, faTabbingCycle }; @@ -2247,24 +2247,24 @@ namespace xmloff { OUString(PROPERTY_SUBMIT_ENCODING), OUString(PROPERTY_SUBMIT_METHOD), OUString(PROPERTY_COMMAND_TYPE), OUString(PROPERTY_NAVIGATION), OUString(PROPERTY_CYCLE) }; - static OEnumMapper::EnumProperties eEnumPropertyMaps[] = + static const OEnumMapper::EnumProperties eEnumPropertyMaps[] = { OEnumMapper::epSubmitEncoding, OEnumMapper::epSubmitMethod, OEnumMapper::epCommandType, OEnumMapper::epNavigationType, OEnumMapper::epTabCyle }; - static sal_Int32 nEnumPropertyAttrDefaults[] = + static const sal_Int32 nEnumPropertyAttrDefaults[] = { FormSubmitEncoding_URL, FormSubmitMethod_GET, CommandType::COMMAND, NavigationBarMode_CURRENT, TabulatorCycle_RECORDS }; - static sal_Bool nEnumPropertyAttrDefaultFlags[] = + static const sal_Bool nEnumPropertyAttrDefaultFlags[] = { sal_False, sal_False, sal_False, sal_False, sal_True }; - sal_Int32 nIdCount = sizeof(eEnumPropertyIds) / sizeof(eEnumPropertyIds[0]); + static const sal_Int32 nIdCount = sizeof(eEnumPropertyIds) / sizeof(eEnumPropertyIds[0]); #if OSL_DEBUG_LEVEL > 0 - sal_Int32 nNameCount = sizeof(pEnumPropertyNames) / sizeof(pEnumPropertyNames[0]); - sal_Int32 nDefaultCount = sizeof(nEnumPropertyAttrDefaults) / sizeof(nEnumPropertyAttrDefaults[0]); - sal_Int32 nDefaultFlagCount = sizeof(nEnumPropertyAttrDefaultFlags) / sizeof(nEnumPropertyAttrDefaultFlags[0]); - sal_Int32 nMapCount = sizeof(eEnumPropertyMaps) / sizeof(eEnumPropertyMaps[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]); OSL_ENSURE((nIdCount == nNameCount) && (nNameCount == nDefaultCount) && (nDefaultCount == nDefaultFlagCount) && (nDefaultFlagCount == nMapCount), "OFormExport::exportAttributes: somebody tampered with the maps (3)!"); #endif diff --git a/xmloff/source/forms/formenums.cxx b/xmloff/source/forms/formenums.cxx index 84b15ab61804..58c9b2842025 100644 --- a/xmloff/source/forms/formenums.cxx +++ b/xmloff/source/forms/formenums.cxx @@ -80,7 +80,7 @@ namespace xmloff // FormSubmitEncoding case epSubmitEncoding: { - static SvXMLEnumMapEntry aSubmitEncodingMap[] = + static const SvXMLEnumMapEntry aSubmitEncodingMap[] = { { XML_APPLICATION_X_WWW_FORM_URLENCODED, FormSubmitEncoding_URL }, { XML_MULTIPART_FORMDATA, FormSubmitEncoding_MULTIPART }, @@ -93,7 +93,7 @@ namespace xmloff // FormSubmitMethod case epSubmitMethod: { - static SvXMLEnumMapEntry aSubmitMethodMap[] = + static const SvXMLEnumMapEntry aSubmitMethodMap[] = { { XML_GET, FormSubmitMethod_GET }, { XML_POST, FormSubmitMethod_POST }, @@ -105,7 +105,7 @@ namespace xmloff // CommandType case epCommandType: { - static SvXMLEnumMapEntry aCommandTypeMap[] = + static const SvXMLEnumMapEntry aCommandTypeMap[] = { { XML_TABLE, CommandType::TABLE }, { XML_QUERY, CommandType::QUERY }, @@ -118,7 +118,7 @@ namespace xmloff // NavigationBarMode case epNavigationType: { - static SvXMLEnumMapEntry aNavigationTypeMap[] = + static const SvXMLEnumMapEntry aNavigationTypeMap[] = { { XML_NONE, NavigationBarMode_NONE }, { XML_CURRENT, NavigationBarMode_CURRENT }, @@ -131,7 +131,7 @@ namespace xmloff // TabulatorCycle case epTabCyle: { - static SvXMLEnumMapEntry aTabulytorCycleMap[] = + static const SvXMLEnumMapEntry aTabulytorCycleMap[] = { { XML_RECORDS, TabulatorCycle_RECORDS }, { XML_CURRENT, TabulatorCycle_CURRENT }, @@ -144,7 +144,7 @@ namespace xmloff // FormButtonType case epButtonType: { - static SvXMLEnumMapEntry aFormButtonTypeMap[] = + static const SvXMLEnumMapEntry aFormButtonTypeMap[] = { { XML_PUSH, FormButtonType_PUSH }, { XML_SUBMIT, FormButtonType_SUBMIT }, @@ -158,7 +158,7 @@ namespace xmloff // ListSourceType case epListSourceType: { - static SvXMLEnumMapEntry aListSourceTypeMap[] = + static const SvXMLEnumMapEntry aListSourceTypeMap[] = { { XML_VALUE_LIST, ListSourceType_VALUELIST }, { XML_TABLE, ListSourceType_TABLE }, @@ -174,7 +174,7 @@ namespace xmloff // check state of a checkbox case epCheckState: { - static SvXMLEnumMapEntry aCheckStateMap[] = + static const SvXMLEnumMapEntry aCheckStateMap[] = { { XML_UNCHECKED, STATE_NOCHECK }, { XML_CHECKED, STATE_CHECK }, @@ -186,7 +186,7 @@ namespace xmloff break; case epTextAlign: { - static SvXMLEnumMapEntry aTextAlignMap[] = + static const SvXMLEnumMapEntry aTextAlignMap[] = { { XML_START, awt::TextAlign::LEFT }, { XML_CENTER, awt::TextAlign::CENTER }, @@ -200,7 +200,7 @@ namespace xmloff break; case epBorderWidth: { - static SvXMLEnumMapEntry aBorderTypeMap[] = + static const SvXMLEnumMapEntry aBorderTypeMap[] = { { XML_NONE, 0 }, { XML_HIDDEN, 0 }, @@ -220,7 +220,7 @@ namespace xmloff case epFontEmphasis: { - static SvXMLEnumMapEntry aFontEmphasisMap[] = + static const SvXMLEnumMapEntry aFontEmphasisMap[] = { { XML_NONE, awt::FontEmphasisMark::NONE }, { XML_DOT, awt::FontEmphasisMark::DOT }, @@ -235,7 +235,7 @@ namespace xmloff case epFontRelief: { - static SvXMLEnumMapEntry aFontReliefMap[] = + static const SvXMLEnumMapEntry aFontReliefMap[] = { { XML_NONE, FontRelief::NONE }, { XML_ENGRAVED, FontRelief::ENGRAVED }, @@ -248,7 +248,7 @@ namespace xmloff case epListLinkageType: { - static SvXMLEnumMapEntry aListLinkageMap[] = + static const SvXMLEnumMapEntry aListLinkageMap[] = { { XML_SELECTION, 0 }, { XML_SELECTION_INDEXES, 1 }, @@ -260,7 +260,7 @@ namespace xmloff case epOrientation: { - static SvXMLEnumMapEntry aOrientationMap[] = + static const SvXMLEnumMapEntry aOrientationMap[] = { { XML_HORIZONTAL, ScrollBarOrientation::HORIZONTAL }, { XML_VERTICAL, ScrollBarOrientation::VERTICAL }, @@ -272,7 +272,7 @@ namespace xmloff case epVisualEffect: { - static SvXMLEnumMapEntry aVisualEffectMap[] = + static const SvXMLEnumMapEntry aVisualEffectMap[] = { { XML_NONE, VisualEffect::NONE }, { XML_3D, VisualEffect::LOOK3D }, @@ -285,7 +285,7 @@ namespace xmloff case epImagePosition: { - static SvXMLEnumMapEntry aImagePositionMap[] = + static const SvXMLEnumMapEntry aImagePositionMap[] = { { XML_START, 0 }, { XML_END, 1 }, @@ -300,7 +300,7 @@ namespace xmloff case epImageAlign: { - static SvXMLEnumMapEntry aImageAlignMap[] = + static const SvXMLEnumMapEntry aImageAlignMap[] = { { XML_START, 0 }, { XML_CENTER, 1 }, |