summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2013-07-29 17:38:09 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2013-07-29 17:39:30 +0900
commit57931a7cf76a6f5b323e178d3cade25d98e12096 (patch)
treee2ef8f2fbd1de13b93388f8746238a4278706bc0
parent40c5338fdd817878d9dd6240f7f3629b413120a5 (diff)
Mark as const
Change-Id: Ib78b25641ae20a3eb23545649f08b963e34c74ff
-rw-r--r--hwpfilter/source/hcode.cxx2
-rw-r--r--hwpfilter/source/mapping.h2
-rw-r--r--i18npool/source/breakiterator/breakiteratorImpl.cxx2
-rw-r--r--i18nutil/source/utility/paper.cxx2
-rw-r--r--i18nutil/source/utility/unicode.cxx2
-rw-r--r--jvmfwk/source/fwkutil.cxx4
-rw-r--r--l10ntools/source/localize.cxx2
-rw-r--r--oox/source/export/drawingml.cxx2
-rw-r--r--oox/source/vml/vmlshape.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlHelper.cxx14
-rw-r--r--reportdesign/source/filter/xml/xmlfilter.cxx22
-rw-r--r--reportdesign/source/ui/misc/UITools.cxx2
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx6
14 files changed, 33 insertions, 33 deletions
diff --git a/hwpfilter/source/hcode.cxx b/hwpfilter/source/hcode.cxx
index 396008cbe82e..accf2aa4997c 100644
--- a/hwpfilter/source/hcode.cxx
+++ b/hwpfilter/source/hcode.cxx
@@ -388,7 +388,7 @@ static unsigned hhtg_tg[] =
// ?
static char LineCharDir(hchar ch)
{
- static char index2dir[] = { 10, 11, 9, 14, 15, 13, 6, 7, 5, 3, 12 };
+ static const char index2dir[] = { 10, 11, 9, 14, 15, 13, 6, 7, 5, 3, 12 };
return (LINEBASE <= ch && ch < LINEBASE + 11 * 7) ?
index2dir[(ch - LINEBASE) % 11] : 0;
diff --git a/hwpfilter/source/mapping.h b/hwpfilter/source/mapping.h
index e7f6c3285fbc..48ee0b081e92 100644
--- a/hwpfilter/source/mapping.h
+++ b/hwpfilter/source/mapping.h
@@ -363,7 +363,7 @@ const struct FormulaEntry FormulaMapTab[] = {
#ifndef DEBUG
hchar_string getMathMLEntity(const char *tex)
{
- static size_t tabSize = sizeof(FormulaMapTab) / sizeof(FormulaMapTab[0]);
+ static const size_t tabSize = sizeof(FormulaMapTab) / sizeof(FormulaMapTab[0]);
hchar_string buf;
for (size_t i = 0 ; i < tabSize ; i++) {
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index 55b0315d9728..595c921d46b5 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -448,7 +448,7 @@ namespace
sal_Int16 script;
};
- static UBlock2Script scriptList[] =
+ static const UBlock2Script scriptList[] =
{
{UBLOCK_NO_BLOCK, UBLOCK_NO_BLOCK, ScriptType::WEAK},
{UBLOCK_BASIC_LATIN, UBLOCK_ARMENIAN, ScriptType::LATIN},
diff --git a/i18nutil/source/utility/paper.cxx b/i18nutil/source/utility/paper.cxx
index 5199b0712eea..372990b5fe6b 100644
--- a/i18nutil/source/utility/paper.cxx
+++ b/i18nutil/source/utility/paper.cxx
@@ -235,7 +235,7 @@ PaperInfo PaperInfo::getSystemDefaultPaper()
{
OString aPaper(pBuffer);
aPaper = aPaper.trim();
- static struct { const char *pName; Paper ePaper; } aCustoms [] =
+ static const struct { const char *pName; Paper ePaper; } aCustoms [] =
{
{ "B0", PAPER_B0_ISO },
{ "B1", PAPER_B1_ISO },
diff --git a/i18nutil/source/utility/unicode.cxx b/i18nutil/source/utility/unicode.cxx
index b46a7f61b2c0..dcefa791f274 100644
--- a/i18nutil/source/utility/unicode.cxx
+++ b/i18nutil/source/utility/unicode.cxx
@@ -392,7 +392,7 @@ sal_Bool SAL_CALL unicode::isWhiteSpace( const sal_Unicode ch) {
sal_Int16 SAL_CALL unicode::getScriptClassFromUScriptCode(UScriptCode eScript)
{
//See unicode/uscript.h
- static sal_Int16 scriptTypes[] =
+ static const sal_Int16 scriptTypes[] =
{
ScriptType::WEAK, ScriptType::WEAK, ScriptType::COMPLEX, ScriptType::LATIN, ScriptType::COMPLEX,
ScriptType::ASIAN, ScriptType::LATIN, ScriptType::LATIN, ScriptType::LATIN, ScriptType::COMPLEX,
diff --git a/jvmfwk/source/fwkutil.cxx b/jvmfwk/source/fwkutil.cxx
index 36007eda93fd..299869526d09 100644
--- a/jvmfwk/source/fwkutil.cxx
+++ b/jvmfwk/source/fwkutil.cxx
@@ -123,7 +123,7 @@ bool isAccessibilitySupportDesired()
rtl::ByteSequence encodeBase16(const rtl::ByteSequence& rawData)
{
- static char EncodingTable[] =
+ static const char EncodingTable[] =
{'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
sal_Int32 lenRaw = rawData.getLength();
char* pBuf = new char[lenRaw * 2];
@@ -152,7 +152,7 @@ rtl::ByteSequence encodeBase16(const rtl::ByteSequence& rawData)
rtl::ByteSequence decodeBase16(const rtl::ByteSequence& data)
{
- static char decodingTable[] =
+ static const char decodingTable[] =
{'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
sal_Int32 lenData = data.getLength();
sal_Int32 lenBuf = lenData / 2; //always divisable by two
diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 8b93ec9d36dd..4828bccfbdd4 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -287,7 +287,7 @@ void handleFilesOfDir(
}
bool includeProject(const OString& rProject) {
- static OString projects[] = {
+ static const OString projects[] = {
"accessibility",
"android",
"avmedia",
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 0232d07d1397..7d08cabed790 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -896,7 +896,7 @@ const char* DrawingML::GetFieldType( ::com::sun::star::uno::Reference< ::com::su
void DrawingML::GetUUID( OStringBuffer& rBuffer )
{
Sequence< sal_uInt8 > aSeq( 16 );
- static char cDigits[17] = "0123456789ABCDEF";
+ static const char cDigits[17] = "0123456789ABCDEF";
rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True );
int i;
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index bcf93b6bf3c0..405c6686457f 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -403,7 +403,7 @@ void ShapeBase::convertShapeProperties( const Reference< XShape >& rxShape ) con
if (aPropMap.hasProperty(PROP_LineColor))
{
uno::Reference<beans::XPropertySet> xPropertySet(rxShape, uno::UNO_QUERY);
- static sal_Int32 aBorders[] = {
+ static const sal_Int32 aBorders[] = {
PROP_TopBorder, PROP_LeftBorder, PROP_BottomBorder, PROP_RightBorder
};
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aBorders); ++i)
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index d6f917ab23e2..f98ab74f9b23 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -152,7 +152,7 @@ void SAL_CALL ExportDocumentHandler::startElement(const OUString & _sName, const
SvXMLAttributeList* pList = new SvXMLAttributeList();
uno::Reference< xml::sax::XAttributeList > xNewAttribs = pList;
OUStringBuffer sValue;
- static SvXMLEnumMapEntry aXML_CommnadTypeEnumMap[] =
+ static const SvXMLEnumMapEntry aXML_CommnadTypeEnumMap[] =
{
{ XML_TABLE, sdb::CommandType::TABLE },
{ XML_QUERY, sdb::CommandType::QUERY },
diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx b/reportdesign/source/filter/xml/xmlHelper.cxx
index 21a0bc92397e..30830c5501ba 100644
--- a/reportdesign/source/filter/xml/xmlHelper.cxx
+++ b/reportdesign/source/filter/xml/xmlHelper.cxx
@@ -190,7 +190,7 @@ const XMLPropertyMapEntry* OXMLHelper::GetColumnStyleProps()
// -----------------------------------------------------------------------------
const SvXMLEnumMapEntry* OXMLHelper::GetReportPrintOptions()
{
- static SvXMLEnumMapEntry s_aXML_EnumMap[] =
+ static const SvXMLEnumMapEntry s_aXML_EnumMap[] =
{
{ XML_NOT_WITH_REPORT_HEADER, report::ReportPrintOption::NOT_WITH_REPORT_HEADER },
{ XML_NOT_WITH_REPORT_FOOTER, report::ReportPrintOption::NOT_WITH_REPORT_FOOTER },
@@ -202,7 +202,7 @@ const SvXMLEnumMapEntry* OXMLHelper::GetReportPrintOptions()
// -----------------------------------------------------------------------------
const SvXMLEnumMapEntry* OXMLHelper::GetForceNewPageOptions()
{
- static SvXMLEnumMapEntry s_aXML_EnumMap[] =
+ static const SvXMLEnumMapEntry s_aXML_EnumMap[] =
{
{ XML_BEFORE_SECTION, report::ForceNewPage::BEFORE_SECTION },
{ XML_AFTER_SECTION, report::ForceNewPage::AFTER_SECTION },
@@ -214,7 +214,7 @@ const SvXMLEnumMapEntry* OXMLHelper::GetForceNewPageOptions()
// -----------------------------------------------------------------------------
const SvXMLEnumMapEntry* OXMLHelper::GetKeepTogetherOptions()
{
- static SvXMLEnumMapEntry s_aXML_EnumMap[] =
+ static const SvXMLEnumMapEntry s_aXML_EnumMap[] =
{
{ XML_WHOLE_GROUP, report::KeepTogether::WHOLE_GROUP },
{ XML_WITH_FIRST_DETAIL, report::KeepTogether::WITH_FIRST_DETAIL },
@@ -225,7 +225,7 @@ const SvXMLEnumMapEntry* OXMLHelper::GetKeepTogetherOptions()
// -----------------------------------------------------------------------------
const SvXMLEnumMapEntry* OXMLHelper::GetCommandTypeOptions()
{
- static SvXMLEnumMapEntry s_aXML_EnumMap[] =
+ static const SvXMLEnumMapEntry s_aXML_EnumMap[] =
{
{ XML_TABLE, CommandType::TABLE },
{ XML_QUERY, CommandType::QUERY },
@@ -334,7 +334,7 @@ uno::Reference<beans::XPropertySet> OXMLHelper::createBorderPropertySet()
// -----------------------------------------------------------------------------
SvXMLTokenMap* OXMLHelper::GetReportElemTokenMap()
{
- static SvXMLTokenMapEntry aElemTokenMap[]=
+ static const SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_REPORT, XML_REPORT_HEADER, XML_TOK_REPORT_HEADER },
{ XML_NAMESPACE_REPORT, XML_PAGE_HEADER , XML_TOK_PAGE_HEADER },
@@ -361,7 +361,7 @@ SvXMLTokenMap* OXMLHelper::GetReportElemTokenMap()
// -----------------------------------------------------------------------------
SvXMLTokenMap* OXMLHelper::GetSubDocumentElemTokenMap()
{
- static SvXMLTokenMapEntry aElemTokenMap[]=
+ static const SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_REPORT, XML_MASTER_DETAIL_FIELD, XML_TOK_MASTER_DETAIL_FIELD},
{ XML_NAMESPACE_REPORT, XML_MASTER, XML_TOK_MASTER},
@@ -373,7 +373,7 @@ SvXMLTokenMap* OXMLHelper::GetSubDocumentElemTokenMap()
// -----------------------------------------------------------------------------
const SvXMLEnumMapEntry* OXMLHelper::GetImageScaleOptions()
{
- static SvXMLEnumMapEntry s_aXML_EnumMap[] =
+ static const SvXMLEnumMapEntry s_aXML_EnumMap[] =
{
{ XML_ISOTROPIC, awt::ImageScaleMode::ISOTROPIC },
{ XML_ANISOTROPIC, awt::ImageScaleMode::ANISOTROPIC },
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index fd9723d59423..819ee644284f 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -717,7 +717,7 @@ const SvXMLTokenMap& ORptFilter::GetDocElemTokenMap() const
{
if ( !m_pDocElemTokenMap.get() )
{
- static SvXMLTokenMapEntry aElemTokenMap[]=
+ static const SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_OFFICE, XML_SETTINGS, XML_TOK_DOC_SETTINGS },
{ XML_NAMESPACE_OFFICE, XML_STYLES, XML_TOK_DOC_STYLES },
@@ -752,7 +752,7 @@ const SvXMLTokenMap& ORptFilter::GetFunctionElemTokenMap() const
{
if ( !m_pFunctionElemTokenMap.get() )
{
- static SvXMLTokenMapEntry aElemTokenMap[]=
+ static const SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_REPORT, XML_NAME, XML_TOK_FUNCTION_NAME },
{ XML_NAMESPACE_REPORT, XML_FORMULA, XML_TOK_FUNCTION_FORMULA},
@@ -770,7 +770,7 @@ const SvXMLTokenMap& ORptFilter::GetFormatElemTokenMap() const
{
if ( !m_pFormatElemTokenMap.get() )
{
- static SvXMLTokenMapEntry aElemTokenMap[]=
+ static const SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_REPORT, XML_ENABLED , XML_TOK_ENABLED },
{ XML_NAMESPACE_REPORT, XML_FORMULA , XML_TOK_FORMULA },
@@ -786,7 +786,7 @@ const SvXMLTokenMap& ORptFilter::GetGroupElemTokenMap() const
{
if ( !m_pGroupElemTokenMap.get() )
{
- static SvXMLTokenMapEntry aElemTokenMap[]=
+ static const SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_REPORT, XML_START_NEW_COLUMN , XML_TOK_START_NEW_COLUMN },
{ XML_NAMESPACE_REPORT, XML_RESET_PAGE_NUMBER , XML_TOK_RESET_PAGE_NUMBER },
@@ -812,7 +812,7 @@ const SvXMLTokenMap& ORptFilter::GetReportElementElemTokenMap() const
{
if ( !m_pElemTokenMap.get() )
{
- static SvXMLTokenMapEntry aElemTokenMap[]=
+ static const SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_REPORT, XML_PRINT_REPEATED_VALUES ,XML_TOK_PRINT_REPEATED_VALUES },
{ XML_NAMESPACE_REPORT, XML_PRINT_WHEN_GROUP_CHANGE ,XML_TOK_PRINT_WHEN_GROUP_CHANGE },
@@ -830,7 +830,7 @@ const SvXMLTokenMap& ORptFilter::GetControlElemTokenMap() const
{
if ( !m_pControlElemTokenMap.get() )
{
- static SvXMLTokenMapEntry aElemTokenMap[]=
+ static const SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_FORM, XML_LABEL ,XML_TOK_LABEL },
{ XML_NAMESPACE_FORM, XML_PROPERTIES ,XML_TOK_PROPERTIES },
@@ -852,7 +852,7 @@ const SvXMLTokenMap& ORptFilter::GetControlPropertyElemTokenMap() const
{
if ( !m_pControlElemTokenMap.get() )
{
- static SvXMLTokenMapEntry aElemTokenMap[]=
+ static const SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_FORM, XML_PROPERTY_NAME ,XML_TOK_PROPERTY_NAME },
{ XML_NAMESPACE_OOO, XML_VALUE_TYPE ,XML_TOK_VALUE_TYPE },
@@ -874,7 +874,7 @@ const SvXMLTokenMap& ORptFilter::GetComponentElemTokenMap() const
{
if ( !m_pComponentElemTokenMap.get() )
{
- static SvXMLTokenMapEntry aElemTokenMap[]=
+ static const SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_DRAW, XML_NAME , XML_TOK_NAME },
{ XML_NAMESPACE_DRAW, XML_TEXT_STYLE_NAME , XML_TOK_TEXT_STYLE_NAME },
@@ -890,7 +890,7 @@ const SvXMLTokenMap& ORptFilter::GetColumnTokenMap() const
{
if ( !m_pColumnTokenMap.get() )
{
- static SvXMLTokenMapEntry aElemTokenMap[]=
+ static const SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_TABLE, XML_NAME , XML_TOK_NAME },
{ XML_NAMESPACE_TABLE, XML_STYLE_NAME , XML_TOK_COLUMN_STYLE_NAME },
@@ -914,7 +914,7 @@ const SvXMLTokenMap& ORptFilter::GetSectionElemTokenMap() const
{
if ( !m_pSectionElemTokenMap.get() )
{
- static SvXMLTokenMapEntry aElemTokenMap[]=
+ static const SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_TABLE, XML_TABLE , XML_TOK_TABLE },
{ XML_NAMESPACE_TABLE, XML_NAME , XML_TOK_SECTION_NAME },
@@ -937,7 +937,7 @@ const SvXMLTokenMap& ORptFilter::GetCellElemTokenMap() const
{
if ( !m_pCellElemTokenMap.get() )
{
- static SvXMLTokenMapEntry aElemTokenMap[]=
+ static const SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_TEXT, XML_P , XML_TOK_P },
{ XML_NAMESPACE_REPORT, XML_FIXED_CONTENT , XML_TOK_FIXED_CONTENT },
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index 725d3f9ff5cd..e96fb0bf9943 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -698,7 +698,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep
OSL_ASSERT((sizeof(pDefaults)/sizeof(pDefaults[0])) == (sizeof(aItemInfos)/sizeof(aItemInfos[0])));
- static sal_uInt16 pRanges[] =
+ static const sal_uInt16 pRanges[] =
{
ITEMID_FONT,ITEMID_WEIGHT_COMPLEX,
0
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 0785f0e7ab1a..7741b491b78a 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2403,7 +2403,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
new SfxUInt16Item(RPTUI_ID_METRIC,static_cast<sal_uInt16>(eUserMetric))
};
- static sal_uInt16 pRanges[] =
+ static const sal_uInt16 pRanges[] =
{
RPTUI_ID_LRSPACE,RPTUI_ID_BRUSH,
SID_ATTR_METRIC,SID_ATTR_METRIC,
@@ -4063,7 +4063,7 @@ OUString SAL_CALL OReportController::getMode( ) throw (::com::sun::star::uno::R
}
::com::sun::star::uno::Sequence< OUString > SAL_CALL OReportController::getSupportedModes( ) throw (::com::sun::star::uno::RuntimeException)
{
- static OUString s_sModes[] = { OUString("remote"),
+ static const OUString s_sModes[] = { OUString("remote"),
OUString("normal") };
return uno::Sequence< OUString> (&s_sModes[0],sizeof(s_sModes)/sizeof(s_sModes[0]));
}
@@ -4215,7 +4215,7 @@ void OReportController::openZoomDialog()
{
new SvxZoomItem()
};
- static sal_uInt16 pRanges[] =
+ static const sal_uInt16 pRanges[] =
{
SID_ATTR_ZOOM,SID_ATTR_ZOOM,
0