diff options
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/breakiterator/breakiterator_unicode.cxx | 4 | ||||
-rw-r--r-- | i18npool/source/calendar/calendar_jewish.cxx | 7 | ||||
-rw-r--r-- | i18npool/source/localedata/LocaleNode.cxx | 5 | ||||
-rw-r--r-- | i18npool/source/localedata/localedata.cxx | 4 | ||||
-rw-r--r-- | i18npool/source/localedata/saxparser.cxx | 4 | ||||
-rw-r--r-- | i18npool/source/nativenumber/nativenumbersupplier.cxx | 23 | ||||
-rw-r--r-- | i18npool/source/registerservices/registerservices.cxx | 10 | ||||
-rw-r--r-- | i18npool/source/textconversion/genconv_dict.cxx | 3 |
8 files changed, 56 insertions, 4 deletions
diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx b/i18npool/source/breakiterator/breakiterator_unicode.cxx index e1675ec6a41d..93f81fa9cc6c 100644 --- a/i18npool/source/breakiterator/breakiterator_unicode.cxx +++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx @@ -58,6 +58,8 @@ BreakIterator_Unicode::~BreakIterator_Unicode() { } +namespace { + /* Wrapper class to provide public access to the icu::RuleBasedBreakIterator's setbreakType method. @@ -79,6 +81,8 @@ class OOoRuleBasedBreakIterator : public icu::RuleBasedBreakIterator }; +} + // loading ICU breakiterator on demand. void BreakIterator_Unicode::loadICUBreakIterator(const css::lang::Locale& rLocale, sal_Int16 rBreakType, sal_Int16 nWordType, const sal_Char *rule, const OUString& rText) diff --git a/i18npool/source/calendar/calendar_jewish.cxx b/i18npool/source/calendar/calendar_jewish.cxx index 996d01d73f49..549bae3c12aa 100644 --- a/i18npool/source/calendar/calendar_jewish.cxx +++ b/i18npool/source/calendar/calendar_jewish.cxx @@ -128,6 +128,7 @@ static sal_Int32 LastDayOfHebrewMonth(sal_Int32 month, sal_Int32 year) { return 30; } +namespace { class HebrewDate { private: @@ -187,6 +188,8 @@ public: }; +} + // Gregorian dates static int LastDayOfGregorianMonth(int month, int year) { @@ -207,6 +210,8 @@ static int LastDayOfGregorianMonth(int month, int year) { } } +namespace { + class GregorianDate { private: int year; // 1... @@ -246,6 +251,8 @@ public: }; +} + // map field value from gregorian calendar to other calendar, it can be overwritten by derived class. void Calendar_jewish::mapFromGregorian() { diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index 273d40698a8f..80972f61092c 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -1966,10 +1966,15 @@ void LCTransliterationNode::generateCode (const OFileWriter &of) const of.writeFunction("getTransliterations_", "nbOfTransliterations", "LCTransliterationsArray"); } +namespace { + struct NameValuePair { const sal_Char *name; const sal_Char *value; }; + +} + static const NameValuePair ReserveWord[] = { { "trueWord", "true" }, { "falseWord", "false" }, diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 0679407cc81b..91e4c5de21bb 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -1318,6 +1318,8 @@ LocaleDataImpl::getContinuousNumberingLevels( const lang::Locale& rLocale ) // OutlineNumbering helper class +namespace { + struct OutlineNumberingLevel_Impl { OUString sPrefix; @@ -1351,6 +1353,8 @@ public: virtual sal_Bool SAL_CALL hasElements( ) override; }; +} + Sequence< Reference<container::XIndexAccess> > LocaleDataImpl::getOutlineNumberingLevels( const lang::Locale& rLocale ) { diff --git a/i18npool/source/localedata/saxparser.cxx b/i18npool/source/localedata/saxparser.cxx index ace747d8286f..e667f523316c 100644 --- a/i18npool/source/localedata/saxparser.cxx +++ b/i18npool/source/localedata/saxparser.cxx @@ -46,6 +46,7 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::xml::sax; using namespace ::com::sun::star::io; +namespace { /************ * Sequence of bytes -> InputStream @@ -88,6 +89,7 @@ public: Sequence< sal_Int8> m_seq; }; +} // Helper : create an input stream from a file @@ -135,6 +137,7 @@ static Reference< XInputStream > createStreamFromFile( return r; } +namespace { class TestDocumentHandler : public WeakImplHelper< XExtendedDocumentHandler , XEntityResolver , XErrorHandler > @@ -292,6 +295,7 @@ public: OFileWriter of; }; +} SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) { diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx index c19e6521d347..89d56a97826d 100644 --- a/i18npool/source/nativenumber/nativenumbersupplier.cxx +++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx @@ -38,6 +38,8 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::i18n; using namespace ::com::sun::star::lang; +namespace { + struct Number { sal_Int16 number; const sal_Unicode *multiplierChar; @@ -46,6 +48,7 @@ struct Number { const sal_Int16 *multiplierExponent; }; +} #define NUMBER_OMIT_ZERO (1 << 0) #define NUMBER_OMIT_ONLY_ZERO (1 << 1) @@ -65,8 +68,12 @@ struct Number { namespace i18npool { +namespace { + struct theNatNumMutex : public rtl::Static<osl::Mutex, theNatNumMutex> {}; +} + static OUString getHebrewNativeNumberString(const OUString& aNumberString, bool useGeresh); static OUString getCyrillicNativeNumberString(const OUString& aNumberString); @@ -981,10 +988,16 @@ sal_Int16 SAL_CALL NativeNumberSupplierService::convertFromXmlAttributes( const // see numerical system in the Hebrew Numbering System in following link for details, // http://smontagu.org/writings/HebrewNumbers.html +namespace { + struct HebrewNumberChar { sal_Unicode code; sal_Int16 value; -} const HebrewNumberCharArray[] = { +}; + +} + +HebrewNumberChar const HebrewNumberCharArray[] = { { 0x05ea, 400 }, { 0x05ea, 400 }, { 0x05e9, 300 }, @@ -1089,10 +1102,16 @@ static const sal_Unicode cyrillicThousandsMark = 0x0482; static const sal_Unicode cyrillicTitlo = 0x0483; static const sal_Unicode cyrillicTen = 0x0456; +namespace { + struct CyrillicNumberChar { sal_Unicode code; sal_Int16 value; -} const CyrillicNumberCharArray[] = { +}; + +} + +CyrillicNumberChar const CyrillicNumberCharArray[] = { { 0x0446, 900 }, { 0x047f, 800 }, { 0x0471, 700 }, diff --git a/i18npool/source/registerservices/registerservices.cxx b/i18npool/source/registerservices/registerservices.cxx index dd891558696d..eb71012e90eb 100644 --- a/i18npool/source/registerservices/registerservices.cxx +++ b/i18npool/source/registerservices/registerservices.cxx @@ -247,11 +247,17 @@ IMPL_CREATEINSTANCE( halfwidthKatakanaToFullwidthKatakana ) IMPL_CREATEINSTANCE( fullwidthToHalfwidthLikeASC ) IMPL_CREATEINSTANCE( halfwidthToFullwidthLikeJIS ) -static const struct InstancesArray { +namespace { + +struct InstancesArray { const sal_Char* pServiceNm; const sal_Char* pImplementationNm; FN_CreateInstance pFn; -} aInstances[] = { +}; + +} + +static const InstancesArray aInstances[] = { { "com.sun.star.i18n.IndexEntrySupplier", "com.sun.star.i18n.IndexEntrySupplier", &IndexEntrySupplier_CreateInstance }, diff --git a/i18npool/source/textconversion/genconv_dict.cxx b/i18npool/source/textconversion/genconv_dict.cxx index 4173d898622d..8cebdb7f1a52 100644 --- a/i18npool/source/textconversion/genconv_dict.cxx +++ b/i18npool/source/textconversion/genconv_dict.cxx @@ -319,6 +319,7 @@ void make_stc_char(FILE *sfp, FILE *cfp) fprintf (cfp, "\tconst sal_Unicode* getSTC_CharData_T2S() { return STC_CharData_T2S; }\n"); } +namespace { struct Index { sal_uInt16 address; @@ -326,6 +327,8 @@ struct Index { sal_Unicode *data; }; +} + extern "C" { static int Index_comp(const void* s1, const void* s2) { |