diff options
Diffstat (limited to 'i18npool/source/localedata')
22 files changed, 1083 insertions, 262 deletions
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index 275fdf006d9f..05f6156489a6 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,6 +35,7 @@ #include <set> #include <rtl/ustrbuf.hxx> +#include <sal/macros.h> #include "LocaleNode.hxx" #include <com/sun/star/i18n/NumberFormatIndex.hpp> @@ -48,7 +50,7 @@ namespace cssi = ::com::sun::star::i18n; LocaleNode::LocaleNode (const OUString& name, const Reference< XAttributeList > & attr) : aName(name) - , xAttribs(new Attr(attr)) + , aAttribs(attr) , parent(0) , children(0) , nChildren(0) @@ -83,11 +85,10 @@ void LocaleNode::printR () const { void LocaleNode::addChild ( LocaleNode * node) { if (childArrSize <= nChildren) { - LocaleNode ** arrN = (LocaleNode **)malloc( sizeof (LocaleNode *)*(childArrSize+10) ) ; - for (sal_Int32 i = 0; i<childArrSize ; i++) + LocaleNode ** arrN = new LocaleNode*[childArrSize+10]; + for (sal_Int32 i = 0; i<childArrSize; ++i) arrN[i] = children[i]; - if ( childArrSize > 0 ) - free(children); + delete [] children; childArrSize += 10; children = arrN; } @@ -119,38 +120,40 @@ const LocaleNode * LocaleNode::findNode ( const sal_Char *name) const { return 0; } - LocaleNode::~LocaleNode() { - for (sal_Int32 i=0; i<nChildren;i++) - delete (children[i]); +LocaleNode::~LocaleNode() +{ + for (sal_Int32 i=0; i < nChildren; ++i) + delete children[i]; + delete [] children; } LocaleNode* LocaleNode::createNode (const OUString& name, const Reference< XAttributeList > & attr) { - if (name.equalsAscii("LC_INFO")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_INFO"))) return new LCInfoNode (name,attr); - if (name.equalsAscii("LC_CTYPE")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_CTYPE"))) return new LCCTYPENode (name,attr); - if (name.equalsAscii("LC_FORMAT")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_FORMAT"))) return new LCFormatNode (name,attr); - if (name.equalsAscii("LC_FORMAT_1")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_FORMAT_1"))) return new LCFormatNode (name,attr); - if (name.equalsAscii("LC_CALENDAR")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_CALENDAR"))) return new LCCalendarNode (name,attr); - if (name.equalsAscii("LC_CURRENCY")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_CURRENCY"))) return new LCCurrencyNode (name,attr); - if (name.equalsAscii("LC_TRANSLITERATION")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_TRANSLITERATION"))) return new LCTransliterationNode (name,attr); - if (name.equalsAscii("LC_COLLATION")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_COLLATION"))) return new LCCollationNode (name,attr); - if (name.equalsAscii("LC_INDEX")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_INDEX"))) return new LCIndexNode (name,attr); - if (name.equalsAscii("LC_SEARCH")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_SEARCH"))) return new LCSearchNode (name,attr); - if (name.equalsAscii("LC_MISC")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_MISC"))) return new LCMiscNode (name,attr); - if (name.equalsAscii("LC_NumberingLevel")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_NumberingLevel"))) return new LCNumberingLevelNode (name, attr); - if (name.equalsAscii("LC_OutLineNumberingLevel")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_OutLineNumberingLevel"))) return new LCOutlineNumberingLevelNode (name, attr); return new LocaleNode(name,attr); @@ -167,7 +170,7 @@ void print_OUString( const OUString& s ) printf( "%s", OSTR(s)); } -bool is_empty( const OUString& s ) +bool is_empty_string( const OUString& s ) { return (s.getLength()==0) || (s.getLength()==1 && s[0]=='\n'); } @@ -191,26 +194,23 @@ void print_node( const LocaleNode* p, int depth=0 ) print_color(36); print_OUString( p->getName() ); print_color(0); - const Attr* q = p->getAttr(); - if( q ) + const Attr& q = p->getAttr(); + for( sal_Int32 j = 0; j < q.getLength(); ++j ) { - for( sal_Int32 j=0; j<q->getLength(); j++ ) - { - printf(" "); - print_color(33); - print_OUString( q->getTypeByIndex(j) ); - print_color(0); - printf("="); - print_color(31); - printf("'"); - print_OUString( q->getValueByIndex(j) ); - printf("'"); - print_color(0); - } + printf(" "); + print_color(33); + print_OUString( q.getTypeByIndex(j) ); + print_color(0); + printf("="); + print_color(31); + printf("'"); + print_OUString( q.getValueByIndex(j) ); + printf("'"); + print_color(0); } printf(">"); printf("\n"); - if( !is_empty( p->getValue() ) ) + if( !is_empty_string( p->getValue() ) ) { print_indent( depth+1 ); printf("value: "); @@ -234,8 +234,8 @@ void print_node( const LocaleNode* p, int depth=0 ) void LocaleNode :: generateCode (const OFileWriter &of) const { - ::rtl::OUString aDTD = getAttr()->getValueByName("versionDTD"); - if (!aDTD.equalsAscii( LOCALE_VERSION_DTD)) + ::rtl::OUString aDTD = getAttr().getValueByName("versionDTD"); + if (!aDTD.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(LOCALE_VERSION_DTD))) { ++nError; fprintf( stderr, "Error: Locale versionDTD is not %s, see comment in locale.dtd\n", LOCALE_VERSION_DTD); @@ -379,12 +379,12 @@ void LCInfoNode::generateCode (const OFileWriter &of) const void LCCTYPENode::generateCode (const OFileWriter &of) const { const LocaleNode * sepNode = 0; - ::rtl::OUString useLocale = getAttr() -> getValueByName("ref"); + ::rtl::OUString useLocale = getAttr().getValueByName("ref"); if (useLocale.getLength() > 0) { of.writeRefFunction("getLocaleItem_", useLocale); return; } - ::rtl::OUString str = getAttr() -> getValueByName("unoid"); + ::rtl::OUString str = getAttr().getValueByName("unoid"); of.writeAsciiString("\n\n"); of.writeParameter("LC_CTYPE_Unoid", str);; @@ -438,7 +438,7 @@ void LCCTYPENode::generateCode (const OFileWriter &of) const incError( "DateSeparator equals TimeSeparator."); if (aDecSep == aThoSep) incError( "DecimalSeparator equals ThousandSeparator."); - if (aThoSep.equalsAscii( " ")) + if (aThoSep.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( " "))) incError( "ThousandSeparator is an ' ' ordinary space, this should be a non-breaking space U+00A0 instead."); if (aListSep == aDecSep) fprintf( stderr, "Warning: %s\n", @@ -598,13 +598,13 @@ void LCFormatNode::generateCode (const OFileWriter &of) const OUString str; if (mnSection >= 2) incError("more than 2 LC_FORMAT sections"); - of.writeParameter("replaceFrom", getAttr() -> getValueByName("replaceFrom"), mnSection); - str = getAttr() -> getValueByName("replaceTo"); + of.writeParameter("replaceFrom", getAttr().getValueByName("replaceFrom"), mnSection); + str = getAttr().getValueByName("replaceTo"); // Locale data generator inserts FFFF for LangID, we need to adapt that. if (str.endsWithIgnoreAsciiCaseAsciiL( "-FFFF]", 6)) incErrorStr("replaceTo=\"%s\" needs FFFF to be adapted to the real LangID value.", str); of.writeParameter("replaceTo", str, mnSection); - ::rtl::OUString useLocale = getAttr() -> getValueByName("ref"); + ::rtl::OUString useLocale = getAttr().getValueByName("ref"); if (useLocale.getLength() > 0) { switch (mnSection) { @@ -629,25 +629,25 @@ void LCFormatNode::generateCode (const OFileWriter &of) const OUString aType; OUString aFormatIndex; // currNode -> print(); - const Attr * currNodeAttr = currNode->getAttr(); - //printf ("getLen() = %d\n", currNode->getAttr()->getLength()); + const Attr &currNodeAttr = currNode->getAttr(); + //printf ("getLen() = %d\n", currNode->getAttr().getLength()); - str = currNodeAttr -> getValueByName("msgid"); + str = currNodeAttr.getValueByName("msgid"); if (!aMsgIdSet.insert( str).second) incErrorStr( "Duplicated msgid=\"%s\" in FormatElement.", str); of.writeParameter("FormatKey", str, formatCount); - str = currNodeAttr -> getValueByName("default"); - bool bDefault = str.equalsAscii( "true"); + str = currNodeAttr.getValueByName("default"); + bool bDefault = str.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "true")); of.writeDefaultParameter("FormatElement", str, formatCount); - aType = currNodeAttr -> getValueByName("type"); + aType = currNodeAttr.getValueByName("type"); of.writeParameter("FormatType", aType, formatCount); - aUsage = currNodeAttr -> getValueByName("usage"); + aUsage = currNodeAttr.getValueByName("usage"); of.writeParameter("FormatUsage", aUsage, formatCount); - aFormatIndex = currNodeAttr -> getValueByName("formatindex"); + aFormatIndex = currNodeAttr.getValueByName("formatindex"); sal_Int16 formatindex = (sal_Int16)aFormatIndex.toInt32(); if (!aFormatIndexSet.insert( formatindex).second) incErrorInt( "Duplicated formatindex=\"%d\" in FormatElement.", formatindex); @@ -692,7 +692,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const incError( "No LC_CTYPE found for FormatCode."); else { - OUString aRef( pCtype->getAttr()->getValueByName("ref")); + OUString aRef( pCtype->getAttr().getValueByName("ref")); if (aRef.getLength() > 0) { if (!bCtypeIsRef) @@ -920,7 +920,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const void LCCollationNode::generateCode (const OFileWriter &of) const { - ::rtl::OUString useLocale = getAttr() -> getValueByName("ref"); + ::rtl::OUString useLocale = getAttr().getValueByName("ref"); if (useLocale.getLength() > 0) { of.writeRefFunction("getCollatorImplementation_", useLocale); of.writeRefFunction("getCollationOptions_", useLocale); @@ -935,11 +935,11 @@ void LCCollationNode::generateCode (const OFileWriter &of) const if( currNode->getName().compareToAscii("Collator") == 0 ) { ::rtl::OUString str; - str = currNode->getAttr() -> getValueByName("unoid"); + str = currNode->getAttr().getValueByName("unoid"); of.writeParameter("CollatorID", str, j); str = currNode->getValue(); of.writeParameter("CollatorRule", str, j); - str = currNode -> getAttr() -> getValueByName("default"); + str = currNode -> getAttr().getValueByName("default"); of.writeDefaultParameter("Collator", str, j); of.writeAsciiString("\n"); @@ -993,7 +993,7 @@ void LCCollationNode::generateCode (const OFileWriter &of) const void LCSearchNode::generateCode (const OFileWriter &of) const { - ::rtl::OUString useLocale = getAttr() -> getValueByName("ref"); + ::rtl::OUString useLocale = getAttr().getValueByName("ref"); if (useLocale.getLength() > 0) { of.writeRefFunction("getSearchOptions_", useLocale); return; @@ -1031,7 +1031,7 @@ void LCSearchNode::generateCode (const OFileWriter &of) const void LCIndexNode::generateCode (const OFileWriter &of) const { - ::rtl::OUString useLocale = getAttr() -> getValueByName("ref"); + ::rtl::OUString useLocale = getAttr().getValueByName("ref"); if (useLocale.getLength() > 0) { of.writeRefFunction("getIndexAlgorithm_", useLocale); of.writeRefFunction("getUnicodeScripts_", useLocale); @@ -1047,15 +1047,15 @@ void LCIndexNode::generateCode (const OFileWriter &of) const if( currNode->getName().compareToAscii("IndexKey") == 0 ) { ::rtl::OUString str; - str = currNode->getAttr() -> getValueByName("unoid"); + str = currNode->getAttr().getValueByName("unoid"); of.writeParameter("IndexID", str, nbOfIndexs); - str = currNode->getAttr() -> getValueByName("module"); + str = currNode->getAttr().getValueByName("module"); of.writeParameter("IndexModule", str, nbOfIndexs); str = currNode->getValue(); of.writeParameter("IndexKey", str, nbOfIndexs); - str = currNode -> getAttr() -> getValueByName("default"); + str = currNode -> getAttr().getValueByName("default"); of.writeDefaultParameter("Index", str, nbOfIndexs); - str = currNode -> getAttr() -> getValueByName("phonetic"); + str = currNode -> getAttr().getValueByName("phonetic"); of.writeDefaultParameter("Phonetic", str, nbOfIndexs); of.writeAsciiString("\n"); @@ -1133,7 +1133,7 @@ void LCIndexNode::generateCode (const OFileWriter &of) const void LCCalendarNode::generateCode (const OFileWriter &of) const { - ::rtl::OUString useLocale = getAttr() -> getValueByName("ref"); + ::rtl::OUString useLocale = getAttr().getValueByName("ref"); if (useLocale.getLength() > 0) { of.writeRefFunction("getAllCalendars_", useLocale); return; @@ -1150,27 +1150,27 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const for ( i = 0; i < nbOfCalendars; i++) { LocaleNode * calNode = getChildAt (i); - OUString calendarID = calNode -> getAttr() -> getValueByName("unoid"); + OUString calendarID = calNode -> getAttr().getValueByName("unoid"); of.writeParameter( "calendarID", calendarID, i); - bool bGregorian = calendarID.equalsAscii( "gregorian"); + bool bGregorian = calendarID.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "gregorian")); if (!bHasGregorian) bHasGregorian = bGregorian; - str = calNode -> getAttr() -> getValueByName("default"); + str = calNode -> getAttr().getValueByName("default"); of.writeDefaultParameter("Calendar", str, i); // Generate Days of Week const sal_Char *elementTag; LocaleNode * daysNode = NULL; - ::rtl::OUString ref_name = calNode->getChildAt(0)->getAttr()->getValueByName("ref"); + ::rtl::OUString ref_name = calNode->getChildAt(0)->getAttr().getValueByName("ref"); if (ref_name.getLength() > 0 && i > 0) { for (j = 0; j < i; j++) { - str = getChildAt(j)->getAttr()->getValueByName("unoid"); + str = getChildAt(j)->getAttr().getValueByName("unoid"); if (str.equals(ref_name)) daysNode = getChildAt(j)->getChildAt(0); } } if (ref_name.getLength() > 0 && daysNode == NULL) { - of.writeParameter("dayRef", OUString::createFromAscii("ref"), i); + of.writeParameter("dayRef", OUString(RTL_CONSTASCII_USTRINGPARAM("ref")), i); of.writeParameter("dayRefName", ref_name, i); nbOfDays[i] = 0; } else { @@ -1184,7 +1184,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const LocaleNode *currNode = daysNode -> getChildAt(j); OUString dayID( currNode->getChildAt(0)->getValue()); of.writeParameter("dayID", dayID, i, j); - if (j == 0 && bGregorian && !dayID.equalsAscii( "sun")) + if (j == 0 && bGregorian && !dayID.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "sun"))) incError( "First day of a week of a Gregorian calendar must be <DayID>sun</DayID>"); of.writeParameter(elementTag, "DefaultAbbrvName",currNode->getChildAt(1)->getValue() ,i, j); of.writeParameter(elementTag, "DefaultFullName",currNode->getChildAt(2)->getValue() , i, j); @@ -1193,16 +1193,16 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const // Generate Months of Year LocaleNode * monthsNode = NULL; - ref_name = calNode->getChildAt(1)->getAttr()->getValueByName("ref"); + ref_name = calNode->getChildAt(1)->getAttr().getValueByName("ref"); if (ref_name.getLength() > 0 && i > 0) { for (j = 0; j < i; j++) { - str = getChildAt(j)->getAttr()->getValueByName("unoid"); + str = getChildAt(j)->getAttr().getValueByName("unoid"); if (str.equals(ref_name)) monthsNode = getChildAt(j)->getChildAt(1); } } if (ref_name.getLength() > 0 && monthsNode == NULL) { - of.writeParameter("monthRef", OUString::createFromAscii("ref"), i); + of.writeParameter("monthRef", OUString(RTL_CONSTASCII_USTRINGPARAM("ref")), i); of.writeParameter("monthRefName", ref_name, i); nbOfMonths[i] = 0; } else { @@ -1216,7 +1216,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const LocaleNode *currNode = monthsNode -> getChildAt(j); OUString monthID( currNode->getChildAt(0)->getValue()); of.writeParameter("monthID", monthID, i, j); - if (j == 0 && bGregorian && !monthID.equalsAscii( "jan")) + if (j == 0 && bGregorian && !monthID.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "jan"))) incError( "First month of a year of a Gregorian calendar must be <MonthID>jan</MonthID>"); of.writeParameter(elementTag, "DefaultAbbrvName",currNode->getChildAt(1)->getValue() ,i, j); of.writeParameter(elementTag, "DefaultFullName",currNode->getChildAt(2)->getValue() , i, j); @@ -1225,16 +1225,16 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const // Generate Era name LocaleNode * erasNode = NULL; - ref_name = calNode -> getChildAt(2) ->getAttr()->getValueByName("ref"); + ref_name = calNode -> getChildAt(2) ->getAttr().getValueByName("ref"); if (ref_name.getLength() > 0 && i > 0) { for (j = 0; j < i; j++) { - str = getChildAt(j)->getAttr()->getValueByName("unoid"); + str = getChildAt(j)->getAttr().getValueByName("unoid"); if (str.equals(ref_name)) erasNode = getChildAt(j)->getChildAt(2); } } if (ref_name.getLength() > 0 && erasNode == NULL) { - of.writeParameter("eraRef", OUString::createFromAscii("ref"), i); + of.writeParameter("eraRef", OUString(RTL_CONSTASCII_USTRINGPARAM("ref")), i); of.writeParameter("eraRefName", ref_name, i); nbOfEras[i] = 0; } else { @@ -1248,9 +1248,9 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const LocaleNode *currNode = erasNode -> getChildAt(j); OUString eraID( currNode->getChildAt(0)->getValue()); of.writeParameter("eraID", eraID, i, j); - if (j == 0 && bGregorian && !eraID.equalsAscii( "bc")) + if (j == 0 && bGregorian && !eraID.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "bc"))) incError( "First era of a Gregorian calendar must be <EraID>bc</EraID>"); - if (j == 1 && bGregorian && !eraID.equalsAscii( "ad")) + if (j == 1 && bGregorian && !eraID.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "ad"))) incError( "Second era of a Gregorian calendar must be <EraID>ad</EraID>"); of.writeAsciiString("\n"); of.writeParameter(elementTag, "DefaultAbbrvName",currNode->getChildAt(1)->getValue() ,i, j); @@ -1382,7 +1382,7 @@ bool isIso4217( const OUString& rStr ) void LCCurrencyNode :: generateCode (const OFileWriter &of) const { - ::rtl::OUString useLocale = getAttr() -> getValueByName("ref"); + ::rtl::OUString useLocale = getAttr().getValueByName("ref"); if (useLocale.getLength() > 0) { of.writeRefFunction("getAllCurrencies_", useLocale); return; @@ -1395,11 +1395,11 @@ void LCCurrencyNode :: generateCode (const OFileWriter &of) const bool bTheCompatible = false; for ( i = 0; i < getNumberOfChildren(); i++,nbOfCurrencies++) { LocaleNode * calNode = getChildAt (i); - str = calNode->getAttr() -> getValueByName("default"); + str = calNode->getAttr().getValueByName("default"); bool bDefault = of.writeDefaultParameter("Currency", str, nbOfCurrencies); - str = calNode->getAttr() -> getValueByName("usedInCompatibleFormatCodes"); + str = calNode->getAttr().getValueByName("usedInCompatibleFormatCodes"); bool bCompatible = of.writeDefaultParameter("CurrencyUsedInCompatibleFormatCodes", str, nbOfCurrencies); - str = calNode->getAttr() -> getValueByName("legacyOnly"); + str = calNode->getAttr().getValueByName("legacyOnly"); bool bLegacy = of.writeDefaultParameter("CurrencyLegacyOnly", str, nbOfCurrencies); if (bLegacy && (bDefault || bCompatible)) incError( "Currency: if legacyOnly==true, both 'default' and 'usedInCompatibleFormatCodes' must be false."); @@ -1477,7 +1477,7 @@ void LCCurrencyNode :: generateCode (const OFileWriter &of) const void LCTransliterationNode::generateCode (const OFileWriter &of) const { - ::rtl::OUString useLocale = getAttr() -> getValueByName("ref"); + ::rtl::OUString useLocale = getAttr().getValueByName("ref"); if (useLocale.getLength() > 0) { of.writeRefFunction("getTransliterations_", useLocale); return; @@ -1488,7 +1488,7 @@ void LCTransliterationNode::generateCode (const OFileWriter &of) const for ( i = 0; i < getNumberOfChildren(); i++,nbOfModules++) { LocaleNode * calNode = getChildAt (i); - str = calNode->getAttr() -> getValueByIndex(0); + str = calNode->getAttr().getValueByIndex(0); of.writeParameter("Transliteration", str, nbOfModules); } of.writeAsciiString("static const sal_Int16 nbOfTransliterations = "); @@ -1526,7 +1526,7 @@ static NameValuePair ReserveWord[] = { void LCMiscNode::generateCode (const OFileWriter &of) const { - ::rtl::OUString useLocale = getAttr() -> getValueByName("ref"); + ::rtl::OUString useLocale = getAttr().getValueByName("ref"); if (useLocale.getLength() > 0) { of.writeRefFunction("getForbiddenCharacters_", useLocale); of.writeRefFunction("getBreakIteratorRules_", useLocale); @@ -1545,7 +1545,7 @@ void LCMiscNode::generateCode (const OFileWriter &of) const ::rtl::OUString str; sal_Int16 i; - for ( i = 0; i < sal_Int16(sizeof(ReserveWord)/sizeof(ReserveWord[0])); i++,nbOfWords++) { + for ( i = 0; i < sal_Int16(SAL_N_ELEMENTS(ReserveWord)); i++,nbOfWords++) { const LocaleNode * curNode = (reserveNode ? reserveNode->findNode( ReserveWord[i].name) : 0); if (!curNode) @@ -1623,7 +1623,7 @@ void LCMiscNode::generateCode (const OFileWriter &of) const void LCNumberingLevelNode::generateCode (const OFileWriter &of) const { of.writeAsciiString("// ---> ContinuousNumbering\n"); - ::rtl::OUString useLocale = getAttr() -> getValueByName("ref"); + ::rtl::OUString useLocale = getAttr().getValueByName("ref"); if (useLocale.getLength() > 0) { of.writeRefFunction2("getContinuousNumberingLevels_", useLocale); return; @@ -1638,13 +1638,13 @@ void LCNumberingLevelNode::generateCode (const OFileWriter &of) const sal_Int32 nStyles = getNumberOfChildren(); sal_Int32 i; - for( i = 0; i < nStyles; i++ ) + for( i = 0; i < nStyles; ++i ) { - const Attr* q = getChildAt( i )->getAttr(); - for( sal_Int32 j=0; j<nAttributes; j++ ) + const Attr &q = getChildAt( i )->getAttr(); + for( sal_Int32 j=0; j<nAttributes; ++j ) { const char* name = attr[j]; - OUString value = q->getValueByName( name ); + OUString value = q.getValueByName( name ); of.writeParameter("continuous", name, value, sal::static_int_cast<sal_Int16>(i) ); } } @@ -1693,7 +1693,7 @@ void LCNumberingLevelNode::generateCode (const OFileWriter &of) const void LCOutlineNumberingLevelNode::generateCode (const OFileWriter &of) const { of.writeAsciiString("// ---> OutlineNumbering\n"); - ::rtl::OUString useLocale = getAttr() -> getValueByName("ref"); + ::rtl::OUString useLocale = getAttr().getValueByName("ref"); if (useLocale.getLength() > 0) { of.writeRefFunction3("getOutlineNumberingLevels_", useLocale); return; @@ -1726,11 +1726,11 @@ void LCOutlineNumberingLevelNode::generateCode (const OFileWriter &of) const nLevels.push_back( p->getNumberOfChildren() ); for( sal_Int32 j=0; j<nLevels.back(); j++ ) { - const Attr* q = p->getChildAt( j )->getAttr(); - for( sal_Int32 k=0; k<nAttributes; k++ ) + const Attr& q = p->getChildAt( j )->getAttr(); + for( sal_Int32 k=0; k<nAttributes; ++k ) { const char* name = attr[k]; - OUString value = q->getValueByName( name ); + OUString value = q.getValueByName( name ); of.writeParameter("outline", name, value, sal::static_int_cast<sal_Int16>(i), sal::static_int_cast<sal_Int16>(j) ); @@ -1857,3 +1857,5 @@ const OUString& Attr::getValueByIndex (sal_Int32 idx) const { return value[idx]; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/localedata/LocaleNode.hxx b/i18npool/source/localedata/LocaleNode.hxx index bf1bd1a9c4ab..fb3506389ac4 100644 --- a/i18npool/source/localedata/LocaleNode.hxx +++ b/i18npool/source/localedata/LocaleNode.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -107,7 +108,7 @@ class LocaleNode { OUString aName; OUString aValue; - Attr * xAttribs; + Attr aAttribs; LocaleNode * parent; LocaleNode* * children; sal_Int32 nChildren; @@ -123,7 +124,7 @@ public: inline void setValue(const OUString &oValue) { aValue += oValue; }; inline const OUString& getName() const { return aName; }; inline const OUString& getValue() const { return aValue; }; - inline const Attr* getAttr() const { return xAttribs; }; + inline const Attr& getAttr() const { return aAttribs; }; inline sal_Int32 getNumberOfChildren () const { return nChildren; }; inline LocaleNode * getChildAt (sal_Int32 idx) const { return children[idx] ; }; const LocaleNode * findNode ( const sal_Char *name) const; @@ -257,3 +258,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/localedata/data/ca_ES.xml b/i18npool/source/localedata/data/ca_ES.xml index 42fd55fe779a..b73579ab35cf 100644 --- a/i18npool/source/localedata/data/ca_ES.xml +++ b/i18npool/source/localedata/data/ca_ES.xml @@ -176,7 +176,12 @@ <FormatCode>DD/MM/YYYY HH:MM:SS</FormatCode> </FormatElement> </LC_FORMAT> - <LC_COLLATION ref="en_US" /> + <LC_COLLATION> + <Collator unoid="charset" default="true"/> + <CollationOptions> + <TransliterationModules>IGNORE_CASE</TransliterationModules> + </CollationOptions> + </LC_COLLATION> <LC_SEARCH ref="en_US"/> <LC_INDEX ref="en_US"/> <LC_CALENDAR> diff --git a/i18npool/source/localedata/data/en_AU.xml b/i18npool/source/localedata/data/en_AU.xml index 6206988562c3..806915e07336 100644 --- a/i18npool/source/localedata/data/en_AU.xml +++ b/i18npool/source/localedata/data/en_AU.xml @@ -53,6 +53,12 @@ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5"> <FormatCode>#,###.00</FormatCode> </FormatElement> + <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70"> + <FormatCode>#,##0_);(#,##0)</FormatCode> + </FormatElement> + <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71"> + <FormatCode>#,##0.00_);(#,##0.00)</FormatCode> + </FormatElement> <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6"> <FormatCode>0.00E+000</FormatCode> </FormatElement> diff --git a/i18npool/source/localedata/data/en_CA.xml b/i18npool/source/localedata/data/en_CA.xml index 121de11814a7..c654cf789c58 100644 --- a/i18npool/source/localedata/data/en_CA.xml +++ b/i18npool/source/localedata/data/en_CA.xml @@ -53,6 +53,12 @@ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5"> <FormatCode>#,###.00</FormatCode> </FormatElement> + <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70"> + <FormatCode>#,##0_);(#,##0)</FormatCode> + </FormatElement> + <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71"> + <FormatCode>#,##0.00_);(#,##0.00)</FormatCode> + </FormatElement> <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6"> <FormatCode>0.00E+000</FormatCode> </FormatElement> diff --git a/i18npool/source/localedata/data/en_GB.xml b/i18npool/source/localedata/data/en_GB.xml index f920af80285d..326ac348cbc5 100644 --- a/i18npool/source/localedata/data/en_GB.xml +++ b/i18npool/source/localedata/data/en_GB.xml @@ -179,6 +179,14 @@ <FormatCode>#,###.00</FormatCode> <DefaultName></DefaultName> </FormatElement> + <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70"> + <FormatCode>#,##0_);(#,##0)</FormatCode> + <DefaultName></DefaultName> + </FormatElement> + <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71"> + <FormatCode>#,##0.00_);(#,##0.00)</FormatCode> + <DefaultName></DefaultName> + </FormatElement> <FormatElement msgid="CurrencyFormatskey1" default="true" type="short" usage="CURRENCY" formatindex="12"> <FormatCode>[CURRENCY]#,##0;-[CURRENCY]#,##0</FormatCode> <DefaultName></DefaultName> diff --git a/i18npool/source/localedata/data/en_GH.xml b/i18npool/source/localedata/data/en_GH.xml index 37437468a651..8f1f6eab1643 100644 --- a/i18npool/source/localedata/data/en_GH.xml +++ b/i18npool/source/localedata/data/en_GH.xml @@ -53,6 +53,12 @@ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5"> <FormatCode>#,###.00</FormatCode> </FormatElement> + <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70"> + <FormatCode>#,##0_);(#,##0)</FormatCode> + </FormatElement> + <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71"> + <FormatCode>#,##0.00_);(#,##0.00)</FormatCode> + </FormatElement> <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6"> <FormatCode>0.00E+00</FormatCode> </FormatElement> diff --git a/i18npool/source/localedata/data/en_JM.xml b/i18npool/source/localedata/data/en_JM.xml index 186f8d494be0..780b20ddf26f 100644 --- a/i18npool/source/localedata/data/en_JM.xml +++ b/i18npool/source/localedata/data/en_JM.xml @@ -53,6 +53,12 @@ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5"> <FormatCode>#,###.00</FormatCode> </FormatElement> + <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70"> + <FormatCode>#,##0_);(#,##0)</FormatCode> + </FormatElement> + <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71"> + <FormatCode>#,##0.00_);(#,##0.00)</FormatCode> + </FormatElement> <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6"> <FormatCode>0.00E+000</FormatCode> </FormatElement> diff --git a/i18npool/source/localedata/data/en_NA.xml b/i18npool/source/localedata/data/en_NA.xml index bec705934342..255dcbf5e79d 100644 --- a/i18npool/source/localedata/data/en_NA.xml +++ b/i18npool/source/localedata/data/en_NA.xml @@ -53,6 +53,12 @@ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5"> <FormatCode>#,###.00</FormatCode> </FormatElement> + <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70"> + <FormatCode>#,##0_);(#,##0)</FormatCode> + </FormatElement> + <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71"> + <FormatCode>#,##0.00_);(#,##0.00)</FormatCode> + </FormatElement> <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6"> <FormatCode>0.00E+000</FormatCode> </FormatElement> diff --git a/i18npool/source/localedata/data/en_US.xml b/i18npool/source/localedata/data/en_US.xml index 7029b7cc5b30..f6b771b5f736 100644 --- a/i18npool/source/localedata/data/en_US.xml +++ b/i18npool/source/localedata/data/en_US.xml @@ -53,6 +53,12 @@ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5"> <FormatCode>#,###.00</FormatCode> </FormatElement> + <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70"> + <FormatCode>#,##0_);(#,##0)</FormatCode> + </FormatElement> + <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71"> + <FormatCode>#,##0.00_);(#,##0.00)</FormatCode> + </FormatElement> <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6"> <FormatCode>0.00E+000</FormatCode> </FormatElement> diff --git a/i18npool/source/localedata/data/en_ZA.xml b/i18npool/source/localedata/data/en_ZA.xml index 4b3be48225fd..c44810bf3eee 100644 --- a/i18npool/source/localedata/data/en_ZA.xml +++ b/i18npool/source/localedata/data/en_ZA.xml @@ -53,6 +53,12 @@ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5"> <FormatCode>#,###.00</FormatCode> </FormatElement> + <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70"> + <FormatCode>#,##0_);(#,##0)</FormatCode> + </FormatElement> + <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71"> + <FormatCode>#,##0.00_);(#,##0.00)</FormatCode> + </FormatElement> <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6"> <FormatCode>0.00E+000</FormatCode> </FormatElement> diff --git a/i18npool/source/localedata/data/et_EE.xml b/i18npool/source/localedata/data/et_EE.xml index 2509c52840bd..6b215affbfb6 100644 --- a/i18npool/source/localedata/data/et_EE.xml +++ b/i18npool/source/localedata/data/et_EE.xml @@ -311,7 +311,14 @@ </Calendar> </LC_CALENDAR> <LC_CURRENCY> - <Currency default="true" usedInCompatibleFormatCodes="true"> + <Currency default="true" usedInCompatibleFormatCodes="false"> + <CurrencyID>EUR</CurrencyID> + <CurrencySymbol>€</CurrencySymbol> + <BankSymbol>EUR</BankSymbol> + <CurrencyName>Euro</CurrencyName> + <DecimalPlaces>2</DecimalPlaces> + </Currency> + <Currency default="false" usedInCompatibleFormatCodes="true"> <CurrencyID>EEK</CurrencyID> <CurrencySymbol>kr</CurrencySymbol> <BankSymbol>EEK</BankSymbol> diff --git a/i18npool/source/localedata/data/hu_HU.xml b/i18npool/source/localedata/data/hu_HU.xml index f8ddd785567d..2f52515cd305 100644 --- a/i18npool/source/localedata/data/hu_HU.xml +++ b/i18npool/source/localedata/data/hu_HU.xml @@ -329,8 +329,8 @@ <quarter2Word>II. negyedév</quarter2Word> <quarter3Word>III. negyedév</quarter3Word> <quarter4Word>IV. negyedév</quarter4Word> - <aboveWord>felett</aboveWord> - <belowWord>alatt</belowWord> + <aboveWord>fentebb</aboveWord> + <belowWord>alább</belowWord> <quarter1Abbreviation>N1</quarter1Abbreviation> <quarter2Abbreviation>N2</quarter2Abbreviation> <quarter3Abbreviation>N3</quarter3Abbreviation> diff --git a/i18npool/source/localedata/data/kab_DZ.xml b/i18npool/source/localedata/data/kab_DZ.xml new file mode 100644 index 000000000000..41e3ab270518 --- /dev/null +++ b/i18npool/source/localedata/data/kab_DZ.xml @@ -0,0 +1,358 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE Locale SYSTEM 'locale.dtd'> +<Locale versionDTD="2.0.3" allowUpdateFromCLDR="no" version="1.0"> +<LC_INFO> +<Language> +<LangID>kab</LangID> +<DefaultName>Kabyle</DefaultName> +</Language> +<Country> +<CountryID>DZ</CountryID> +<DefaultName>Algeria</DefaultName> +</Country> +</LC_INFO> +<LC_CTYPE unoid="generic"> +<Separators> +<DateSeparator>/</DateSeparator> +<ThousandSeparator>.</ThousandSeparator> +<DecimalSeparator>,</DecimalSeparator> +<TimeSeparator>:</TimeSeparator> +<Time100SecSeparator>,</Time100SecSeparator> +<ListSeparator>;</ListSeparator> +<LongDateDayOfWeekSeparator>, </LongDateDayOfWeekSeparator> +<LongDateDaySeparator>, </LongDateDaySeparator> +<LongDateMonthSeparator> </LongDateMonthSeparator> +<LongDateYearSeparator> </LongDateYearSeparator> +</Separators> +<Markers> +<QuotationStart>‘</QuotationStart> +<QuotationEnd>’</QuotationEnd> +<DoubleQuotationStart>“</DoubleQuotationStart> +<DoubleQuotationEnd>”</DoubleQuotationEnd> +</Markers> +<TimeAM>n tufat</TimeAM> +<TimePM>n tmeddit</TimePM> +<MeasurementSystem>metric</MeasurementSystem> +</LC_CTYPE> +<LC_FORMAT replaceFrom="[CURRENCY]" replaceTo=""> +<FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER" formatindex="0"> +<FormatCode>General</FormatCode> +</FormatElement> +<FormatElement msgid="FixedFormatskey2" default="true" type="short" usage="FIXED_NUMBER" formatindex="1"> +<FormatCode>0</FormatCode> +</FormatElement> +<FormatElement msgid="FixedFormatskey3" default="false" type="medium" usage="FIXED_NUMBER" formatindex="2"> +<FormatCode>0,00</FormatCode> +</FormatElement> +<FormatElement msgid="FixedFormatskey4" default="false" type="short" usage="FIXED_NUMBER" formatindex="3"> +<FormatCode>#.##0</FormatCode> +</FormatElement> +<FormatElement msgid="FixedFormatskey5" default="false" type="medium" usage="FIXED_NUMBER" formatindex="4"> +<FormatCode>#.##0,00</FormatCode> +</FormatElement> +<FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5"> +<FormatCode>#.###,00</FormatCode> +</FormatElement> +<FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6"> +<FormatCode>0,00E+00</FormatCode> +</FormatElement> +<FormatElement msgid="ScientificFormatskey2" default="false" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="7"> +<FormatCode>0,00E+000</FormatCode> +</FormatElement> +<FormatElement msgid="PercentFormatskey1" default="true" type="short" usage="PERCENT_NUMBER" formatindex="8"> +<FormatCode>0%</FormatCode> +</FormatElement> +<FormatElement msgid="PercentFormatskey2" default="true" type="long" usage="PERCENT_NUMBER" formatindex="9"> +<FormatCode>0,00%</FormatCode> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey1" default="true" type="short" usage="CURRENCY" formatindex="12"> +<FormatCode>[CURRENCY]#.##0;-[CURRENCY]#.##0</FormatCode> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey2" default="false" type="medium" usage="CURRENCY" formatindex="13"> +<FormatCode>[CURRENCY]#.##0,00;-[CURRENCY]#,##0,00</FormatCode> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey3" default="false" type="medium" usage="CURRENCY" formatindex="14"> +<FormatCode>[CURRENCY]#.##0;[RED]-[CURRENCY]#.##0</FormatCode> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey4" default="true" type="medium" usage="CURRENCY" formatindex="15"> +<FormatCode>[CURRENCY]#.##0,00;[RED]-[CURRENCY]#.##0,00</FormatCode> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey5" default="false" type="medium" usage="CURRENCY" formatindex="16"> +<FormatCode>CCC#.##0,00</FormatCode> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey6" default="false" type="medium" usage="CURRENCY" formatindex="17"> +<FormatCode>[CURRENCY]#.##0,--;[RED]-[CURRENCY]#.##0,--</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey11" default="true" type="short" usage="DATE" formatindex="18"> +<FormatCode>D/MM/YY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey14" default="true" type="long" usage="DATE" formatindex="19"> +<FormatCode>NNNNDD, MMMM YYYY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey6" default="true" type="medium" usage="DATE" formatindex="20"> +<FormatCode>DD/MM/YY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey5" default="false" type="medium" usage="DATE" formatindex="21"> +<FormatCode>DD/MM/YYYY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey15" default="false" type="long" usage="DATE" formatindex="22"> +<FormatCode>D, MMM YY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey16" default="false" type="long" usage="DATE" formatindex="23"> +<FormatCode>D, MMM YYYY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey21" default="false" type="long" usage="DATE" formatindex="24"> +<FormatCode>D, MMM YYYY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey17" default="false" type="long" usage="DATE" formatindex="25"> +<FormatCode>D, MMMM YYYY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey22" default="false" type="long" usage="DATE" formatindex="26"> +<FormatCode>D, MMMM YY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey10" default="false" type="medium" usage="DATE" formatindex="27"> +<FormatCode>NN, DD/MMM/YY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey18" default="false" type="long" usage="DATE" formatindex="28"> +<FormatCode>NN, D, MMM YY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey19" default="false" type="long" usage="DATE" formatindex="29"> +<FormatCode>NN, D, MMMM YYYY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey20" default="false" type="long" usage="DATE" formatindex="30"> +<FormatCode>NNNND, MMMM YYYY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey12" default="false" type="short" usage="DATE" formatindex="31"> +<FormatCode>MM/DD</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey7" default="false" type="medium" usage="DATE" formatindex="32"> +<FormatCode>YY-MM-DD</FormatCode> +<DefaultName>ISO 8601</DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey8" default="false" type="medium" usage="DATE" formatindex="33"> +<FormatCode>YYYY-MM-DD</FormatCode> +<DefaultName>ISO 8601</DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey1" default="false" type="medium" usage="DATE" formatindex="34"> +<FormatCode>MM/YY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey2" default="false" type="medium" usage="DATE" formatindex="35"> +<FormatCode>MMM/DD</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey3" default="false" type="medium" usage="DATE" formatindex="36"> +<FormatCode>MMMM</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey4" default="false" type="medium" usage="DATE" formatindex="37"> +<FormatCode>QQ YY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey9" default="false" type="medium" usage="DATE" formatindex="38"> +<FormatCode>WW</FormatCode> +</FormatElement> +<FormatElement msgid="TimeFormatskey1" default="false" type="short" usage="TIME" formatindex="39"> +<FormatCode>HH:MM</FormatCode> +</FormatElement> +<FormatElement msgid="TimeFormatskey2" default="false" type="medium" usage="TIME" formatindex="40"> +<FormatCode>HH:MM:SS</FormatCode> +</FormatElement> +<FormatElement msgid="TimeFormatskey3" default="true" type="short" usage="TIME" formatindex="41"> +<FormatCode>HH:MM AM/PM</FormatCode> +</FormatElement> +<FormatElement msgid="TimeFormatskey4" default="true" type="medium" usage="TIME" formatindex="42"> +<FormatCode>HH:MM:SS AM/PM</FormatCode> +</FormatElement> +<FormatElement msgid="TimeFormatskey5" default="false" type="medium" usage="TIME" formatindex="43"> +<FormatCode>[HH]:MM:SS</FormatCode> +</FormatElement> +<FormatElement msgid="TimeFormatskey6" default="false" type="short" usage="TIME" formatindex="44"> +<FormatCode>MM:SS,00</FormatCode> +</FormatElement> +<FormatElement msgid="TimeFormatskey7" default="false" type="medium" usage="TIME" formatindex="45"> +<FormatCode>[HH]:MM:SS,00</FormatCode> +</FormatElement> +<FormatElement msgid="DateTimeFormatskey1" default="true" type="medium" usage="DATE_TIME" formatindex="46"> +<FormatCode>DD/MM/YY HH:MM</FormatCode> +</FormatElement> +<FormatElement msgid="DateTimeFormatskey2" default="false" type="medium" usage="DATE_TIME" formatindex="47"> +<FormatCode>DD/MM/YYYY HH:MM:SS AM/PM</FormatCode> +</FormatElement> +</LC_FORMAT> +<LC_COLLATION> +<Collator default="true" unoid="alphanumeric"/> +<CollationOptions> +<TransliterationModules>IGNORE_CASE</TransliterationModules> +</CollationOptions> +</LC_COLLATION> +<LC_SEARCH> +<SearchOptions> +<TransliterationModules>IGNORE_CASE</TransliterationModules> +</SearchOptions> +</LC_SEARCH> +<LC_INDEX> +<IndexKey phonetic="false" default="true" unoid="alphanumeric">[A B C Č D Ḍ E F G Ǧ H Ḥ I J K L M N P Q Γ R Ṛ S Ṣ T Ṭ U W X Y Z Ẓ Σ]</IndexKey> +<UnicodeScript>0</UnicodeScript> +<UnicodeScript>1</UnicodeScript> +<FollowPageWord>sb.dw</FollowPageWord> +<FollowPageWord>ib.dw</FollowPageWord> +</LC_INDEX> +<LC_CALENDAR> +<Calendar unoid="gregorian" default="true"> +<DaysOfWeek> +<Day> +<DayID>sun</DayID> +<DefaultAbbrvName>Yan</DefaultAbbrvName> +<DefaultFullName>Yanass</DefaultFullName> +</Day> +<Day> +<DayID>mon</DayID> +<DefaultAbbrvName>San</DefaultAbbrvName> +<DefaultFullName>Sanass</DefaultFullName> +</Day> +<Day> +<DayID>tue</DayID> +<DefaultAbbrvName>Kraḍ</DefaultAbbrvName> +<DefaultFullName>Kraḍass</DefaultFullName> +</Day> +<Day> +<DayID>wed</DayID> +<DefaultAbbrvName>Kuẓ</DefaultAbbrvName> +<DefaultFullName>Kuẓass</DefaultFullName> +</Day> +<Day> +<DayID>thu</DayID> +<DefaultAbbrvName>Sam</DefaultAbbrvName> +<DefaultFullName>Samass</DefaultFullName> +</Day> +<Day> +<DayID>fri</DayID> +<DefaultAbbrvName>Sḍis</DefaultAbbrvName> +<DefaultFullName>Sḍisass</DefaultFullName> +</Day> +<Day> +<DayID>sat</DayID> +<DefaultAbbrvName>Say</DefaultAbbrvName> +<DefaultFullName>Sayass</DefaultFullName> +</Day> +</DaysOfWeek> +<MonthsOfYear> +<Month> +<MonthID>jan</MonthID> +<DefaultAbbrvName>Yen</DefaultAbbrvName> +<DefaultFullName>Yennayer</DefaultFullName> +</Month> +<Month> +<MonthID>feb</MonthID> +<DefaultAbbrvName>Fur</DefaultAbbrvName> +<DefaultFullName>Fuṛar</DefaultFullName> +</Month> +<Month> +<MonthID>mar</MonthID> +<DefaultAbbrvName>Meɣ</DefaultAbbrvName> +<DefaultFullName>Meɣres</DefaultFullName> +</Month> +<Month> +<MonthID>apr</MonthID> +<DefaultAbbrvName>Yeb</DefaultAbbrvName> +<DefaultFullName>Yebrir</DefaultFullName> +</Month> +<Month> +<MonthID>may</MonthID> +<DefaultAbbrvName>May</DefaultAbbrvName> +<DefaultFullName>Mayyu</DefaultFullName> +</Month> +<Month> +<MonthID>jun</MonthID> +<DefaultAbbrvName>Yun</DefaultAbbrvName> +<DefaultFullName>Yunyu</DefaultFullName> +</Month> +<Month> +<MonthID>jul</MonthID> +<DefaultAbbrvName>Yul</DefaultAbbrvName> +<DefaultFullName>Yulyu</DefaultFullName> +</Month> +<Month> +<MonthID>aug</MonthID> +<DefaultAbbrvName>Ɣuc</DefaultAbbrvName> +<DefaultFullName>Ɣuct</DefaultFullName> +</Month> +<Month> +<MonthID>sep</MonthID> +<DefaultAbbrvName>Cte</DefaultAbbrvName> +<DefaultFullName>Ctembeṛ</DefaultFullName> +</Month> +<Month> +<MonthID>oct</MonthID> +<DefaultAbbrvName>Tub</DefaultAbbrvName> +<DefaultFullName>Tubeṛ</DefaultFullName> +</Month> +<Month> +<MonthID>nov</MonthID> +<DefaultAbbrvName>Nun</DefaultAbbrvName> +<DefaultFullName>Nunembeṛ</DefaultFullName> +</Month> +<Month> +<MonthID>dec</MonthID> +<DefaultAbbrvName>Duǧ</DefaultAbbrvName> +<DefaultFullName>Duǧembeṛ</DefaultFullName> +</Month> +</MonthsOfYear> +<Eras> +<Era> +<EraID>bc</EraID> +<DefaultAbbrvName>Snd.Σ</DefaultAbbrvName> +<DefaultFullName>Send Ɛisa</DefaultFullName> +</Era> +<Era> +<EraID>ad</EraID> +<DefaultAbbrvName>sld.Σ</DefaultAbbrvName> +<DefaultFullName>Seld Σisa</DefaultFullName> +</Era> +</Eras> +<StartDayOfWeek> +<DayID>sun</DayID> +</StartDayOfWeek> +<MinimalDaysInFirstWeek>1</MinimalDaysInFirstWeek> +</Calendar> +</LC_CALENDAR> +<LC_CURRENCY> +<Currency default="true" usedInCompatibleFormatCodes="true"> +<CurrencyID>DZD</CurrencyID> +<CurrencySymbol>DA</CurrencySymbol> +<BankSymbol>DZD</BankSymbol> +<CurrencyName>Adinar Azzayri</CurrencyName> +<DecimalPlaces>2</DecimalPlaces> +</Currency> +</LC_CURRENCY> +<LC_TRANSLITERATION> +<Transliteration unoid="LOWERCASE_UPPERCASE"/> +<Transliteration unoid="UPPERCASE_LOWERCASE"/> +<Transliteration unoid="IGNORE_CASE"/> +</LC_TRANSLITERATION> +<LC_MISC> +<ReservedWords> +<trueWord>ih</trueWord> +<falseWord>ala</falseWord> +<quarter1Word>akraḍaggur amenzu</quarter1Word> +<quarter2Word>akraḍaggur wis-sin</quarter2Word> +<quarter3Word>akraḍaggur wis-kraḍ</quarter3Word> +<quarter4Word>akraḍaggur wis-kuẓ</quarter4Word> +<aboveWord>Nnig</aboveWord> +<belowWord>Ddaw</belowWord> +<quarter1Abbreviation>Kḍg1</quarter1Abbreviation> +<quarter2Abbreviation>Kḍg2</quarter2Abbreviation> +<quarter3Abbreviation>Kḍg3</quarter3Abbreviation> +<quarter4Abbreviation>Kḍg4</quarter4Abbreviation> +</ReservedWords> +</LC_MISC> +<LC_NumberingLevel> +<NumberingLevel NumType="4" Prefix=" " Suffix=")"/> +<NumberingLevel NumType="4" Prefix=" " Suffix="."/> +<NumberingLevel NumType="4" Prefix="(" Suffix=")"/> +<NumberingLevel NumType="2" Prefix=" " Suffix="."/> +<NumberingLevel NumType="0" Prefix=" " Suffix=")"/> +<NumberingLevel NumType="1" Prefix=" " Suffix=")"/> +<NumberingLevel NumType="1" Prefix="(" Suffix=")"/> +<NumberingLevel NumType="3" Prefix=" " Suffix="."/> +</LC_NumberingLevel> +<LC_OutLineNumberingLevel ref="en_US"/> +</Locale> +<!--Version 1.0 --> diff --git a/i18npool/source/localedata/data/localedata_others.map b/i18npool/source/localedata/data/localedata_others.map index 46f4c4f74aea..de7a2312bfb9 100644 --- a/i18npool/source/localedata/data/localedata_others.map +++ b/i18npool/source/localedata/data/localedata_others.map @@ -33,6 +33,7 @@ getAllCalendars_ia; getAllCalendars_id_ID; getAllCalendars_ja_JP; getAllCalendars_jbo; +getAllCalendars_kab_DZ; getAllCalendars_kk_KZ; getAllCalendars_km_KH; getAllCalendars_kn_IN; @@ -56,6 +57,7 @@ getAllCalendars_om_ET; getAllCalendars_or_IN; getAllCalendars_pa_IN; getAllCalendars_plt_MG; +getAllCalendars_pt_AO; getAllCalendars_rw_RW; getAllCalendars_sg_CF; getAllCalendars_shs_CA; @@ -117,6 +119,7 @@ getAllCurrencies_ia; getAllCurrencies_id_ID; getAllCurrencies_ja_JP; getAllCurrencies_jbo; +getAllCurrencies_kab_DZ; getAllCurrencies_kk_KZ; getAllCurrencies_km_KH; getAllCurrencies_kn_IN; @@ -140,6 +143,7 @@ getAllCurrencies_om_ET; getAllCurrencies_or_IN; getAllCurrencies_pa_IN; getAllCurrencies_plt_MG; +getAllCurrencies_pt_AO; getAllCurrencies_rw_RW; getAllCurrencies_sg_CF; getAllCurrencies_shs_CA; @@ -201,6 +205,7 @@ getAllFormats0_ia; getAllFormats0_id_ID; getAllFormats0_ja_JP; getAllFormats0_jbo; +getAllFormats0_kab_DZ; getAllFormats0_kk_KZ; getAllFormats0_km_KH; getAllFormats0_kn_IN; @@ -224,6 +229,7 @@ getAllFormats0_om_ET; getAllFormats0_or_IN; getAllFormats0_pa_IN; getAllFormats0_plt_MG; +getAllFormats0_pt_AO; getAllFormats0_rw_RW; getAllFormats0_sg_CF; getAllFormats0_shs_CA; @@ -285,6 +291,7 @@ getBreakIteratorRules_ia; getBreakIteratorRules_id_ID; getBreakIteratorRules_ja_JP; getBreakIteratorRules_jbo; +getBreakIteratorRules_kab_DZ; getBreakIteratorRules_kk_KZ; getBreakIteratorRules_km_KH; getBreakIteratorRules_kn_IN; @@ -308,6 +315,7 @@ getBreakIteratorRules_om_ET; getBreakIteratorRules_or_IN; getBreakIteratorRules_pa_IN; getBreakIteratorRules_plt_MG; +getBreakIteratorRules_pt_AO; getBreakIteratorRules_rw_RW; getBreakIteratorRules_sg_CF; getBreakIteratorRules_shs_CA; @@ -369,6 +377,7 @@ getCollationOptions_ia; getCollationOptions_id_ID; getCollationOptions_ja_JP; getCollationOptions_jbo; +getCollationOptions_kab_DZ; getCollationOptions_kk_KZ; getCollationOptions_km_KH; getCollationOptions_kn_IN; @@ -392,6 +401,7 @@ getCollationOptions_om_ET; getCollationOptions_or_IN; getCollationOptions_pa_IN; getCollationOptions_plt_MG; +getCollationOptions_pt_AO; getCollationOptions_rw_RW; getCollationOptions_sg_CF; getCollationOptions_shs_CA; @@ -453,6 +463,7 @@ getCollatorImplementation_ia; getCollatorImplementation_id_ID; getCollatorImplementation_ja_JP; getCollatorImplementation_jbo; +getCollatorImplementation_kab_DZ; getCollatorImplementation_kk_KZ; getCollatorImplementation_km_KH; getCollatorImplementation_kn_IN; @@ -476,6 +487,7 @@ getCollatorImplementation_om_ET; getCollatorImplementation_or_IN; getCollatorImplementation_pa_IN; getCollatorImplementation_plt_MG; +getCollatorImplementation_pt_AO; getCollatorImplementation_rw_RW; getCollatorImplementation_sg_CF; getCollatorImplementation_shs_CA; @@ -537,6 +549,7 @@ getContinuousNumberingLevels_ia; getContinuousNumberingLevels_id_ID; getContinuousNumberingLevels_ja_JP; getContinuousNumberingLevels_jbo; +getContinuousNumberingLevels_kab_DZ; getContinuousNumberingLevels_kk_KZ; getContinuousNumberingLevels_km_KH; getContinuousNumberingLevels_kn_IN; @@ -560,6 +573,7 @@ getContinuousNumberingLevels_om_ET; getContinuousNumberingLevels_or_IN; getContinuousNumberingLevels_pa_IN; getContinuousNumberingLevels_plt_MG; +getContinuousNumberingLevels_pt_AO; getContinuousNumberingLevels_rw_RW; getContinuousNumberingLevels_sg_CF; getContinuousNumberingLevels_shs_CA; @@ -621,6 +635,7 @@ getFollowPageWords_ia; getFollowPageWords_id_ID; getFollowPageWords_ja_JP; getFollowPageWords_jbo; +getFollowPageWords_kab_DZ; getFollowPageWords_kk_KZ; getFollowPageWords_km_KH; getFollowPageWords_kn_IN; @@ -644,6 +659,7 @@ getFollowPageWords_om_ET; getFollowPageWords_or_IN; getFollowPageWords_pa_IN; getFollowPageWords_plt_MG; +getFollowPageWords_pt_AO; getFollowPageWords_rw_RW; getFollowPageWords_sg_CF; getFollowPageWords_shs_CA; @@ -705,6 +721,7 @@ getForbiddenCharacters_ia; getForbiddenCharacters_id_ID; getForbiddenCharacters_ja_JP; getForbiddenCharacters_jbo; +getForbiddenCharacters_kab_DZ; getForbiddenCharacters_kk_KZ; getForbiddenCharacters_km_KH; getForbiddenCharacters_kn_IN; @@ -728,6 +745,7 @@ getForbiddenCharacters_om_ET; getForbiddenCharacters_or_IN; getForbiddenCharacters_pa_IN; getForbiddenCharacters_plt_MG; +getForbiddenCharacters_pt_AO; getForbiddenCharacters_rw_RW; getForbiddenCharacters_sg_CF; getForbiddenCharacters_shs_CA; @@ -789,6 +807,7 @@ getIndexAlgorithm_ia; getIndexAlgorithm_id_ID; getIndexAlgorithm_ja_JP; getIndexAlgorithm_jbo; +getIndexAlgorithm_kab_DZ; getIndexAlgorithm_kk_KZ; getIndexAlgorithm_km_KH; getIndexAlgorithm_kn_IN; @@ -812,6 +831,7 @@ getIndexAlgorithm_om_ET; getIndexAlgorithm_or_IN; getIndexAlgorithm_pa_IN; getIndexAlgorithm_plt_MG; +getIndexAlgorithm_pt_AO; getIndexAlgorithm_rw_RW; getIndexAlgorithm_sg_CF; getIndexAlgorithm_shs_CA; @@ -873,6 +893,7 @@ getLCInfo_ia; getLCInfo_id_ID; getLCInfo_ja_JP; getLCInfo_jbo; +getLCInfo_kab_DZ; getLCInfo_kk_KZ; getLCInfo_km_KH; getLCInfo_kn_IN; @@ -896,6 +917,7 @@ getLCInfo_om_ET; getLCInfo_or_IN; getLCInfo_pa_IN; getLCInfo_plt_MG; +getLCInfo_pt_AO; getLCInfo_rw_RW; getLCInfo_sg_CF; getLCInfo_shs_CA; @@ -957,6 +979,7 @@ getLocaleItem_ia; getLocaleItem_id_ID; getLocaleItem_ja_JP; getLocaleItem_jbo; +getLocaleItem_kab_DZ; getLocaleItem_kk_KZ; getLocaleItem_km_KH; getLocaleItem_kn_IN; @@ -980,6 +1003,7 @@ getLocaleItem_om_ET; getLocaleItem_or_IN; getLocaleItem_pa_IN; getLocaleItem_plt_MG; +getLocaleItem_pt_AO; getLocaleItem_rw_RW; getLocaleItem_sg_CF; getLocaleItem_shs_CA; @@ -1041,6 +1065,7 @@ getOutlineNumberingLevels_ia; getOutlineNumberingLevels_id_ID; getOutlineNumberingLevels_ja_JP; getOutlineNumberingLevels_jbo; +getOutlineNumberingLevels_kab_DZ; getOutlineNumberingLevels_kk_KZ; getOutlineNumberingLevels_km_KH; getOutlineNumberingLevels_kn_IN; @@ -1064,6 +1089,7 @@ getOutlineNumberingLevels_om_ET; getOutlineNumberingLevels_or_IN; getOutlineNumberingLevels_pa_IN; getOutlineNumberingLevels_plt_MG; +getOutlineNumberingLevels_pt_AO; getOutlineNumberingLevels_rw_RW; getOutlineNumberingLevels_sg_CF; getOutlineNumberingLevels_shs_CA; @@ -1125,6 +1151,7 @@ getReservedWords_ia; getReservedWords_id_ID; getReservedWords_ja_JP; getReservedWords_jbo; +getReservedWords_kab_DZ; getReservedWords_kk_KZ; getReservedWords_km_KH; getReservedWords_kn_IN; @@ -1148,6 +1175,7 @@ getReservedWords_om_ET; getReservedWords_or_IN; getReservedWords_pa_IN; getReservedWords_plt_MG; +getReservedWords_pt_AO; getReservedWords_rw_RW; getReservedWords_sg_CF; getReservedWords_shs_CA; @@ -1209,6 +1237,7 @@ getSearchOptions_ia; getSearchOptions_id_ID; getSearchOptions_ja_JP; getSearchOptions_jbo; +getSearchOptions_kab_DZ; getSearchOptions_kk_KZ; getSearchOptions_km_KH; getSearchOptions_kn_IN; @@ -1232,6 +1261,7 @@ getSearchOptions_om_ET; getSearchOptions_or_IN; getSearchOptions_pa_IN; getSearchOptions_plt_MG; +getSearchOptions_pt_AO; getSearchOptions_rw_RW; getSearchOptions_sg_CF; getSearchOptions_shs_CA; @@ -1293,6 +1323,7 @@ getTransliterations_ia; getTransliterations_id_ID; getTransliterations_ja_JP; getTransliterations_jbo; +getTransliterations_kab_DZ; getTransliterations_kk_KZ; getTransliterations_km_KH; getTransliterations_kn_IN; @@ -1316,6 +1347,7 @@ getTransliterations_om_ET; getTransliterations_or_IN; getTransliterations_pa_IN; getTransliterations_plt_MG; +getTransliterations_pt_AO; getTransliterations_rw_RW; getTransliterations_sg_CF; getTransliterations_shs_CA; @@ -1377,6 +1409,7 @@ getUnicodeScripts_ia; getUnicodeScripts_id_ID; getUnicodeScripts_ja_JP; getUnicodeScripts_jbo; +getUnicodeScripts_kab_DZ; getUnicodeScripts_kk_KZ; getUnicodeScripts_km_KH; getUnicodeScripts_kn_IN; @@ -1400,6 +1433,7 @@ getUnicodeScripts_om_ET; getUnicodeScripts_or_IN; getUnicodeScripts_pa_IN; getUnicodeScripts_plt_MG; +getUnicodeScripts_pt_AO; getUnicodeScripts_rw_RW; getUnicodeScripts_sg_CF; getUnicodeScripts_shs_CA; diff --git a/i18npool/source/localedata/data/makefile.mk b/i18npool/source/localedata/data/makefile.mk index 54b412d75205..0e1e44ed8bb7 100644 --- a/i18npool/source/localedata/data/makefile.mk +++ b/i18npool/source/localedata/data/makefile.mk @@ -273,6 +273,7 @@ SHL4OBJS= \ $(SLO)$/localedata_id_ID.obj \ $(SLO)$/localedata_ja_JP.obj \ $(SLO)$/localedata_jbo.obj \ + $(SLO)$/localedata_kab_DZ.obj \ $(SLO)$/localedata_kk_KZ.obj \ $(SLO)$/localedata_km_KH.obj \ $(SLO)$/localedata_kn_IN.obj \ @@ -296,6 +297,7 @@ SHL4OBJS= \ $(SLO)$/localedata_or_IN.obj \ $(SLO)$/localedata_pa_IN.obj \ $(SLO)$/localedata_plt_MG.obj \ + $(SLO)$/localedata_pt_AO.obj \ $(SLO)$/localedata_rw_RW.obj \ $(SLO)$/localedata_sg_CF.obj \ $(SLO)$/localedata_shs_CA.obj \ diff --git a/i18npool/source/localedata/data/mr_IN.xml b/i18npool/source/localedata/data/mr_IN.xml index efc238f04a2a..efc238f04a2a 100755..100644 --- a/i18npool/source/localedata/data/mr_IN.xml +++ b/i18npool/source/localedata/data/mr_IN.xml diff --git a/i18npool/source/localedata/data/pt_AO.xml b/i18npool/source/localedata/data/pt_AO.xml new file mode 100644 index 000000000000..f1bb92becf05 --- /dev/null +++ b/i18npool/source/localedata/data/pt_AO.xml @@ -0,0 +1,373 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE Locale SYSTEM 'locale.dtd'> +<Locale versionDTD="2.0.3" allowUpdateFromCLDR="no" version="1.2"> +<LC_INFO> +<Language> +<LangID>pt</LangID> +<DefaultName>Portuguese</DefaultName> +</Language> +<Country> +<CountryID>AO</CountryID> +<DefaultName>Angola</DefaultName> +</Country> +</LC_INFO> +<LC_CTYPE unoid="generic"> +<Separators> +<DateSeparator>-</DateSeparator> +<ThousandSeparator>.</ThousandSeparator> +<DecimalSeparator>,</DecimalSeparator> +<TimeSeparator>:</TimeSeparator> +<Time100SecSeparator>,</Time100SecSeparator> +<ListSeparator>;</ListSeparator> +<LongDateDayOfWeekSeparator>, </LongDateDayOfWeekSeparator> +<LongDateDaySeparator> de </LongDateDaySeparator> +<LongDateMonthSeparator> de </LongDateMonthSeparator> +<LongDateYearSeparator> </LongDateYearSeparator> +</Separators> +<Markers> +<QuotationStart>‘</QuotationStart> +<QuotationEnd>’</QuotationEnd> +<DoubleQuotationStart>“</DoubleQuotationStart> +<DoubleQuotationEnd>”</DoubleQuotationEnd> +</Markers> +<TimeAM>AM</TimeAM> +<TimePM>PM</TimePM> +<MeasurementSystem>Metric</MeasurementSystem> +</LC_CTYPE> +<LC_FORMAT> +<FormatElement msgid="DateFormatskey1" default="true" type="short" usage="DATE" formatindex="18"> +<FormatCode>DD-MM-AAAA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey2" default="false" type="medium" usage="DATE" formatindex="28"> +<FormatCode>NN DD-MMM AA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey3" default="false" type="medium" usage="DATE" formatindex="34"> +<FormatCode>MM-AA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey4" default="false" type="medium" usage="DATE" formatindex="35"> +<FormatCode>DD-MMM</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey5" default="false" type="medium" usage="DATE" formatindex="36"> +<FormatCode>MMMM</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey6" default="false" type="medium" usage="DATE" formatindex="37"> +<FormatCode>QQ AA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey7" default="false" type="medium" usage="DATE" formatindex="21"> +<FormatCode>DD-MM-AAAA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey8" default="true" type="medium" usage="DATE" formatindex="20"> +<FormatCode>DD-MM-AA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey9" default="true" type="long" usage="DATE" formatindex="19"> +<FormatCode>NNNND "de" MMMM "de" AAAA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey10" default="false" type="long" usage="DATE" formatindex="22"> +<FormatCode>D "de" MMM "de" AA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey11" default="false" type="long" usage="DATE" formatindex="23"> +<FormatCode>D "de" MMM "de" AAAA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey12" default="false" type="long" usage="DATE" formatindex="25"> +<FormatCode>D "de" MMMM "de" AAAA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey13" default="false" type="long" usage="DATE" formatindex="27"> +<FormatCode>NN, D "de" MMM "de" AA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey14" default="false" type="long" usage="DATE" formatindex="29"> +<FormatCode>NN, D "de" MMMM "de" AAAA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey15" default="false" type="long" usage="DATE" formatindex="30"> +<FormatCode>NNNND "de" MMMM "de" AAAA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey16" default="false" type="long" usage="DATE" formatindex="24"> +<FormatCode>D. MMM. AAAA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey17" default="false" type="long" usage="DATE" formatindex="26"> +<FormatCode>D. MMMM AAAA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey18" default="false" type="short" usage="DATE" formatindex="31"> +<FormatCode>MM-DD</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey19" default="false" type="medium" usage="DATE" formatindex="32"> +<FormatCode>AA-MM-DD</FormatCode> +<DefaultName>ISO 8601 (EN 28601)</DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey20" default="false" type="medium" usage="DATE" formatindex="33"> +<FormatCode>AAAA-MM-DD</FormatCode> +<DefaultName>ISO 8601 (EN 28601)</DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey21" default="false" type="medium" usage="DATE" formatindex="38"> +<FormatCode>WW</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="TimeFormatskey1" default="true" type="short" usage="TIME" formatindex="39"> +<FormatCode>HH:MM</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="TimeFormatskey2" default="true" type="medium" usage="TIME" formatindex="40"> +<FormatCode>HH:MM:SS</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="TimeFormatskey3" default="false" type="short" usage="TIME" formatindex="41"> +<FormatCode>HH:MM AM/PM</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="TimeFormatskey4" default="false" type="medium" usage="TIME" formatindex="42"> +<FormatCode>HH:MM:SS AM/PM</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="TimeFormatskey5" default="false" type="medium" usage="TIME" formatindex="43"> +<FormatCode>[HH]:MM:SS</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="TimeFormatskey6" default="false" type="short" usage="TIME" formatindex="44"> +<FormatCode>MM:SS,00</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="TimeFormatskey7" default="false" type="medium" usage="TIME" formatindex="45"> +<FormatCode>[HH]:MM:SS,00</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateTimeFormatskey1" default="true" type="medium" usage="DATE_TIME" formatindex="46"> +<FormatCode>DD-MM-AA HH:MM</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateTimeFormatskey2" default="false" type="medium" usage="DATE_TIME" formatindex="47"> +<FormatCode>DD-MM-AAAA HH:MM:SS</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER" formatindex="0"> +<FormatCode>Estandar</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="FixedFormatskey2" default="true" type="short" usage="FIXED_NUMBER" formatindex="1"> +<FormatCode>0</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="FixedFormatskey3" default="false" type="medium" usage="FIXED_NUMBER" formatindex="2"> +<FormatCode>0,00</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="FixedFormatskey4" default="false" type="short" usage="FIXED_NUMBER" formatindex="3"> +<FormatCode>#.##0</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="FixedFormatskey5" default="false" type="medium" usage="FIXED_NUMBER" formatindex="4"> +<FormatCode>#.##0,00</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5"> +<FormatCode>#.###,00</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey1" default="true" type="short" usage="CURRENCY" formatindex="12"> +<FormatCode>#.##0 [$Kz-816];-#.##0 [$Kz-816]</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey2" default="false" type="medium" usage="CURRENCY" formatindex="13"> +<FormatCode>#.##0,00 [$Kz-816];-#.##0,00 [$Kz-816]</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey3" default="false" type="medium" usage="CURRENCY" formatindex="14"> +<FormatCode>#.##0 [$Kz-816];[RED]-#.##0 [$Kz-816]</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey4" default="true" type="medium" usage="CURRENCY" formatindex="15"> +<FormatCode>#.##0,00 [$Kz-816];[RED]-#.##0,00 [$Kz-816]</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey5" default="false" type="medium" usage="CURRENCY" formatindex="16"> +<FormatCode>#.##0,00 CCC</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey6" default="false" type="medium" usage="CURRENCY" formatindex="17"> +<FormatCode>#.##0,-- [$Kz-816];[RED]-#.##0,-- [$Kz-816]</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="PercentFormatskey1" default="true" type="short" usage="PERCENT_NUMBER" formatindex="8"> +<FormatCode>0%</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="PercentFormatskey2" default="true" type="long" usage="PERCENT_NUMBER" formatindex="9"> +<FormatCode>0,00%</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6"> +<FormatCode>0,00E+000</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="ScientificFormatskey2" default="false" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="7"> +<FormatCode>0,00E+00</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +</LC_FORMAT> +<LC_COLLATION ref="en_US"/> +<LC_SEARCH ref="en_US"/> +<LC_INDEX ref="en_US"/> +<LC_CALENDAR> +<Calendar unoid="gregorian" default="true"> +<DaysOfWeek> +<Day> +<DayID>sun</DayID> +<DefaultAbbrvName>Dom</DefaultAbbrvName> +<DefaultFullName>Domingo</DefaultFullName> +</Day> +<Day> +<DayID>mon</DayID> +<DefaultAbbrvName>Seg</DefaultAbbrvName> +<DefaultFullName>Segunda-feira</DefaultFullName> +</Day> +<Day> +<DayID>tue</DayID> +<DefaultAbbrvName>Ter</DefaultAbbrvName> +<DefaultFullName>Terça-feira</DefaultFullName> +</Day> +<Day> +<DayID>wed</DayID> +<DefaultAbbrvName>Qua</DefaultAbbrvName> +<DefaultFullName>Quarta-feira</DefaultFullName> +</Day> +<Day> +<DayID>thu</DayID> +<DefaultAbbrvName>Qui</DefaultAbbrvName> +<DefaultFullName>Quinta-feira</DefaultFullName> +</Day> +<Day> +<DayID>fri</DayID> +<DefaultAbbrvName>Sex</DefaultAbbrvName> +<DefaultFullName>Sexta-feira</DefaultFullName> +</Day> +<Day> +<DayID>sat</DayID> +<DefaultAbbrvName>Sáb</DefaultAbbrvName> +<DefaultFullName>Sábado</DefaultFullName> +</Day> +</DaysOfWeek> +<MonthsOfYear> +<Month> +<MonthID>jan</MonthID> +<DefaultAbbrvName>Jan</DefaultAbbrvName> +<DefaultFullName>Janeiro</DefaultFullName> +</Month> +<Month> +<MonthID>feb</MonthID> +<DefaultAbbrvName>Fev</DefaultAbbrvName> +<DefaultFullName>Fevereiro</DefaultFullName> +</Month> +<Month> +<MonthID>mar</MonthID> +<DefaultAbbrvName>Mar</DefaultAbbrvName> +<DefaultFullName>Março</DefaultFullName> +</Month> +<Month> +<MonthID>apr</MonthID> +<DefaultAbbrvName>Abr</DefaultAbbrvName> +<DefaultFullName>Abril</DefaultFullName> +</Month> +<Month> +<MonthID>may</MonthID> +<DefaultAbbrvName>Mai</DefaultAbbrvName> +<DefaultFullName>Maio</DefaultFullName> +</Month> +<Month> +<MonthID>jun</MonthID> +<DefaultAbbrvName>Jun</DefaultAbbrvName> +<DefaultFullName>Junho</DefaultFullName> +</Month> +<Month> +<MonthID>jul</MonthID> +<DefaultAbbrvName>Jul</DefaultAbbrvName> +<DefaultFullName>Julho</DefaultFullName> +</Month> +<Month> +<MonthID>aug</MonthID> +<DefaultAbbrvName>Ago</DefaultAbbrvName> +<DefaultFullName>Agosto</DefaultFullName> +</Month> +<Month> +<MonthID>sep</MonthID> +<DefaultAbbrvName>Set</DefaultAbbrvName> +<DefaultFullName>Setembro</DefaultFullName> +</Month> +<Month> +<MonthID>oct</MonthID> +<DefaultAbbrvName>Out</DefaultAbbrvName> +<DefaultFullName>Outubro</DefaultFullName> +</Month> +<Month> +<MonthID>nov</MonthID> +<DefaultAbbrvName>Nov</DefaultAbbrvName> +<DefaultFullName>Novembro</DefaultFullName> +</Month> +<Month> +<MonthID>dec</MonthID> +<DefaultAbbrvName>Dez</DefaultAbbrvName> +<DefaultFullName>Dezembro</DefaultFullName> +</Month> +</MonthsOfYear> +<Eras> +<Era> +<EraID>bc</EraID> +<DefaultAbbrvName>BC</DefaultAbbrvName> +<DefaultFullName>BC</DefaultFullName> +</Era> +<Era> +<EraID>ad</EraID> +<DefaultAbbrvName>AD</DefaultAbbrvName> +<DefaultFullName>AD</DefaultFullName> +</Era> +</Eras> +<StartDayOfWeek> +<DayID>mon</DayID> +</StartDayOfWeek> +<MinimalDaysInFirstWeek>1</MinimalDaysInFirstWeek> +</Calendar> +</LC_CALENDAR> +<LC_CURRENCY> +<Currency default="true" usedInCompatibleFormatCodes="true"> +<CurrencyID>AOA</CurrencyID> +<CurrencySymbol>Kz</CurrencySymbol> +<BankSymbol>AOA</BankSymbol> +<CurrencyName>Kwanza</CurrencyName> +<DecimalPlaces>2</DecimalPlaces> +</Currency> +</LC_CURRENCY> +<LC_TRANSLITERATION ref="en_US"/> +<LC_MISC> +<ReservedWords> +<trueWord>verdadeiro</trueWord> +<falseWord>falso</falseWord> +<quarter1Word>1º trimestre</quarter1Word> +<quarter2Word>2º trimestre</quarter2Word> +<quarter3Word>3º trimestre</quarter3Word> +<quarter4Word>4º trimestre</quarter4Word> +<aboveWord>acima</aboveWord> +<belowWord>abaixo</belowWord> +<quarter1Abbreviation>T1</quarter1Abbreviation> +<quarter2Abbreviation>T2</quarter2Abbreviation> +<quarter3Abbreviation>T3</quarter3Abbreviation> +<quarter4Abbreviation>T4</quarter4Abbreviation> +</ReservedWords> +</LC_MISC> +<LC_NumberingLevel ref="en_US"/> +<LC_OutLineNumberingLevel ref="en_US"/> +</Locale> diff --git a/i18npool/source/localedata/data/zh_TW.xml b/i18npool/source/localedata/data/zh_TW.xml index aa53647057f8..3d997136b73c 100644 --- a/i18npool/source/localedata/data/zh_TW.xml +++ b/i18npool/source/localedata/data/zh_TW.xml @@ -129,11 +129,11 @@ <DefaultName></DefaultName> </FormatElement> <FormatElement msgid="DateFormatskey7" default="false" type="medium" usage="DATE" formatindex="24"> -<FormatCode>GGGE"年"M"月"D"日"</FormatCode> +<FormatCode>GGGEE"年"M"月"D"日"</FormatCode> <DefaultName/> </FormatElement> <FormatElement msgid="DateFormatskey8" default="false" type="long" usage="DATE" formatindex="25"> -<FormatCode>GGGE"年"M"月"D"日"</FormatCode> +<FormatCode>GGGEE"年"M"月"D"日"</FormatCode> <DefaultName></DefaultName> </FormatElement> <FormatElement msgid="DateFormatskey9" default="false" type="long" usage="DATE" formatindex="26"> @@ -149,11 +149,11 @@ <DefaultName/> </FormatElement> <FormatElement msgid="DateFormatskey12" default="false" type="long" usage="DATE" formatindex="29"> -<FormatCode>GGE"年"M"月"D"日" NNNN</FormatCode> +<FormatCode>GGEE"年"M"月"D"日" NNNN</FormatCode> <DefaultName></DefaultName> </FormatElement> <FormatElement msgid="DateFormatskey13" default="false" type="long" usage="DATE" formatindex="30"> -<FormatCode>GGGE"年"M"月"D"日" NNNN</FormatCode> +<FormatCode>GGGEE"年"M"月"D"日" NNNN</FormatCode> <DefaultName></DefaultName> </FormatElement> <FormatElement msgid="DateFormatskey14" default="true" type="short" usage="DATE" formatindex="31"> @@ -161,11 +161,11 @@ <DefaultName/> </FormatElement> <FormatElement msgid="DateFormatskey15" default="false" type="medium" usage="DATE" formatindex="32"> -<FormatCode>E"年"M"月"D"日"</FormatCode> +<FormatCode>EE"年"M"月"D"日"</FormatCode> <DefaultName/> </FormatElement> <FormatElement msgid="DateFormatskey16" default="false" type="medium" usage="DATE" formatindex="33"> -<FormatCode>GGGE"年"M"月"D"日"</FormatCode> +<FormatCode>GGGEE"年"M"月"D"日"</FormatCode> <DefaultName/> </FormatElement> <FormatElement msgid="DateFormatskey17" default="false" type="short" usage="DATE" formatindex="34"> @@ -181,7 +181,7 @@ <DefaultName/> </FormatElement> <FormatElement msgid="DateFormatskey20" default="false" type="medium" usage="DATE" formatindex="37"> -<FormatCode>GGE"年度"QQ</FormatCode> +<FormatCode>GGEE"年度"QQ</FormatCode> <DefaultName/> </FormatElement> <FormatElement msgid="DateFormatskey21" default="false" type="short" usage="DATE" formatindex="38"> @@ -251,7 +251,7 @@ <DefaultName/> </FormatElement> <FormatElement msgid="DateTimeFormatskey3" default="true" type="long" usage="DATE_TIME" formatindex="56"> -<FormatCode>E"年"M"月"D"日" HH"時"MM"分"SS"秒"</FormatCode> +<FormatCode>EE"年"M"月"D"日" HH"時"MM"分"SS"秒"</FormatCode> <DefaultName/> </FormatElement> <FormatElement msgid="DateTimeFormatskey4" default="false" type="long" usage="DATE_TIME" formatindex="57"> @@ -259,11 +259,11 @@ <DefaultName/> </FormatElement> <FormatElement msgid="DateTimeFormatskey5" default="false" type="long" usage="DATE_TIME" formatindex="58"> -<FormatCode>GGE"年"M"月"D"日" HH"時"MM"分"SS"秒"</FormatCode> +<FormatCode>GGEE"年"M"月"D"日" HH"時"MM"分"SS"秒"</FormatCode> <DefaultName/> </FormatElement> <FormatElement msgid="DateTimeFormatskey6" default="false" type="long" usage="DATE_TIME" formatindex="59"> -<FormatCode>GGGE"年"M"月"D"日" HH"時"MM"分"SS"秒"</FormatCode> +<FormatCode>GGGEE"年"M"月"D"日" HH"時"MM"分"SS"秒"</FormatCode> <DefaultName/> </FormatElement> <FormatElement msgid="DateTimeFormatskey7" default="false" type="long" usage="DATE_TIME" formatindex="60"> diff --git a/i18npool/source/localedata/filewriter.cxx b/i18npool/source/localedata/filewriter.cxx index 04af1e091954..9b81e3383d63 100644 --- a/i18npool/source/localedata/filewriter.cxx +++ b/i18npool/source/localedata/filewriter.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -143,14 +144,14 @@ void OFileWriter::writeIntParameter(const sal_Char* pAsciiStr, const sal_Int16 c bool OFileWriter::writeDefaultParameter(const sal_Char* pAsciiStr, const ::rtl::OUString& str, sal_Int16 count) const { - bool bBool = (str.equalsAscii("true") ? 1 : 0); + bool bBool = (str.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("true")) ? 1 : 0); fprintf(m_f,"static const sal_Unicode default%s%d[] = {%d};\n", pAsciiStr, count, bBool); return bBool; } bool OFileWriter::writeDefaultParameter(const sal_Char* pAsciiStr, const ::rtl::OUString& str) const { - bool bBool = (str.equalsAscii("true") ? 1 : 0); + bool bBool = (str.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("true")) ? 1 : 0); fprintf(m_f,"static const sal_Unicode default%s[] = {%d};\n", pAsciiStr, bBool); return bBool; } @@ -211,3 +212,4 @@ void OFileWriter::closeOutput(void) const } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 8906a3433bea..adf74e25aef8 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,12 +35,15 @@ #include <string.h> #include <stdio.h> #include "rtl/instance.hxx" +#include <sal/macros.h> using namespace com::sun::star::i18n; using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star; -using namespace rtl; + +using ::rtl::OUString; +using ::rtl::OUStringBuffer; static const sal_Char clocaledata[] = "com.sun.star.i18n.LocaleData"; @@ -257,12 +261,14 @@ static const struct { { "lif_NP", lcl_DATA_OTHERS }, { "ur_PK", lcl_DATA_OTHERS }, { "ht_HT", lcl_DATA_OTHERS }, - { "jbo", lcl_DATA_OTHERS } + { "jbo", lcl_DATA_OTHERS }, + { "kab_DZ", lcl_DATA_OTHERS }, + { "pt_AO", lcl_DATA_OTHERS } }; static const sal_Unicode under = sal_Unicode('_'); -static const sal_Int16 nbOfLocales = sizeof(aLibTable) / sizeof(aLibTable[0]); +static const sal_Int16 nbOfLocales = SAL_N_ELEMENTS(aLibTable); struct LocaleDataLookupTableItem { @@ -291,12 +297,12 @@ LocaleData::~LocaleData() LocaleDataItem SAL_CALL LocaleData::getLocaleItem( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 dataItemCount = 0; sal_Unicode **dataItem = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getLocaleItem" ); if ( func ) { + sal_Int16 dataItemCount = 0; dataItem = func(dataItemCount); LocaleDataItem item( @@ -436,8 +442,8 @@ oslGenericFunction SAL_CALL lcl_LookupTableHelper::getFunctionSymbolByName( if ( module->loadRelative(&thisModule, aBuf.makeStringAndClear()) ) { ::osl::MutexGuard aGuard( maMutex ); - LocaleDataLookupTableItem* pNewItem = 0; - maLookupTable.push_back(pNewItem = new LocaleDataLookupTableItem(aLibTable[i].pLib, module, aLibTable[i].pLocale )); + LocaleDataLookupTableItem* pNewItem = new LocaleDataLookupTableItem(aLibTable[i].pLib, module, aLibTable[i].pLocale); + maLookupTable.push_back(pNewItem); OSL_ASSERT( pOutCachedItem ); if( pOutCachedItem ) { @@ -463,7 +469,7 @@ oslGenericFunction SAL_CALL lcl_LookupTableHelper::getFunctionSymbolByName( #define REF_ERAS 2 Sequence< CalendarItem > &LocaleData::getCalendarItemByName(const OUString& name, - const Locale& rLocale, const Sequence< Calendar >& calendarsSeq, sal_Int16 len, sal_Int16 item) + const Locale& rLocale, const Sequence< Calendar >& calendarsSeq, sal_Int16 item) throw(RuntimeException) { if (!ref_name.equals(name)) { @@ -476,7 +482,6 @@ Sequence< CalendarItem > &LocaleData::getCalendarItemByName(const OUString& name cals = calendarsSeq; } else { cals = getAllCalendars(loc); - len = sal::static_int_cast<sal_Int16>( cals.getLength() ); } const OUString& id = name.getToken(0, under, index); for (index = 0; index < cals.getLength(); index++) { @@ -488,7 +493,7 @@ Sequence< CalendarItem > &LocaleData::getCalendarItemByName(const OUString& name // Refered locale does not found, return name for en_US locale. if (index == cals.getLength()) { cals = getAllCalendars( - Locale(OUString::createFromAscii("en"), OUString::createFromAscii("US"), OUString())); + Locale(OUString(RTL_CONSTASCII_USTRINGPARAM("en")), OUString(RTL_CONSTASCII_USTRINGPARAM("US")), OUString())); if (cals.getLength() > 0) ref_cal = cals[0]; else @@ -504,12 +509,12 @@ Sequence< Calendar > SAL_CALL LocaleData::getAllCalendars( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 calendarsCount = 0; sal_Unicode **allCalendars = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getAllCalendars" ); if ( func ) { + sal_Int16 calendarsCount = 0; allCalendars = func(calendarsCount); Sequence< Calendar > calendarsSeq(calendarsCount); @@ -523,8 +528,8 @@ LocaleData::getAllCalendars( const Locale& rLocale ) throw(RuntimeException) offset++; sal_Bool defaultCalendar = sal::static_int_cast<sal_Bool>( allCalendars[offset][0] ); offset++; - if (OUString(allCalendars[offset]).equalsAscii("ref")) { - days = getCalendarItemByName(OUString(allCalendars[offset+1]), rLocale, calendarsSeq, i, REF_DAYS); + if (OUString(allCalendars[offset]).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ref"))) { + days = getCalendarItemByName(OUString(allCalendars[offset+1]), rLocale, calendarsSeq, REF_DAYS); offset += 2; } else { for(j = 0; j < allCalendars[0][i]; j++) { @@ -534,8 +539,8 @@ LocaleData::getAllCalendars( const Locale& rLocale ) throw(RuntimeException) offset += 3; } } - if (OUString(allCalendars[offset]).equalsAscii("ref")) { - months = getCalendarItemByName(OUString(allCalendars[offset+1]), rLocale, calendarsSeq, i, REF_MONTHS); + if (OUString(allCalendars[offset]).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ref"))) { + months = getCalendarItemByName(OUString(allCalendars[offset+1]), rLocale, calendarsSeq, REF_MONTHS); offset += 2; } else { for(j = 0; j < allCalendars[1][i]; j++) { @@ -545,8 +550,8 @@ LocaleData::getAllCalendars( const Locale& rLocale ) throw(RuntimeException) offset += 3; } } - if (OUString(allCalendars[offset]).equalsAscii("ref")) { - eras = getCalendarItemByName(OUString(allCalendars[offset+1]), rLocale, calendarsSeq, i, REF_ERAS); + if (OUString(allCalendars[offset]).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ref"))) { + eras = getCalendarItemByName(OUString(allCalendars[offset+1]), rLocale, calendarsSeq, REF_ERAS); offset += 2; } else { for(j = 0; j < allCalendars[2][i]; j++) { @@ -576,13 +581,12 @@ LocaleData::getAllCalendars( const Locale& rLocale ) throw(RuntimeException) Sequence< Currency2 > SAL_CALL LocaleData::getAllCurrencies2( const Locale& rLocale ) throw(RuntimeException) { - - sal_Int16 currencyCount = 0; sal_Unicode **allCurrencies = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getAllCurrencies" ); if ( func ) { + sal_Int16 currencyCount = 0; allCurrencies = func(currencyCount); Sequence< Currency2 > seq(currencyCount); @@ -680,14 +684,9 @@ LocaleData::getAllFormats( const Locale& rLocale ) throw(RuntimeException) } } section[SECTIONS]; -#if 0 -// #i79398# wntmsci10 MSVC doesn't get this right with optimization. - const sal_Int32 formatCount = section[0].getFunc( *this, rLocale, "getAllFormats0") - + section[1].getFunc( *this, rLocale, "getAllFormats1"); -#else sal_Int32 formatCount = section[0].getFunc( *this, rLocale, "getAllFormats0"); formatCount += section[1].getFunc( *this, rLocale, "getAllFormats1"); -#endif + Sequence< FormatElement > seq(formatCount); sal_Int32 f = 0; for (int s = 0; s < SECTIONS; ++s) @@ -735,12 +734,12 @@ LocaleData::getCollatorRuleByAlgorithm( const Locale& rLocale, const OUString& a Sequence< Implementation > SAL_CALL LocaleData::getCollatorImplementations( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 collatorCount = 0; sal_Unicode **collatorArray = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getCollatorImplementation" ); if ( func ) { + sal_Int16 collatorCount = 0; collatorArray = func(collatorCount); Sequence< Implementation > seq(collatorCount); for(sal_Int16 i = 0; i < collatorCount; i++) { @@ -760,12 +759,12 @@ LocaleData::getCollatorImplementations( const Locale& rLocale ) throw(RuntimeExc Sequence< OUString > SAL_CALL LocaleData::getCollationOptions( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 optionsCount = 0; sal_Unicode **optionsArray = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getCollationOptions" ); if ( func ) { + sal_Int16 optionsCount = 0; optionsArray = func(optionsCount); Sequence< OUString > seq(optionsCount); for(sal_Int16 i = 0; i < optionsCount; i++) { @@ -782,12 +781,12 @@ LocaleData::getCollationOptions( const Locale& rLocale ) throw(RuntimeException) Sequence< OUString > SAL_CALL LocaleData::getSearchOptions( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 optionsCount = 0; sal_Unicode **optionsArray = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getSearchOptions" ); if ( func ) { + sal_Int16 optionsCount = 0; optionsArray = func(optionsCount); Sequence< OUString > seq(optionsCount); for(sal_Int16 i = 0; i < optionsCount; i++) { @@ -885,7 +884,7 @@ OUString SAL_CALL LocaleData::getIndexKeysByAlgorithm( const Locale& rLocale, const OUString& algorithm ) throw(RuntimeException) { sal_Unicode **indexArray = getIndexArrayForAlgorithm(rLocale, algorithm); - return indexArray ? OUString::createFromAscii("0-9")+OUString(indexArray[2]) : OUString(); + return indexArray ? OUString(RTL_CONSTASCII_USTRINGPARAM("0-9"))+OUString(indexArray[2]) : OUString(); } OUString SAL_CALL @@ -898,12 +897,12 @@ LocaleData::getIndexModuleByAlgorithm( const Locale& rLocale, const OUString& al Sequence< UnicodeScript > SAL_CALL LocaleData::getUnicodeScripts( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 scriptCount = 0; sal_Unicode **scriptArray = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getUnicodeScripts" ); if ( func ) { + sal_Int16 scriptCount = 0; scriptArray = func(scriptCount); Sequence< UnicodeScript > seq(scriptCount); for(sal_Int16 i = 0; i < scriptCount; i++) { @@ -920,12 +919,12 @@ LocaleData::getUnicodeScripts( const Locale& rLocale ) throw(RuntimeException) Sequence< OUString > SAL_CALL LocaleData::getFollowPageWords( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 wordCount = 0; sal_Unicode **wordArray = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getFollowPageWords" ); if ( func ) { + sal_Int16 wordCount = 0; wordArray = func(wordCount); Sequence< OUString > seq(wordCount); for(sal_Int16 i = 0; i < wordCount; i++) { @@ -943,12 +942,12 @@ Sequence< OUString > SAL_CALL LocaleData::getTransliterations( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 transliterationsCount = 0; sal_Unicode **transliterationsArray = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getTransliterations" ); if ( func ) { + sal_Int16 transliterationsCount = 0; transliterationsArray = func(transliterationsCount); Sequence< OUString > seq(transliterationsCount); @@ -970,12 +969,13 @@ LocaleData::getTransliterations( const Locale& rLocale ) throw(RuntimeException) LanguageCountryInfo SAL_CALL LocaleData::getLanguageCountryInfo( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 LCInfoCount = 0; + sal_Unicode **LCInfoArray = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getLCInfo" ); if ( func ) { + sal_Int16 LCInfoCount = 0; LCInfoArray = func(LCInfoCount); LanguageCountryInfo info(LCInfoArray[0], LCInfoArray[1], @@ -995,12 +995,12 @@ LocaleData::getLanguageCountryInfo( const Locale& rLocale ) throw(RuntimeExcepti ForbiddenCharacters SAL_CALL LocaleData::getForbiddenCharacters( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 LCForbiddenCharactersCount = 0; sal_Unicode **LCForbiddenCharactersArray = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getForbiddenCharacters" ); if ( func ) { + sal_Int16 LCForbiddenCharactersCount = 0; LCForbiddenCharactersArray = func(LCForbiddenCharactersCount); ForbiddenCharacters chars(LCForbiddenCharactersArray[0], LCForbiddenCharactersArray[1]); return chars; @@ -1014,12 +1014,12 @@ LocaleData::getForbiddenCharacters( const Locale& rLocale ) throw(RuntimeExcepti OUString SAL_CALL LocaleData::getHangingCharacters( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 LCForbiddenCharactersCount = 0; sal_Unicode **LCForbiddenCharactersArray = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getForbiddenCharacters" ); if ( func ) { + sal_Int16 LCForbiddenCharactersCount = 0; LCForbiddenCharactersArray = func(LCForbiddenCharactersCount); return OUString(LCForbiddenCharactersArray[2]); } @@ -1030,12 +1030,12 @@ LocaleData::getHangingCharacters( const Locale& rLocale ) throw(RuntimeException Sequence< OUString > SAL_CALL LocaleData::getBreakIteratorRules( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 LCBreakIteratorRuleCount = 0; sal_Unicode **LCBreakIteratorRulesArray = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getBreakIteratorRules" ); if ( func ) { + sal_Int16 LCBreakIteratorRuleCount = 0; LCBreakIteratorRulesArray = func(LCBreakIteratorRuleCount); Sequence< OUString > seq(LCBreakIteratorRuleCount); for(int i = 0; i < (LCBreakIteratorRuleCount); i++) { @@ -1054,12 +1054,12 @@ LocaleData::getBreakIteratorRules( const Locale& rLocale ) throw(RuntimeExcepti Sequence< OUString > SAL_CALL LocaleData::getReservedWord( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 LCReservedWordsCount = 0; sal_Unicode **LCReservedWordsArray = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getReservedWords" ); if ( func ) { + sal_Int16 LCReservedWordsCount = 0; LCReservedWordsArray = func(LCReservedWordsCount); Sequence< OUString > seq(LCReservedWordsCount); for(int i = 0; i < (LCReservedWordsCount); i++) { @@ -1084,13 +1084,12 @@ OUString C2U( const char* s ) Sequence< Sequence<beans::PropertyValue> > SAL_CALL LocaleData::getContinuousNumberingLevels( const lang::Locale& rLocale ) throw(RuntimeException) { - int i; - // load symbol MyFunc_Type2 func = (MyFunc_Type2) getFunctionSymbol( rLocale, "getContinuousNumberingLevels" ); if ( func ) { + int i; // invoke function sal_Int16 nStyles; sal_Int16 nAttributes; @@ -1150,9 +1149,8 @@ LocaleData::getContinuousNumberingLevels( const lang::Locale& rLocale ) throw(Ru return seq1; } -// ============================================================================ -// \/ OutlineNumbering helper class \/ -// +// OutlineNumbering helper class + #include <com/sun/star/container/XIndexAccess.hpp> #include <cppuhelper/implbase1.hxx> @@ -1174,13 +1172,14 @@ struct OutlineNumberingLevel_Impl OUString sTransliteration; sal_Int32 nNatNum; }; -//----------------------------------------------------------------------------- + class OutlineNumbering : public cppu::WeakImplHelper1 < container::XIndexAccess > { + // OutlineNumbering helper class + const OutlineNumberingLevel_Impl* m_pOutlineLevels; sal_Int16 m_nCount; public: -// OutlineNumbering(const OutlineNumberingLevel_Impl* pOutlineLevels); OutlineNumbering(const OutlineNumberingLevel_Impl* pOutlineLevels, int nLevels); ~OutlineNumbering(); @@ -1194,10 +1193,6 @@ public: virtual sal_Bool SAL_CALL hasElements( ) throw(RuntimeException); }; -// -// OutlineNumbering helper class -// ============================================================================ - static sal_Char* U2C( OUString str ) { @@ -1213,13 +1208,12 @@ sal_Char* U2C( OUString str ) Sequence< Reference<container::XIndexAccess> > SAL_CALL LocaleData::getOutlineNumberingLevels( const lang::Locale& rLocale ) throw(RuntimeException) { - int i; - // load symbol MyFunc_Type3 func = (MyFunc_Type3) getFunctionSymbol( rLocale, "getOutlineNumberingLevels" ); if ( func ) { + int i; // invoke function sal_Int16 nStyles; sal_Int16 nLevels; @@ -1248,18 +1242,13 @@ LocaleData::getOutlineNumberingLevels( const lang::Locale& rLocale ) throw(Runti case 0: level[j].sPrefix = tmp; break; case 1: level[j].nNumType = sal::static_int_cast<sal_Int16>(tmp.toInt32()); break; case 2: level[j].sSuffix = tmp; break; - //case 3: level[j].cBulletChar = tmp.toChar(); break; case 3: level[j].cBulletChar = sal::static_int_cast<sal_Unicode>(tmp.toInt32(16)); break; // base 16 case 4: level[j].sBulletFontName = U2C( tmp ); break; case 5: level[j].nParentNumbering = sal::static_int_cast<sal_Int16>(tmp.toInt32()); break; case 6: level[j].nLeftMargin = tmp.toInt32(); break; case 7: level[j].nSymbolTextDistance = tmp.toInt32(); break; case 8: level[j].nFirstLineOffset = tmp.toInt32(); break; - case 9: // Adjust - // these values seem to be hard-coded elsewhere: - // level[j].Value <<= (sal_Int16) text::HoriOrientation::LEFT; - // level[j].Value <<= (sal_Int16) style::HorizontalAlignment::LEFT; - break; + case 9: break; case 10: level[j].sTransliteration = tmp; break; case 11: level[j].nNatNum = tmp.toInt32(); break; default: @@ -1288,60 +1277,81 @@ LocaleData::getOutlineNumberingLevels( const lang::Locale& rLocale ) throw(Runti } } -///////////////////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////helper functions/////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////////// +// helper functions oslGenericFunction SAL_CALL LocaleData::getFunctionSymbol( const Locale& rLocale, const sal_Char* pFunction ) throw(RuntimeException) { - lcl_LookupTableHelper & rLookupTable = lcl_LookupTableStatic::get(); + lcl_LookupTableHelper & rLookupTable = lcl_LookupTableStatic::get(); - OUStringBuffer aBuf(1); - if (cachedItem.get() && cachedItem->equals(rLocale)) { - aBuf.ensureCapacity(strlen(pFunction) + 1 + strlen(cachedItem->localeName)); - return cachedItem->module->getFunctionSymbol(aBuf.appendAscii(pFunction).append(under). - appendAscii(cachedItem->localeName).makeStringAndClear()); - } + OUStringBuffer aBuf(1); + if (cachedItem.get() && cachedItem->equals(rLocale)) + { + aBuf.ensureCapacity(strlen(pFunction) + 1 + strlen(cachedItem->localeName)); + return cachedItem->module->getFunctionSymbol(aBuf.appendAscii(pFunction).append(under). + appendAscii(cachedItem->localeName).makeStringAndClear()); + } - oslGenericFunction pSymbol = 0; - static OUString tw(OUString::createFromAscii("TW")); - static OUString en_US(OUString::createFromAscii("en_US")); - - sal_Int32 l = rLocale.Language.getLength(); - sal_Int32 c = rLocale.Country.getLength(); - sal_Int32 v = rLocale.Variant.getLength(); - aBuf.ensureCapacity(l+c+v+3); - - LocaleDataLookupTableItem *pCachedItem = 0; - - if ((l > 0 && c > 0 && v > 0 && - // load function with name <func>_<lang>_<country>_<varian> - (pSymbol = rLookupTable.getFunctionSymbolByName(aBuf.append(rLocale.Language).append(under).append( - rLocale.Country).append(under).append(rLocale.Variant).makeStringAndClear(), pFunction, &pCachedItem)) != 0) || - (l > 0 && c > 0 && - // load function with name <ase>_<lang>_<country> - (pSymbol = rLookupTable.getFunctionSymbolByName(aBuf.append(rLocale.Language).append(under).append( - rLocale.Country).makeStringAndClear(), pFunction, &pCachedItem)) != 0) || - (l > 0 && c > 0 && rLocale.Language.equalsAscii("zh") && - (rLocale.Country.equalsAscii("HK") || - rLocale.Country.equalsAscii("MO")) && - // if the country code is HK or MO, one more step to try TW. - (pSymbol = rLookupTable.getFunctionSymbolByName(aBuf.append(rLocale.Language).append(under).append(tw).makeStringAndClear(), - pFunction, &pCachedItem)) != 0) || - (l > 0 && - // load function with name <func>_<lang> - (pSymbol = rLookupTable.getFunctionSymbolByName(rLocale.Language, pFunction, &pCachedItem)) != 0) || - // load default function with name <func>_en_US - (pSymbol = rLookupTable.getFunctionSymbolByName(en_US, pFunction, &pCachedItem)) != 0) - { - if( pCachedItem ) - cachedItem.reset( pCachedItem ); - if( cachedItem.get()) - cachedItem->aLocale = rLocale; - return pSymbol; - } + oslGenericFunction pSymbol = 0; + static OUString tw(RTL_CONSTASCII_USTRINGPARAM("TW")); + static OUString en_US(RTL_CONSTASCII_USTRINGPARAM("en_US")); + + sal_Int32 l = rLocale.Language.getLength(); + sal_Int32 c = rLocale.Country.getLength(); + sal_Int32 v = rLocale.Variant.getLength(); + aBuf.ensureCapacity(l+c+v+3); + + LocaleDataLookupTableItem *pCachedItem = 0; + + if (l > 0 && c > 0 && v > 0) + { + // load function with name <func>_<lang>_<country>_<variant> + pSymbol = rLookupTable.getFunctionSymbolByName( + aBuf.append(rLocale.Language).append(under).append(rLocale.Country).append(under).append(rLocale.Variant).makeStringAndClear(), + pFunction, &pCachedItem); + } + + if (!pSymbol && l > 0 && c > 0) + { + // load function with name <ase>_<lang>_<country> + pSymbol = rLookupTable.getFunctionSymbolByName( + aBuf.append(rLocale.Language).append(under).append(rLocale.Country).makeStringAndClear(), + pFunction, &pCachedItem); + } + + if (!pSymbol && l > 0 && c > 0 && + rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh")) && + (rLocale.Country.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HK")) || + rLocale.Country.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MO")))) + { + // if the country code is HK or MO, one more step to try TW. + pSymbol = rLookupTable.getFunctionSymbolByName( + aBuf.append(rLocale.Language).append(under).append(tw).makeStringAndClear(), + pFunction, &pCachedItem); + } + + if (!pSymbol) + { + // load function with name <func>_<lang> + pSymbol = rLookupTable.getFunctionSymbolByName(rLocale.Language, pFunction, &pCachedItem); + } + + if (!pSymbol) + { + // load default function with name <func>_en_US + pSymbol = rLookupTable.getFunctionSymbolByName(en_US, pFunction, &pCachedItem); + } + + if (!pSymbol) + // Appropriate symbol could not be found. Give up. throw RuntimeException(); + + if (pCachedItem) + cachedItem.reset(pCachedItem); + if (cachedItem.get()) + cachedItem->aLocale = rLocale; + + return pSymbol; } Sequence< Locale > SAL_CALL @@ -1376,23 +1386,11 @@ LocaleData::getAllInstalledLocaleNames() throw(RuntimeException) return seq; } -// ============================================================================ - using namespace ::com::sun::star::container; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::style; using namespace ::com::sun::star::text; -// // bad: can't have empty prefix ... -// OutlineNumbering::OutlineNumbering(const OutlineNumberingLevel_Impl* pOutlnLevels) : -// m_pOutlineLevels(pOutlnLevels), -// m_nCount(0) -// { -// const OutlineNumberingLevel_Impl* pTemp = m_pOutlineLevels; -// while((pTemp++)->sPrefix) -// m_nCount++; -// } - OutlineNumbering::OutlineNumbering(const OutlineNumberingLevel_Impl* pOutlnLevels, int nLevels) : m_pOutlineLevels(pOutlnLevels), m_nCount(sal::static_int_cast<sal_Int16>(nLevels)) @@ -1478,3 +1476,5 @@ LocaleData::getSupportedServiceNames() throw( RuntimeException ) aRet[0] = OUString::createFromAscii(clocaledata); return aRet; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/localedata/saxparser.cxx b/i18npool/source/localedata/saxparser.cxx index 5118a827b260..1b6ddf47bd1f 100644 --- a/i18npool/source/localedata/saxparser.cxx +++ b/i18npool/source/localedata/saxparser.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -47,7 +48,7 @@ #include <cppuhelper/implbase1.hxx> #include <cppuhelper/implbase3.hxx> -#include <vos/diagnose.hxx> +#include <osl/diagnose.h> #include "LocaleNode.hxx" @@ -142,11 +143,10 @@ class TestDocumentHandler : public WeakImplHelper3< XExtendedDocumentHandler , XEntityResolver , XErrorHandler > { public: - TestDocumentHandler(const char* locale, const char* outFile ) : - rootNode(0), nError(0), nbOfCurrencies(0), nbOfCalendars(0), nbOfFormatElements(0), - nbOfTransliterations(0), nbOfCollations(0), nbOfDays(50), nbOfMonths(50), nbOfEras(10), - flag(-1), of(outFile, locale), isStartDayOfWeek(false), foundDefaultName(false), - foundVariant(false), openElement(false) + TestDocumentHandler(const char* locale, const char* outFile ) + : rootNode(0) + , nError(0) + , of(outFile, locale) { strncpy( theLocale, locale, sizeof(theLocale) ); theLocale[sizeof(theLocale)-1] = 0; @@ -155,6 +155,7 @@ public: ~TestDocumentHandler( ) { of.closeOutput(); + delete rootNode; } @@ -225,29 +226,25 @@ public: // ExtendedDocumentHandler LocaleNode * l = LocaleNode::createNode (aName, xAttribs); if (!currentNode.empty() ) { - LocaleNode * ln = (LocaleNode *) currentNode . top(); + LocaleNode * ln = (LocaleNode *) currentNode.top(); ln->addChild(l); } else { rootNode = l; } - currentNode . push (l); + currentNode.push (l); } virtual void SAL_CALL endElement(const OUString& /*aName*/) throw (SAXException,RuntimeException) { - currentNode . pop(); + currentNode.pop(); } virtual void SAL_CALL characters(const OUString& aChars) throw (SAXException,RuntimeException) { - LocaleNode * l = currentNode . top(); + LocaleNode * l = currentNode.top(); l->setValue (aChars); - ::rtl::OUString str(aChars); - sal_Unicode nonBreakSPace[2]= {0xa, 0x0}; - if(!openElement || str.equals(nonBreakSPace)) - return; } virtual void SAL_CALL ignorableWhitespace(const OUString& /*aWhitespaces*/) throw (SAXException,RuntimeException) @@ -300,23 +297,8 @@ public: // ExtendedDocumentHandler public: int nError; - ::rtl::OUString currentElement; - sal_Int16 nbOfCurrencies; - sal_Int16 nbOfCalendars; - sal_Int16 nbOfFormatElements; - sal_Int16 nbOfTransliterations; - sal_Int16 nbOfCollations; - Sequence<sal_Int16> nbOfDays; - Sequence<sal_Int16> nbOfMonths; - Sequence<sal_Int16> nbOfEras; - sal_Char *elementTag; sal_Char theLocale[50]; - sal_Int16 flag; OFileWriter of; - sal_Bool isStartDayOfWeek; - sal_Bool foundDefaultName; - sal_Bool foundVariant; - sal_Bool openElement; }; @@ -340,9 +322,10 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) ::rtl::OUString::createFromAscii(argv[4]), ::rtl::OUString::createFromAscii(argv[5]), true ); } - catch ( Exception& ) + catch ( Exception &e ) { - printf( "Exception on createRegistryServiceFactory\n" ); + printf( "Exception on createRegistryServiceFactory %s\n", + OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ); exit(1); } @@ -351,7 +334,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) // read xml from a file and count elements //-------------------------------- Reference< XInterface > x = xSMgr->createInstance( - OUString::createFromAscii( "com.sun.star.xml.sax.Parser" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser")) ); int nError = 0; if( x.is() ) { @@ -393,3 +376,5 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) return nError; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |