diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2013-07-14 08:15:57 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2013-07-14 08:17:20 +0900 |
commit | 542b45af44cae091735d9c2e11756a928e230261 (patch) | |
tree | 4cc217599019a29265ecbad9ab3df4aed95a5885 /sw | |
parent | 76488b00ed75bf7915d6d57af9875c6434e740d6 (diff) |
Mark as const
Change-Id: I0bf93f1293fb08b8b558fcac0cb496ed99ad13d9
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/ccoll.hxx | 2 | ||||
-rw-r--r-- | sw/inc/numrule.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/SwStyleNameMapper.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/number.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/fields/expfld.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unosett.cxx | 16 | ||||
-rw-r--r-- | sw/source/filter/html/css1atr.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/htmlatr.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/html/htmlcss1.cxx | 10 | ||||
-rw-r--r-- | sw/source/filter/html/htmlgrin.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww1/w1filter.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/styles.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/chrdlg/ccoll.cxx | 2 |
14 files changed, 30 insertions, 30 deletions
diff --git a/sw/inc/ccoll.hxx b/sw/inc/ccoll.hxx index 4aee3bb02333..23d768cf6ee9 100644 --- a/sw/inc/ccoll.hxx +++ b/sw/inc/ccoll.hxx @@ -60,7 +60,7 @@ OUString GetCommandContextByIndex( sal_Int16 nIndex ); class SW_DLLPUBLIC SwCondCollItem : public SfxPoolItem { - static CommandStruct aCmds[COND_COMMAND_COUNT]; + static const CommandStruct aCmds[COND_COMMAND_COUNT]; String sStyles[COND_COMMAND_COUNT]; diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx index 81e2f12554bb..225933a00af9 100644 --- a/sw/inc/numrule.hxx +++ b/sw/inc/numrule.hxx @@ -111,7 +111,7 @@ private: friend void _FinitCore(); static SwNumFmt* aBaseFmts [ RULE_END ][ MAXLEVEL ]; - static sal_uInt16 aDefNumIndents[ MAXLEVEL ]; + static const sal_uInt16 aDefNumIndents[ MAXLEVEL ]; /// default list level properties for position-and-space mode LABEL_ALIGNMENT static SwNumFmt* aLabelAlignmentBaseFmts [ RULE_END ][ MAXLEVEL ]; static sal_uInt16 nRefCount; diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx index e23b07029b0a..f19d04bb1595 100644 --- a/sw/source/core/doc/SwStyleNameMapper.cxx +++ b/sw/source/core/doc/SwStyleNameMapper.cxx @@ -1079,7 +1079,7 @@ const String SwStyleNameMapper::GetSpecialExtraProgName( const String& rExtraUIN String aRes = rExtraUIName; bool bChgName = false; const boost::ptr_vector<String>& rExtraArr(GetExtraUINameArray()); - static sal_uInt16 nIds[] = + static const sal_uInt16 nIds[] = { RES_POOLCOLL_LABEL_DRAWING - RES_POOLCOLL_EXTRA_BEGIN, RES_POOLCOLL_LABEL_ABB - RES_POOLCOLL_EXTRA_BEGIN, @@ -1106,7 +1106,7 @@ const String SwStyleNameMapper::GetSpecialExtraUIName( const String& rExtraProgN String aRes = rExtraProgName; bool bChgName = false; const boost::ptr_vector<String>& rExtraArr(GetExtraProgNameArray()); - static sal_uInt16 nIds[] = + static const sal_uInt16 nIds[] = { RES_POOLCOLL_LABEL_DRAWING - RES_POOLCOLL_EXTRA_BEGIN, RES_POOLCOLL_LABEL_ABB - RES_POOLCOLL_EXTRA_BEGIN, diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index 9e5be223699a..27b2cb9d1fcd 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -63,7 +63,7 @@ SwNumFmt* SwNumRule::aLabelAlignmentBaseFmts[ RULE_END ][ MAXLEVEL ] = { char sOutline[] = "Outline"; char* SwNumRule::pDefOutlineName = sOutline; -sal_uInt16 SwNumRule::aDefNumIndents[ MAXLEVEL ] = { +const sal_uInt16 SwNumRule::aDefNumIndents[ MAXLEVEL ] = { //inch: 0,5 1,0 1,5 2,0 2,5 3,0 3,5 4,0 4,5 5,0 1440/4, 1440/2, 1440*3/4, 1440, 1440*5/4, 1440*3/2, 1440*7/4, 1440*2, 1440*9/4, 1440*5/2 diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 6927a784d001..65538544b271 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -872,7 +872,7 @@ xub_StrLen SwGetExpField::GetReferenceTextPos( const SwFmtFld& rFmt, SwDoc& rDoc // now check if sNodeText starts with a non-alphanumeric character plus blanks sal_uInt16 nSrcpt = g_pBreakIt->GetRealScriptOfText( sNodeText, 0 ); - static sal_uInt16 nIds[] = + static const sal_uInt16 nIds[] = { RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE, RES_CHRATR_FONT, RES_CHRATR_FONT, diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 31dfa2ddc709..616e112cd02d 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -112,7 +112,7 @@ typedef std::vector<PropValData*> PropValDataArr; const SfxItemPropertySet* GetFootnoteSet() { - static SfxItemPropertyMapEntry aFootnoteMap_Impl[] = + static const SfxItemPropertyMapEntry aFootnoteMap_Impl[] = { { SW_PROP_NAME(UNO_NAME_ANCHOR_CHAR_STYLE_NAME),WID_ANCHOR_CHARACTER_STYLE, &::getCppuType((const OUString*)0), PROPERTY_NONE, 0}, { SW_PROP_NAME(UNO_NAME_BEGIN_NOTICE), WID_BEGIN_NOTICE, &::getCppuType((const OUString*)0), PROPERTY_NONE, 0}, @@ -128,13 +128,13 @@ const SfxItemPropertySet* GetFootnoteSet() { SW_PROP_NAME(UNO_NAME_SUFFIX), WID_SUFFIX, &::getCppuType((const OUString*)0), PROPERTY_NONE, 0}, {0,0,0,0,0,0} }; - static SfxItemPropertySet aFootnoteSet_Impl(aFootnoteMap_Impl); + static const SfxItemPropertySet aFootnoteSet_Impl(aFootnoteMap_Impl); return &aFootnoteSet_Impl; } const SfxItemPropertySet* GetEndnoteSet() { - static SfxItemPropertyMapEntry aEndnoteMap_Impl[] = + static const SfxItemPropertyMapEntry aEndnoteMap_Impl[] = { { SW_PROP_NAME(UNO_NAME_ANCHOR_CHAR_STYLE_NAME),WID_ANCHOR_CHARACTER_STYLE, &::getCppuType((const OUString*)0), PROPERTY_NONE, 0}, { SW_PROP_NAME(UNO_NAME_CHAR_STYLE_NAME), WID_CHARACTER_STYLE, &::getCppuType((const OUString*)0), PROPERTY_NONE, 0}, @@ -146,13 +146,13 @@ const SfxItemPropertySet* GetEndnoteSet() { SW_PROP_NAME(UNO_NAME_SUFFIX), WID_SUFFIX, &::getCppuType((const OUString*)0), PROPERTY_NONE, 0}, {0,0,0,0,0,0} }; - static SfxItemPropertySet aEndnoteSet_Impl(aEndnoteMap_Impl); + static const SfxItemPropertySet aEndnoteSet_Impl(aEndnoteMap_Impl); return &aEndnoteSet_Impl; } const SfxItemPropertySet* GetNumberingRulesSet() { - static SfxItemPropertyMapEntry aNumberingRulesMap_Impl[] = + static const SfxItemPropertyMapEntry aNumberingRulesMap_Impl[] = { { SW_PROP_NAME(UNO_NAME_IS_ABSOLUTE_MARGINS), WID_IS_ABS_MARGINS, &::getBooleanCppuType(), PROPERTY_NONE, 0}, { SW_PROP_NAME(UNO_NAME_IS_AUTOMATIC), WID_IS_AUTOMATIC, &::getBooleanCppuType(), PROPERTY_NONE, 0}, @@ -162,7 +162,7 @@ const SfxItemPropertySet* GetNumberingRulesSet() { SW_PROP_NAME(UNO_NAME_DEFAULT_LIST_ID), WID_DEFAULT_LIST_ID, &::getCppuType((const OUString*)0), PropertyAttribute::READONLY, 0}, {0,0,0,0,0,0} }; - static SfxItemPropertySet aNumberingRulesSet_Impl( aNumberingRulesMap_Impl ); + static const SfxItemPropertySet aNumberingRulesSet_Impl( aNumberingRulesMap_Impl ); return &aNumberingRulesSet_Impl; } @@ -179,7 +179,7 @@ const SfxItemPropertySet* GetNumberingRulesSet() const SfxItemPropertySet* GetLineNumberingSet() { - static SfxItemPropertyMapEntry aLineNumberingMap_Impl[] = + static const SfxItemPropertyMapEntry aLineNumberingMap_Impl[] = { { SW_PROP_NAME(UNO_NAME_CHAR_STYLE_NAME), WID_CHARACTER_STYLE, &::getCppuType((const OUString*)0), PROPERTY_NONE, 0}, { SW_PROP_NAME(UNO_NAME_COUNT_EMPTY_LINES), WID_COUNT_EMPTY_LINES , &::getBooleanCppuType(),PROPERTY_NONE, 0}, @@ -194,7 +194,7 @@ const SfxItemPropertySet* GetLineNumberingSet() { SW_PROP_NAME(UNO_NAME_SEPARATOR_INTERVAL), WID_SEPARATOR_INTERVAL, &::getCppuType((const sal_Int16*)0),PROPERTY_NONE, 0}, {0,0,0,0,0,0} }; - static SfxItemPropertySet aLineNumberingSet_Impl(aLineNumberingMap_Impl); + static const SfxItemPropertySet aLineNumberingSet_Impl(aLineNumberingMap_Impl); return &aLineNumberingSet_Impl; } diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 155eaa6025bc..ee28a6b19006 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -1243,7 +1243,7 @@ void SwHTMLWriter::PrepareFontList( const SvxFontItem& rFontItem, sal_Bool SwHTMLWriter::HasScriptDependentItems( const SfxItemSet& rItemSet, sal_Bool bCheckDropCap ) { - static sal_uInt16 aWhichIds[] = + static const sal_uInt16 aWhichIds[] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT, RES_CHRATR_FONTSIZE, RES_CHRATR_CJK_FONTSIZE, RES_CHRATR_CTL_FONTSIZE, diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 9032d028e387..4ef9f7fe89bc 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -317,7 +317,7 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate, { // We have to add hard attributes for any script dependent // item that is not accessed by the style - static sal_uInt16 aWhichIds[3][4] = + static const sal_uInt16 aWhichIds[3][4] = { { RES_CHRATR_FONT, RES_CHRATR_FONTSIZE, RES_CHRATR_POSTURE, RES_CHRATR_WEIGHT }, @@ -419,7 +419,7 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate, pItemSet->Put( rLang ); } - static sal_uInt16 aWhichIds[3] = + static const sal_uInt16 aWhichIds[3] = { RES_CHRATR_LANGUAGE, RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CTL_LANGUAGE }; for( sal_uInt16 i=0; i<3; i++ ) @@ -861,7 +861,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, if( rInfo.pItemSet ) { - static sal_uInt16 aWhichIds[3] = { RES_CHRATR_LANGUAGE, RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CTL_LANGUAGE }; + static const sal_uInt16 aWhichIds[3] = { RES_CHRATR_LANGUAGE, RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CTL_LANGUAGE }; for( sal_uInt16 i=0; i<3; i++ ) { diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index 3ac6243f6ad9..0706c67990ce 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -194,7 +194,7 @@ sal_Bool SwCSS1Parser::SetFmtBreak( SfxItemSet& rItemSet, static void SetCharFmtAttrs( SwCharFmt *pCharFmt, SfxItemSet& rItemSet ) { const SfxPoolItem *pItem; - static sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONTSIZE,RES_CHRATR_CJK_FONTSIZE, + static const sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONTSIZE,RES_CHRATR_CJK_FONTSIZE, RES_CHRATR_CTL_FONTSIZE }; for( sal_uInt16 i=0; i<3; i++ ) { @@ -320,7 +320,7 @@ static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet, rItemSet.Put( aULItem ); } - static sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONTSIZE,RES_CHRATR_CJK_FONTSIZE, + static const sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONTSIZE,RES_CHRATR_CJK_FONTSIZE, RES_CHRATR_CTL_FONTSIZE }; for( sal_uInt16 i=0; i<3; i++ ) { @@ -660,7 +660,7 @@ extern bool swhtml_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolI static void RemoveScriptItems( SfxItemSet& rItemSet, sal_uInt16 nScript, const SfxItemSet *pParentItemSet = 0 ) { - static sal_uInt16 aWhichIds[3][5] = + static const sal_uInt16 aWhichIds[3][5] = { { RES_CHRATR_FONT, RES_CHRATR_FONTSIZE, RES_CHRATR_LANGUAGE, RES_CHRATR_POSTURE, RES_CHRATR_WEIGHT }, @@ -2340,7 +2340,7 @@ static void lcl_swcss1_setEncoding( SwFmt& rFmt, rtl_TextEncoding eEnc ) return; const SfxItemSet& rItemSet = rFmt.GetAttrSet(); - static sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, + static const sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT }; const SfxPoolItem *pItem; for( sal_uInt16 i=0; i<3; i++ ) @@ -2366,7 +2366,7 @@ void SwCSS1Parser::SetDfltEncoding( rtl_TextEncoding eEnc ) if( bIsNewDoc ) { // Set new encoding as pool default - static sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, + static const sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT }; sal_uInt16 i; for( i=0; i<3; i++ ) diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index aa4a93351feb..fa2cad15c111 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -736,7 +736,7 @@ IMAGE_SETEVENT: { const SvxMacro *pMacro; - static sal_uInt16 aEvents[] = { + static const sal_uInt16 aEvents[] = { SFX_EVENT_MOUSEOVER_OBJECT, SFX_EVENT_MOUSECLICK_OBJECT, SFX_EVENT_MOUSEOUT_OBJECT, @@ -944,7 +944,7 @@ void SwHTMLParser::InsertBodyOptions() &aItemSet ); const SfxPoolItem *pItem; - static sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONTSIZE, + static const sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONTSIZE, RES_CHRATR_CJK_FONTSIZE, RES_CHRATR_CTL_FONTSIZE }; for( sal_uInt16 i=0; i<3; i++ ) diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx index ce1c7d0fa5fc..1162ae9d910e 100644 --- a/sw/source/filter/ww1/w1filter.cxx +++ b/sw/source/filter/ww1/w1filter.cxx @@ -1347,7 +1347,7 @@ SvxFontItem Ww1Fonts::GetFont(sal_uInt16 nFCode) aName = String( (sal_Char*)pF->szFfnGet(), RTL_TEXTENCODING_MS_1252 ); // Pitch ............................................. - static FontPitch ePitchA[] = + static const FontPitch ePitchA[] = { PITCH_DONTKNOW, PITCH_FIXED, PITCH_VARIABLE, PITCH_DONTKNOW }; @@ -1361,7 +1361,7 @@ SvxFontItem Ww1Fonts::GetFont(sal_uInt16 nFCode) eCharSet = RTL_TEXTENCODING_SYMBOL; // FontFamily ........................................ sal_uInt16 b = pF->ffGet(); - static FontFamily eFamilyA[] = + static const FontFamily eFamilyA[] = { FAMILY_DONTKNOW, FAMILY_ROMAN, FAMILY_SWISS, FAMILY_MODERN, FAMILY_SCRIPT, FAMILY_DECORATIVE diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index bb88c284d453..4e16660ca7ab 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -2988,7 +2988,7 @@ void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox ) { SAL_INFO("sw.rtf", OSL_THIS_FUNC); - static sal_uInt16 aBorders[] = { + static const sal_uInt16 aBorders[] = { BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT }; static const sal_Char* aBorderNames[] = { OOO_STRING_SVTOOLS_RTF_BRDRT, OOO_STRING_SVTOOLS_RTF_BRDRL, OOO_STRING_SVTOOLS_RTF_BRDRB, OOO_STRING_SVTOOLS_RTF_BRDRR }; diff --git a/sw/source/filter/ww8/styles.cxx b/sw/source/filter/ww8/styles.cxx index 5d1f1b1fae74..71b322d5f399 100644 --- a/sw/source/filter/ww8/styles.cxx +++ b/sw/source/filter/ww8/styles.cxx @@ -175,7 +175,7 @@ namespace ww return stiUser; else { - static sti aMapping[] = + static const sti aMapping[] = { stiNil, stiAtnRef, stiAtnText, stiToc8, stiToc7, stiToc6, stiToc5, stiToc4, stiToc3, stiToc2, stiToc1, stiIndex7, diff --git a/sw/source/ui/chrdlg/ccoll.cxx b/sw/source/ui/chrdlg/ccoll.cxx index b5c7359e318f..a12d8d5c9968 100644 --- a/sw/source/ui/chrdlg/ccoll.cxx +++ b/sw/source/ui/chrdlg/ccoll.cxx @@ -102,7 +102,7 @@ OUString GetCommandContextByIndex( sal_Int16 nIndex ) // Globals ****************************************************************** -CommandStruct SwCondCollItem::aCmds[] = +const CommandStruct SwCondCollItem::aCmds[] = { { PARA_IN_TABLEHEAD, 0 }, { PARA_IN_TABLEBODY, 0 }, |