summaryrefslogtreecommitdiff
path: root/i18nutil/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-17 15:28:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-18 08:04:47 +0200
commit1aafe4950c04024907076e1420ddfd02181eb278 (patch)
tree2d014582c2a5ddd5139808f20eb70fa2817f75fe /i18nutil/source
parent6626281b4a123cfb5e2c8f449b55f4acd46ee198 (diff)
loplugin:staticvar in hwpfilter..sal
Change-Id: I8bf3509637cb295847e0dd667c1862269a192bbe Reviewed-on: https://gerrit.libreoffice.org/61881 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18nutil/source')
-rw-r--r--i18nutil/source/utility/casefolding.cxx20
-rw-r--r--i18nutil/source/utility/casefolding_data.h2
-rw-r--r--i18nutil/source/utility/oneToOneMapping.cxx8
-rw-r--r--i18nutil/source/utility/widthfolding_data.h4
4 files changed, 17 insertions, 17 deletions
diff --git a/i18nutil/source/utility/casefolding.cxx b/i18nutil/source/utility/casefolding.cxx
index 77620fd4a9c3..140fa8cd71e0 100644
--- a/i18nutil/source/utility/casefolding.cxx
+++ b/i18nutil/source/utility/casefolding.cxx
@@ -27,16 +27,16 @@ using namespace com::sun::star::uno;
namespace i18nutil {
-static Mapping mapping_03a3[] = {{0, 1, {0x03c2, 0, 0}},{0, 1, {0x03c3, 0, 0}}};
-static Mapping mapping_0307[] = {{0, 0, {0, 0, 0}},{0, 1, {0x0307, 0, 0}}};
-static Mapping mapping_004a[] = {{0, 2, {0x006a, 0x0307, 0}},{0, 1, {0x006a, 0, 0}}};
-static Mapping mapping_012e[] = {{0, 2, {0x012f, 0x0307, 0}},{0, 1, {0x012f, 0, 0}}};
-static Mapping mapping_00cc[] = {{0, 3, {0x0069, 0x0307, 0x0300}},{0, 1, {0x00ec, 0, 0}}};
-static Mapping mapping_00cd[] = {{0, 3, {0x0069, 0x0307, 0x0301}},{0, 1, {0x00ed, 0, 0}}};
-static Mapping mapping_0128[] = {{0, 3, {0x0069, 0x0307, 0x0303}},{0, 1, {0x0129, 0, 0}}};
-static Mapping mapping_0049[] = {{0, 2, {0x0069, 0x0307, 0}},{0, 1, {0x0131, 0, 0}},{0, 1, {0x0069, 0, 0}}};
-static Mapping mapping_0069[] = {{0, 1, {0x0130, 0, 0}},{0, 1, {0x0049, 0, 0}}};
-static Mapping mapping_0130[] = {{0, 1, {0x0069, 0, 0}},{0, 1, {0x0130, 0, 0}}};
+static const Mapping mapping_03a3[] = {{0, 1, {0x03c2, 0, 0}},{0, 1, {0x03c3, 0, 0}}};
+static const Mapping mapping_0307[] = {{0, 0, {0, 0, 0}},{0, 1, {0x0307, 0, 0}}};
+static const Mapping mapping_004a[] = {{0, 2, {0x006a, 0x0307, 0}},{0, 1, {0x006a, 0, 0}}};
+static const Mapping mapping_012e[] = {{0, 2, {0x012f, 0x0307, 0}},{0, 1, {0x012f, 0, 0}}};
+static const Mapping mapping_00cc[] = {{0, 3, {0x0069, 0x0307, 0x0300}},{0, 1, {0x00ec, 0, 0}}};
+static const Mapping mapping_00cd[] = {{0, 3, {0x0069, 0x0307, 0x0301}},{0, 1, {0x00ed, 0, 0}}};
+static const Mapping mapping_0128[] = {{0, 3, {0x0069, 0x0307, 0x0303}},{0, 1, {0x0129, 0, 0}}};
+static const Mapping mapping_0049[] = {{0, 2, {0x0069, 0x0307, 0}},{0, 1, {0x0131, 0, 0}},{0, 1, {0x0069, 0, 0}}};
+static const Mapping mapping_0069[] = {{0, 1, {0x0130, 0, 0}},{0, 1, {0x0049, 0, 0}}};
+static const Mapping mapping_0130[] = {{0, 1, {0x0069, 0, 0}},{0, 1, {0x0130, 0, 0}}};
#define langIs(lang) (aLocale.Language == lang)
diff --git a/i18nutil/source/utility/casefolding_data.h b/i18nutil/source/utility/casefolding_data.h
index 06525cbc7cde..1cd912b2200d 100644
--- a/i18nutil/source/utility/casefolding_data.h
+++ b/i18nutil/source/utility/casefolding_data.h
@@ -494,7 +494,7 @@ static const Value CaseMappingValue[] = {
#define MaxCaseMappingExtras 3
-static Mapping CaseMappingExtra[] = {
+static Mapping const CaseMappingExtra[] = {
{0x80, 0, {0x0000, 0x0000, 0x0000}}, // 0x0000 (0 0x0)
{0x60, 1, {0x0131, 0x0000, 0x0000}}, // 0x0049 (1 0x1)
{0x8a, 0, {0x0000, 0x0000, 0x0000}}, // 0x0049 (2 0x2)
diff --git a/i18nutil/source/utility/oneToOneMapping.cxx b/i18nutil/source/utility/oneToOneMapping.cxx
index 388722bfc7b5..8e71ea01e418 100644
--- a/i18nutil/source/utility/oneToOneMapping.cxx
+++ b/i18nutil/source/utility/oneToOneMapping.cxx
@@ -56,7 +56,7 @@ sal_Unicode oneToOneMapping::find(const sal_Unicode nKey) const
return nKey;
}
-oneToOneMappingWithFlag::oneToOneMappingWithFlag( UnicodePairWithFlag *rpTableWF, const size_t rnSize, const UnicodePairFlag rnFlag )
+oneToOneMappingWithFlag::oneToOneMappingWithFlag( UnicodePairWithFlag const *rpTableWF, const size_t rnSize, const UnicodePairFlag rnFlag )
: oneToOneMapping( nullptr, rnSize, sizeof(UnicodePairWithFlag) ),
mpTableWF ( rpTableWF ),
mnFlag ( rnFlag ),
@@ -69,7 +69,7 @@ oneToOneMappingWithFlag::~oneToOneMappingWithFlag()
{
if( mbHasIndex )
{
- for (UnicodePairWithFlag** i : mpIndex)
+ for (UnicodePairWithFlag const ** i : mpIndex)
delete [] i;
}
}
@@ -80,7 +80,7 @@ void oneToOneMappingWithFlag::makeIndex()
{
int current = -1;
- for (UnicodePairWithFlag**& i : mpIndex)
+ for (UnicodePairWithFlag const **& i : mpIndex)
i = nullptr;
for( size_t k = 0; k < mnSize; k++ )
@@ -90,7 +90,7 @@ void oneToOneMappingWithFlag::makeIndex()
if( high != current )
{
current = high;
- mpIndex[high] = new UnicodePairWithFlag*[256];
+ mpIndex[high] = new UnicodePairWithFlag const *[256];
for (int j = 0; j < 256; ++j)
mpIndex[high][j] = nullptr;
diff --git a/i18nutil/source/utility/widthfolding_data.h b/i18nutil/source/utility/widthfolding_data.h
index b1c0e2c00c57..26ead65d0479 100644
--- a/i18nutil/source/utility/widthfolding_data.h
+++ b/i18nutil/source/utility/widthfolding_data.h
@@ -248,7 +248,7 @@ const decomposition_table_entry_t decomposition_table[] = {
#define FULL2HALF_ASC_FUNCTION 0x02
#define FULL2HALF_KATAKANA_ONLY 0x04
-UnicodePairWithFlag full2half[] = {
+UnicodePairWithFlag const full2half[] = {
{ 0x2015, 0xFF70, FULL2HALF_ASC_FUNCTION }, // HORIZONTAL BAR --> KATAKANA-HIRAGANA PROLONGED SOUND MARK
{ 0x2018, 0x0060, FULL2HALF_ASC_FUNCTION }, // LEFT SINGLE QUOTATION MARK => GRAVE ACCENT
{ 0x2019, 0x0027, FULL2HALF_ASC_FUNCTION }, // RIGHT SINGLE QUOTATION MARK => APOSTROPHE
@@ -698,7 +698,7 @@ const sal_Unicode composition_table[][2] = {
#define HALF2FULL_JIS_FUNCTION 0x02
#define HALF2FULL_KATAKANA_ONLY 0x04
-UnicodePairWithFlag half2full[] = {
+UnicodePairWithFlag const half2full[] = {
{ 0x0020, 0x3000, HALF2FULL_NORMAL }, // SPACE --> IDEOGRAPHIC SPACE
{ 0x0021, 0xFF01, HALF2FULL_NORMAL | HALF2FULL_JIS_FUNCTION }, // EXCLAMATION MARK --> FULLWIDTH EXCLAMATION MARK
{ 0x0022, 0xFF02, HALF2FULL_NORMAL }, // QUOTATION MARK --> FULLWIDTH QUOTATION MARK