diff options
author | Eike Rathke <erack@redhat.com> | 2013-09-10 21:29:55 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-09-10 23:04:37 +0200 |
commit | 8616a33bc2b11cce4d581dc22893995726bcd197 (patch) | |
tree | 4ea28467d7f5a49f73119282e26c4f9cec859475 /i18npool | |
parent | 0517ec8f6bc2da8cac819aab714da30531feeabc (diff) |
accept also '-' as '_' in 'ref' attribute
Change-Id: Ibdd59bc92df0318829e7bca098f0e9ce2dfce695
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/localedata/LocaleNode.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index b89a9ab53851..a4af95fa91e3 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -393,6 +393,7 @@ void LCCTYPENode::generateCode (const OFileWriter &of) const const LocaleNode * sepNode = 0; OUString useLocale = getAttr().getValueByName("ref"); if (!useLocale.isEmpty()) { + useLocale = useLocale.replace( '-', '_'); of.writeRefFunction("getLocaleItem_", useLocale); return; } @@ -642,6 +643,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const OUString useLocale = getAttr().getValueByName("ref"); if (!useLocale.isEmpty()) { + useLocale = useLocale.replace( '-', '_'); switch (mnSection) { case 0: @@ -753,6 +755,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const OUString aRef( pCtype->getAttr().getValueByName("ref")); if (!aRef.isEmpty()) { + aRef = aRef.replace( '-', '_'); if (!bCtypeIsRef) fprintf( stderr, "Warning: Can't check separators used in FormatCode due to LC_CTYPE ref=\"%s\".\n" @@ -1279,6 +1282,7 @@ void LCCollationNode::generateCode (const OFileWriter &of) const { OUString useLocale = getAttr().getValueByName("ref"); if (!useLocale.isEmpty()) { + useLocale = useLocale.replace( '-', '_'); of.writeRefFunction("getCollatorImplementation_", useLocale); of.writeRefFunction("getCollationOptions_", useLocale); return; @@ -1352,6 +1356,7 @@ void LCSearchNode::generateCode (const OFileWriter &of) const { OUString useLocale = getAttr().getValueByName("ref"); if (!useLocale.isEmpty()) { + useLocale = useLocale.replace( '-', '_'); of.writeRefFunction("getSearchOptions_", useLocale); return; } @@ -1390,6 +1395,7 @@ void LCIndexNode::generateCode (const OFileWriter &of) const { OUString useLocale = getAttr().getValueByName("ref"); if (!useLocale.isEmpty()) { + useLocale = useLocale.replace( '-', '_'); of.writeRefFunction("getIndexAlgorithm_", useLocale); of.writeRefFunction("getUnicodeScripts_", useLocale); of.writeRefFunction("getFollowPageWords_", useLocale); @@ -1550,6 +1556,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const { OUString useLocale = getAttr().getValueByName("ref"); if (!useLocale.isEmpty()) { + useLocale = useLocale.replace( '-', '_'); of.writeRefFunction("getAllCalendars_", useLocale); return; } @@ -1581,6 +1588,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const const sal_Char *elementTag; LocaleNode * daysNode = NULL; OUString ref_name = calNode->getChildAt(nChild)->getAttr().getValueByName("ref"); + ref_name = ref_name.replace( '-', '_'); if (!ref_name.isEmpty() && i > 0) { for (j = 0; j < i; j++) { str = getChildAt(j)->getAttr().getValueByName("unoid"); @@ -1613,6 +1621,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const // Generate Months of Year LocaleNode * monthsNode = NULL; ref_name = calNode->getChildAt(nChild)->getAttr().getValueByName("ref"); + ref_name = ref_name.replace( '-', '_'); if (!ref_name.isEmpty() && i > 0) { for (j = 0; j < i; j++) { str = getChildAt(j)->getAttr().getValueByName("unoid"); @@ -1648,6 +1657,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const --nChild; LocaleNode * genitiveMonthsNode = NULL; ref_name = calNode->getChildAt(nChild)->getAttr().getValueByName("ref"); + ref_name = ref_name.replace( '-', '_'); if (!ref_name.isEmpty() && i > 0) { for (j = 0; j < i; j++) { str = getChildAt(j)->getAttr().getValueByName("unoid"); @@ -1684,6 +1694,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const --nChild; LocaleNode * partitiveMonthsNode = NULL; ref_name = calNode->getChildAt(nChild)->getAttr().getValueByName("ref"); + ref_name = ref_name.replace( '-', '_'); if (!ref_name.isEmpty() && i > 0) { for (j = 0; j < i; j++) { str = getChildAt(j)->getAttr().getValueByName("unoid"); @@ -1716,6 +1727,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const // Generate Era name LocaleNode * erasNode = NULL; ref_name = calNode -> getChildAt(nChild) ->getAttr().getValueByName("ref"); + ref_name = ref_name.replace( '-', '_'); if (!ref_name.isEmpty() && i > 0) { for (j = 0; j < i; j++) { str = getChildAt(j)->getAttr().getValueByName("unoid"); @@ -1865,6 +1877,7 @@ void LCCurrencyNode :: generateCode (const OFileWriter &of) const { OUString useLocale = getAttr().getValueByName("ref"); if (!useLocale.isEmpty()) { + useLocale = useLocale.replace( '-', '_'); of.writeRefFunction("getAllCurrencies_", useLocale); return; } @@ -1966,6 +1979,7 @@ void LCTransliterationNode::generateCode (const OFileWriter &of) const { OUString useLocale = getAttr().getValueByName("ref"); if (!useLocale.isEmpty()) { + useLocale = useLocale.replace( '-', '_'); of.writeRefFunction("getTransliterations_", useLocale); return; } @@ -2015,6 +2029,7 @@ void LCMiscNode::generateCode (const OFileWriter &of) const { OUString useLocale = getAttr().getValueByName("ref"); if (!useLocale.isEmpty()) { + useLocale = useLocale.replace( '-', '_'); of.writeRefFunction("getForbiddenCharacters_", useLocale); of.writeRefFunction("getBreakIteratorRules_", useLocale); of.writeRefFunction("getReservedWords_", useLocale); @@ -2112,6 +2127,7 @@ void LCNumberingLevelNode::generateCode (const OFileWriter &of) const of.writeAsciiString("// ---> ContinuousNumbering\n"); OUString useLocale = getAttr().getValueByName("ref"); if (!useLocale.isEmpty()) { + useLocale = useLocale.replace( '-', '_'); of.writeRefFunction2("getContinuousNumberingLevels_", useLocale); return; } @@ -2182,6 +2198,7 @@ void LCOutlineNumberingLevelNode::generateCode (const OFileWriter &of) const of.writeAsciiString("// ---> OutlineNumbering\n"); OUString useLocale = getAttr().getValueByName("ref"); if (!useLocale.isEmpty()) { + useLocale = useLocale.replace( '-', '_'); of.writeRefFunction3("getOutlineNumberingLevels_", useLocale); return; } |