[Libreoffice-commits] .: 2 commits - i18npool/Library_localedata_others.mk i18npool/source svl/source
Eike Rathke
erack at kemper.freedesktop.org
Tue Feb 28 07:11:23 PST 2012
i18npool/Library_localedata_others.mk | 1
i18npool/source/localedata/data/pjt_AU.xml | 230 +++++++++++++++++++++++++++++
i18npool/source/localedata/localedata.cxx | 3
svl/source/numbers/zforlist.cxx | 6
4 files changed, 236 insertions(+), 4 deletions(-)
New commits:
commit ef37bb6a02674cf676cadcd69445b4deadad9be6
Author: Eike Rathke <erack at redhat.com>
Date: Tue Feb 28 16:07:33 2012 +0100
fixed crashes due to transition from Table to std::map
Old code used Table Seek/Next followed by GetCurKey() that returned -1 (or
some such? anyway) if after the last element, comparing with another key.
Replacement code did not check for valid iterators.
Crash happened when changing the locale within the number formatter and
obtaining the default currency format. May also have happened when changing
the default locale and documents using a number formatter were open.
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index ca3ca49..c454843 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -367,7 +367,7 @@ void SvNumberFormatter::ImpChangeSysCL( LanguageType eLnge, bool bLoadingSO5 )
{ // delete additional standard formats
sal_uInt32 nKey;
SvNumberFormatTable::iterator it = aFTable.find( SV_MAX_ANZ_STANDARD_FORMATE + 1 );
- while ( (nKey = it->first) > SV_MAX_ANZ_STANDARD_FORMATE &&
+ while ( it != aFTable.end() && (nKey = it->first) > SV_MAX_ANZ_STANDARD_FORMATE &&
nKey < SV_COUNTRY_LANGUAGE_OFFSET )
{
delete it->second;
@@ -1293,7 +1293,7 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultFormat( short nType )
sal_uInt32 nStopKey = CLOffset + SV_COUNTRY_LANGUAGE_OFFSET;
sal_uInt32 nKey;
SvNumberFormatTable::iterator it2 = aFTable.find( CLOffset );
- while ( (nKey = it2->first ) >= CLOffset && nKey < nStopKey )
+ while ( it2 != aFTable.end() && (nKey = it2->first ) >= CLOffset && nKey < nStopKey )
{
const SvNumberformat* pEntry = it2->second;
if ( pEntry->IsStandard() && ((pEntry->GetType() &
@@ -3263,7 +3263,7 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultCurrencyFormat()
sal_uInt32 nStopKey = CLOffset + SV_COUNTRY_LANGUAGE_OFFSET;
sal_uInt32 nKey;
SvNumberFormatTable::iterator it2 = aFTable.lower_bound( CLOffset );
- while ( (nKey = it2->first) >= CLOffset && nKey < nStopKey )
+ while ( it2 != aFTable.end() && (nKey = it2->first) >= CLOffset && nKey < nStopKey )
{
const SvNumberformat* pEntry = it2->second;
if ( pEntry->IsStandard() && (pEntry->GetType() & NUMBERFORMAT_CURRENCY) )
commit 20c25d497a0d35a68a7dea9a0d7bc5b667a40ad4
Author: Eike Rathke <erack at redhat.com>
Date: Tue Feb 28 15:12:31 2012 +0100
fdo#46411 added [pjt-AU] Pitjantjatjara locale data
diff --git a/i18npool/Library_localedata_others.mk b/i18npool/Library_localedata_others.mk
index 6ab62a5..a8ec4b3 100644
--- a/i18npool/Library_localedata_others.mk
+++ b/i18npool/Library_localedata_others.mk
@@ -90,6 +90,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,localedata_others,\
CustomTarget/i18npool/source/localedata/localedata_or_IN \
CustomTarget/i18npool/source/localedata/localedata_pa_IN \
CustomTarget/i18npool/source/localedata/localedata_plt_MG \
+ CustomTarget/i18npool/source/localedata/localedata_pjt_AU \
CustomTarget/i18npool/source/localedata/localedata_pt_AO \
CustomTarget/i18npool/source/localedata/localedata_rw_RW \
CustomTarget/i18npool/source/localedata/localedata_sg_CF \
diff --git a/i18npool/source/localedata/data/pjt_AU.xml b/i18npool/source/localedata/data/pjt_AU.xml
new file mode 100644
index 0000000..948de86
--- /dev/null
+++ b/i18npool/source/localedata/data/pjt_AU.xml
@@ -0,0 +1,230 @@
+<?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>pjt</LangID>
+ <DefaultName>Pitjantjatjara</DefaultName>
+ </Language>
+ <Country>
+ <CountryID>AU</CountryID>
+ <DefaultName>Australia</DefaultName>
+ </Country>
+ </LC_INFO>
+ <LC_CTYPE>
+ <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>AM</TimeAM>
+ <TimePM>PM</TimePM>
+ <MeasurementSystem>metric</MeasurementSystem>
+ </LC_CTYPE>
+ <LC_FORMAT replaceFrom="[CURRENCY]" replaceTo="[$$-66B]">
+ <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>#,##0.00 CCC</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>
+ </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-Z</IndexKey>
+ <UnicodeScript>0</UnicodeScript>
+ <UnicodeScript>37</UnicodeScript>
+ <FollowPageWord>p</FollowPageWord>
+ <FollowPageWord>pp</FollowPageWord>
+ </LC_INDEX>
+ <LC_CALENDAR ref="en_AU"/>
+ <LC_CURRENCY>
+ <Currency default="true" usedInCompatibleFormatCodes="true">
+ <CurrencyID>AUD</CurrencyID>
+ <CurrencySymbol>$</CurrencySymbol>
+ <BankSymbol>AUD</BankSymbol>
+ <CurrencyName>Tala</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>tjukaá¹uru</trueWord>
+ <falseWord>ngunti</falseWord>
+ <quarter1Word>Quarter 1</quarter1Word>
+ <quarter2Word>Quarter 2</quarter2Word>
+ <quarter3Word>Quarter 3</quarter3Word>
+ <quarter4Word>Quarter 4</quarter4Word>
+ <aboveWord>katu</aboveWord>
+ <belowWord>tjaá¹u</belowWord>
+ <quarter1Abbreviation>Q1</quarter1Abbreviation>
+ <quarter2Abbreviation>Q2</quarter2Abbreviation>
+ <quarter3Abbreviation>Q3</quarter3Abbreviation>
+ <quarter4Abbreviation>Q4</quarter4Abbreviation>
+ </ReservedWords>
+ </LC_MISC>
+ <LC_NumberingLevel ref="en_AU"/>
+ <LC_OutLineNumberingLevel ref="en_AU"/>
+</Locale>
+<!--Version 1.0 -->
diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx
index f26a8fc..b6605b5 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -256,7 +256,8 @@ static const struct {
{ "ht_HT", lcl_DATA_OTHERS },
{ "jbo", lcl_DATA_OTHERS },
{ "kab_DZ", lcl_DATA_OTHERS },
- { "pt_AO", lcl_DATA_OTHERS }
+ { "pt_AO", lcl_DATA_OTHERS },
+ { "pjt_AU", lcl_DATA_OTHERS }
};
static const sal_Unicode under = sal_Unicode('_');
More information about the Libreoffice-commits
mailing list