diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-01-06 12:54:16 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-01-06 12:54:16 +0000 |
commit | 4e1fd2fa161708049f1c3b6039659d0bf4f4539e (patch) | |
tree | 860f7ec49a96dbb04a3161d44dd1598ce26da2a4 /svtools | |
parent | 3dea05ab282d5a8c56f1f8f23210641d3b5d029c (diff) |
CWS-TOOLING: integrate CWS locales31
2008-12-10 14:56:44 +0100 er r265193 : calling convention mismatch
2008-12-08 12:04:56 +0100 er r264984 : #i96840# classify some extra languages as CTL
2008-12-05 19:54:02 +0100 erack r264916 : ImpSvNumberformatScan::ScanType: do not miscategorize as automtic currency if currency symbol in General string, such as R in Standard
2008-12-04 12:07:05 +0100 erack r264831 : CWS-TOOLING: rebase CWS locales31 to trunk@264807 (milestone: DEV300:m37)
2008-12-03 16:14:17 +0100 erack r264797 : #i93694# update script+language -> unicode digit mapping; patch from <hdu>
2008-11-25 02:01:18 +0100 erack r264270 : #i83349# apply remaining parts of the patch, now that we use ICU 4.0; contributed by <kstribley>
2008-11-25 01:38:20 +0100 erack r264269 : #i93694# test the bit, not the constant ...
2008-11-24 10:34:58 +0100 erack r264211 : #i93694# LANGUAGE_ARABIC is gone
2008-11-24 01:39:25 +0100 erack r264192 : #i94435# LANGUAGE_SPANISH now is an alias of LANGUAGE_SPANISH_MODERN, need LANGUAGE_SPANISH_DATED in switch case if both are to be used
2008-11-23 22:54:17 +0100 erack r264190 : CWS-TOOLING: rebase CWS locales31 to trunk@263288 (milestone: DEV300:m35)
2008-11-23 20:23:28 +0100 erack r264189 : migrate CWS locales31 to SVN
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/config/ctloptions.cxx | 10 | ||||
-rw-r--r-- | svtools/source/misc/langtab.cxx | 7 | ||||
-rw-r--r-- | svtools/source/misc/langtab.src | 36 | ||||
-rw-r--r-- | svtools/source/numbers/zforfind.cxx | 38 | ||||
-rw-r--r-- | svtools/source/numbers/zforlist.cxx | 41 | ||||
-rw-r--r-- | svtools/source/numbers/zformat.cxx | 3 | ||||
-rw-r--r-- | svtools/source/numbers/zforscan.cxx | 56 |
7 files changed, 133 insertions, 58 deletions
diff --git a/svtools/source/config/ctloptions.cxx b/svtools/source/config/ctloptions.cxx index c636373bfddf..5d2bf131add1 100644 --- a/svtools/source/config/ctloptions.cxx +++ b/svtools/source/config/ctloptions.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: ctloptions.cxx,v $ - * $Revision: 1.18 $ + * $Revision: 1.18.140.1 $ * * This file is part of OpenOffice.org. * @@ -39,7 +39,7 @@ #include <svtools/ctloptions.hxx> #include <svtools/languageoptions.hxx> -#include <i18npool/lang.h> +#include <i18npool/mslangid.hxx> #include <unotools/configitem.hxx> #include <tools/debug.hxx> #include <com/sun/star/uno/Any.h> @@ -317,10 +317,8 @@ void SvtCTLOptions_Impl::Load() sal_uInt16 nLanguage = Application::GetSettings().GetLanguage(); //enable sequence checking for the appropriate languages m_bCTLSequenceChecking = m_bCTLRestricted = m_bCTLTypeAndReplace = - ( LANGUAGE_KHMER == nLanguage || LANGUAGE_KHMER == eSystemLanguage || - LANGUAGE_THAI == nLanguage || LANGUAGE_THAI == eSystemLanguage || - LANGUAGE_VIETNAMESE == nLanguage || LANGUAGE_VIETNAMESE == eSystemLanguage || - LANGUAGE_LAO == nLanguage || LANGUAGE_LAO == eSystemLanguage ); + (MsLangId::needsSequenceChecking( nLanguage) || + MsLangId::needsSequenceChecking( eSystemLanguage)); Commit(); } m_bIsLoaded = sal_True; diff --git a/svtools/source/misc/langtab.cxx b/svtools/source/misc/langtab.cxx index 2e14a71d6d07..6226992136c8 100644 --- a/svtools/source/misc/langtab.cxx +++ b/svtools/source/misc/langtab.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: langtab.cxx,v $ - * $Revision: 1.3 $ + * $Revision: 1.3.140.1 $ * * This file is part of OpenOffice.org. * @@ -37,6 +37,7 @@ #include <tools/debug.hxx> #include <i18npool/lang.h> +#include <i18npool/mslangid.hxx> #include <svtools/svtools.hrc> #include <svtools/svtdata.hxx> @@ -59,9 +60,7 @@ SvtLanguageTable::~SvtLanguageTable() const String& SvtLanguageTable::GetString( const LanguageType eType ) const { - // no_NO is an alias for nb_NO - LanguageType eLang = (eType == LANGUAGE_NORWEGIAN ? - LANGUAGE_NORWEGIAN_BOKMAL : eType); + LanguageType eLang = MsLangId::getReplacementForObsoleteLanguage( eType); sal_uInt32 nPos = FindIndex( eLang ); if ( RESARRAY_INDEX_NOTFOUND != nPos && nPos < Count() ) diff --git a/svtools/source/misc/langtab.src b/svtools/source/misc/langtab.src index c1d0f5d362d7..0e281f7d3d83 100644 --- a/svtools/source/misc/langtab.src +++ b/svtools/source/misc/langtab.src @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: langtab.src,v $ - * $Revision: 1.6 $ + * $Revision: 1.6.140.6 $ * * This file is part of OpenOffice.org. * @@ -46,22 +46,32 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE < "Default" ; LANGUAGE_SYSTEM ; > ; < "Afrikaans (South Africa)" ; LANGUAGE_AFRIKAANS ; > ; < "Albanian" ; LANGUAGE_ALBANIAN ; > ; - < "Arabic (Iraq)" ; LANGUAGE_ARABIC_IRAQ ; > ; + < "Arabic" ; LANGUAGE_ARABIC_PRIMARY_ONLY ; > ; + < "Arabic (Algeria)" ; LANGUAGE_ARABIC_ALGERIA ; > ; + < "Arabic (Bahrain)" ; LANGUAGE_ARABIC_BAHRAIN ; > ; + < "Arabic (Chad)" ; LANGUAGE_USER_ARABIC_CHAD ; > ; + < "Arabic (Comoros)" ; LANGUAGE_USER_ARABIC_COMOROS ; > ; + < "Arabic (Djibouti)" ; LANGUAGE_USER_ARABIC_DJIBOUTI ; > ; < "Arabic (Egypt)" ; LANGUAGE_ARABIC_EGYPT ; > ; + < "Arabic (Eritrea)" ; LANGUAGE_USER_ARABIC_ERITREA ; > ; + < "Arabic (Iraq)" ; LANGUAGE_ARABIC_IRAQ ; > ; + < "Arabic (Israel)" ; LANGUAGE_USER_ARABIC_ISRAEL ; > ; + < "Arabic (Jordan)" ; LANGUAGE_ARABIC_JORDAN ; > ; + < "Arabic (Kuwait)" ; LANGUAGE_ARABIC_KUWAIT ; > ; + < "Arabic (Lebanon)" ; LANGUAGE_ARABIC_LEBANON ; > ; < "Arabic (Libya)" ; LANGUAGE_ARABIC_LIBYA ; > ; - < "Arabic (Algerian)" ; LANGUAGE_ARABIC_ALGERIA ; > ; + < "Arabic (Mauritania)" ; LANGUAGE_USER_ARABIC_MAURITANIA ; > ; < "Arabic (Morocco)" ; LANGUAGE_ARABIC_MOROCCO ; > ; - < "Arabic (Tunisia)" ; LANGUAGE_ARABIC_TUNISIA ; > ; < "Arabic (Oman)" ; LANGUAGE_ARABIC_OMAN ; > ; - < "Arabic (Yemen)" ; LANGUAGE_ARABIC_YEMEN ; > ; - < "Arabic (Syria)" ; LANGUAGE_ARABIC_SYRIA ; > ; - < "Arabic (Jordan)" ; LANGUAGE_ARABIC_JORDAN ; > ; - < "Arabic (Lebanon)" ; LANGUAGE_ARABIC_LEBANON ; > ; - < "Arabic (Kuwait)" ; LANGUAGE_ARABIC_KUWAIT ; > ; - < "Arabic (UAE)" ; LANGUAGE_ARABIC_UAE ; > ; - < "Arabic (Bahrain)" ; LANGUAGE_ARABIC_BAHRAIN ; > ; + < "Arabic (Palestine)" ; LANGUAGE_USER_ARABIC_PALESTINE ; > ; < "Arabic (Qatar)" ; LANGUAGE_ARABIC_QATAR ; > ; < "Arabic (Saudi Arabia)" ; LANGUAGE_ARABIC_SAUDI_ARABIA ; > ; + < "Arabic (Somalia)" ; LANGUAGE_USER_ARABIC_SOMALIA ; > ; + < "Arabic (Sudan)" ; LANGUAGE_USER_ARABIC_SUDAN ; > ; + < "Arabic (Syria)" ; LANGUAGE_ARABIC_SYRIA ; > ; + < "Arabic (Tunisia)" ; LANGUAGE_ARABIC_TUNISIA ; > ; + < "Arabic (UAE)" ; LANGUAGE_ARABIC_UAE ; > ; + < "Arabic (Yemen)" ; LANGUAGE_ARABIC_YEMEN ; > ; < "Armenian" ; LANGUAGE_ARMENIAN ; > ; < "Assami" ; LANGUAGE_ASSAMESE ; > ; < "Azerbaijani Latin" ; LANGUAGE_AZERI_LATIN ; > ; @@ -159,7 +169,6 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE < "Slovenian" ; LANGUAGE_SLOVENIAN ; > ; < "Spanish (Spain)" ; LANGUAGE_SPANISH ; > ; < "Spanish (Mexico)" ; LANGUAGE_SPANISH_MEXICAN ; > ; - < "Spanish, Modern (Spain)" ; LANGUAGE_SPANISH_MODERN ; > ; < "Spanish (Guatemala)" ; LANGUAGE_SPANISH_GUATEMALA ; > ; < "Spanish (Costa Rica)" ; LANGUAGE_SPANISH_COSTARICA ; > ; < "Spanish (Panama)" ; LANGUAGE_SPANISH_PANAMA ; > ; @@ -290,6 +299,9 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE < "Santali" ; LANGUAGE_USER_SANTALI_INDIA ; > ; < "Tetun (Timor-Leste)" ; LANGUAGE_USER_TETUN_TIMOR_LESTE ; > ; < "Turkmen" ; LANGUAGE_TURKMEN ; > ; + < "Maltese" ; LANGUAGE_MALTESE ; > ; + < "Tok Pisin" ; LANGUAGE_USER_TOK_PISIN ; > ; + < "Shuswap" ; LANGUAGE_USER_SHUSWAP ; > ; }; }; diff --git a/svtools/source/numbers/zforfind.cxx b/svtools/source/numbers/zforfind.cxx index b143ad4d8f79..7aac440e8b58 100644 --- a/svtools/source/numbers/zforfind.cxx +++ b/svtools/source/numbers/zforfind.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: zforfind.cxx,v $ - * $Revision: 1.51 $ + * $Revision: 1.51.96.1 $ * * This file is part of OpenOffice.org. * @@ -1385,13 +1385,14 @@ input for the following reasons: { "ko", "KR", "hanja_yoil" }, { "th", "TH", "buddhist" }, { "zh", "TW", "ROC" }, - 0 + {0,0,0} }; lang::Locale aLocale; sal_Bool bValid; - sal_Int16 nDay, nMonth, nYear, nHour, nMinute, nSecond; + sal_Int16 nDay, nMyMonth, nYear, nHour, nMinute, nSecond; sal_Int16 nDaySet, nMonthSet, nYearSet, nHourSet, nMinuteSet, nSecondSet; - sal_Int16 nZO, nDST1, nDST2, nDST; + sal_Int16 nZO, nDST1, nDST2, nDST, nZOmillis, nDST1millis, nDST2millis, nDSTmillis; + sal_Int32 nZoneInMillis, nDST1InMillis, nDST2InMillis; uno::Reference< lang::XMultiServiceFactory > xSMgr = ::comphelper::getProcessServiceFactory(); uno::Reference< ::com::sun::star::i18n::XExtendedCalendar > xCal( @@ -1402,18 +1403,27 @@ input for the following reasons: for ( const entry* p = cals; p->lan; ++p ) { aLocale.Language = ::rtl::OUString::createFromAscii( p->lan ); - aLocale.Country = ::rtl::OUString::createFromAscii( p->cou ); + aLocale.Country = ::rtl::OUString::createFromAscii( p->cou ); xCal->loadCalendar( ::rtl::OUString::createFromAscii( p->cal ), aLocale ); double nDateTime = 0.0; // 1-Jan-1970 00:00:00 - nZO = xCal->getValue( i18n::CalendarFieldIndex::ZONE_OFFSET ); - nDST1 = xCal->getValue( i18n::CalendarFieldIndex::DST_OFFSET ); - nDateTime -= (double)(nZO + nDST1) / 60.0 / 24.0; + nZO = xCal->getValue( i18n::CalendarFieldIndex::ZONE_OFFSET ); + nZOmillis = xCal->getValue( i18n::CalendarFieldIndex::ZONE_OFFSET_SECOND_MILLIS ); + nZoneInMillis = static_cast<sal_Int32>(nZO) * 60000 + + (nZO < 0 ? -1 : 1) * static_cast<sal_uInt16>(nZOmillis); + nDST1 = xCal->getValue( i18n::CalendarFieldIndex::DST_OFFSET ); + nDST1millis = xCal->getValue( i18n::CalendarFieldIndex::DST_OFFSET_SECOND_MILLIS ); + nDST1InMillis = static_cast<sal_Int32>(nDST1) * 60000 + + (nDST1 < 0 ? -1 : 1) * static_cast<sal_uInt16>(nDST1millis); + nDateTime -= (double)(nZoneInMillis + nDST1InMillis) / 1000.0 / 60.0 / 60.0 / 24.0; xCal->setDateTime( nDateTime ); - nDST2 = xCal->getValue( i18n::CalendarFieldIndex::DST_OFFSET ); - if ( nDST1 != nDST2 ) + nDST2 = xCal->getValue( i18n::CalendarFieldIndex::DST_OFFSET ); + nDST2millis = xCal->getValue( i18n::CalendarFieldIndex::DST_OFFSET_SECOND_MILLIS ); + nDST2InMillis = static_cast<sal_Int32>(nDST2) * 60000 + + (nDST2 < 0 ? -1 : 1) * static_cast<sal_uInt16>(nDST2millis); + if ( nDST1InMillis != nDST2InMillis ) { - nDateTime = 0.0 - (double)(nZO + nDST2) / 60.0 / 24.0; + nDateTime = 0.0 - (double)(nZoneInMillis + nDST2InMillis) / 1000.0 / 60.0 / 60.0 / 24.0; xCal->setDateTime( nDateTime ); } nDaySet = xCal->getValue( i18n::CalendarFieldIndex::DAY_OF_MONTH ); @@ -1423,7 +1433,9 @@ input for the following reasons: nMinuteSet = xCal->getValue( i18n::CalendarFieldIndex::MINUTE ); nSecondSet = xCal->getValue( i18n::CalendarFieldIndex::SECOND ); nZO = xCal->getValue( i18n::CalendarFieldIndex::ZONE_OFFSET ); + nZOmillis = xCal->getValue( i18n::CalendarFieldIndex::ZONE_OFFSET_SECOND_MILLIS ); nDST = xCal->getValue( i18n::CalendarFieldIndex::DST_OFFSET ); + nDSTmillis = xCal->getValue( i18n::CalendarFieldIndex::DST_OFFSET_SECOND_MILLIS ); xCal->setValue( i18n::CalendarFieldIndex::DAY_OF_MONTH, nDaySet ); xCal->setValue( i18n::CalendarFieldIndex::MONTH, nMonthSet ); xCal->setValue( i18n::CalendarFieldIndex::YEAR, nYearSet ); @@ -1432,12 +1444,12 @@ input for the following reasons: xCal->setValue( i18n::CalendarFieldIndex::SECOND, nSecondSet ); bValid = xCal->isValid(); nDay = xCal->getValue( i18n::CalendarFieldIndex::DAY_OF_MONTH ); - nMonth = xCal->getValue( i18n::CalendarFieldIndex::MONTH ); + nMyMonth= xCal->getValue( i18n::CalendarFieldIndex::MONTH ); nYear = xCal->getValue( i18n::CalendarFieldIndex::YEAR ); nHour = xCal->getValue( i18n::CalendarFieldIndex::HOUR ); nMinute = xCal->getValue( i18n::CalendarFieldIndex::MINUTE ); nSecond = xCal->getValue( i18n::CalendarFieldIndex::SECOND ); - bValid = bValid && nDay == nDaySet && nMonth == nMonthSet && nYear == + bValid = bValid && nDay == nDaySet && nMyMonth == nMonthSet && nYear == nYearSet && nHour == nHourSet && nMinute == nMinuteSet && nSecond == nSecondSet; } diff --git a/svtools/source/numbers/zforlist.cxx b/svtools/source/numbers/zforlist.cxx index 96a109836169..b76bf3226b50 100644 --- a/svtools/source/numbers/zforlist.cxx +++ b/svtools/source/numbers/zforlist.cxx @@ -2163,15 +2163,31 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO // must be appended, not inserted! USHORT nNewExtended = ZF_STANDARD_NEWEXTENDED; + // Number + uno::Sequence< i18n::NumberFormatCode > aFormatSeq + = aNumberFormatCode.getAllFormatCode( i18n::KNumberFormatUsage::FIXED_NUMBER ); + ImpAdjustFormatCodeDefault( aFormatSeq.getArray(), aFormatSeq.getLength() ); + // General - aFormatCode = pFormatScanner->GetStandardName(); - SvNumberformat* pStdFormat = new SvNumberformat( aFormatCode, - pFormatScanner, pStringScanner, nCheckPos, ActLnge ); - pStdFormat->SetType( NUMBERFORMAT_NUMBER ); - pStdFormat->SetStandard(); - if ( !aFTable.Insert( - CLOffset + SetIndexTable( NF_NUMBER_STANDARD, ZF_STANDARD ), - pStdFormat ) ) + nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_NUMBER_STANDARD ); + SvNumberformat* pStdFormat = ImpInsertFormat( aFormatSeq[nIdx], + CLOffset + SetIndexTable( NF_NUMBER_STANDARD, ZF_STANDARD )); + if (pStdFormat) + { + // This is _the_ standard format. + if (LocaleDataWrapper::areChecksEnabled() && + pStdFormat->GetType() != NUMBERFORMAT_NUMBER) + { + String aMsg( RTL_CONSTASCII_USTRINGPARAM( + "SvNumberFormatter::ImpGenerateFormats: General format not NUMBER")); + LocaleDataWrapper::outputCheckMessage( + xLocaleData->appendLocaleInfo( aMsg)); + } + pStdFormat->SetType( NUMBERFORMAT_NUMBER ); + pStdFormat->SetStandard(); + pStdFormat->SetLastInsertKey( SV_MAX_ANZ_STANDARD_FORMATE ); + } + else { if (LocaleDataWrapper::areChecksEnabled()) { @@ -2180,11 +2196,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg)); } - delete pStdFormat; - pStdFormat = NULL; } - else - pStdFormat->SetLastInsertKey( SV_MAX_ANZ_STANDARD_FORMATE ); // Boolean aFormatCode = pFormatScanner->GetBooleanString(); @@ -2210,11 +2222,6 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO - // Number - uno::Sequence< i18n::NumberFormatCode > aFormatSeq - = aNumberFormatCode.getAllFormatCode( i18n::KNumberFormatUsage::FIXED_NUMBER ); - ImpAdjustFormatCodeDefault( aFormatSeq.getArray(), aFormatSeq.getLength() ); - // 0 nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_NUMBER_INT ); ImpInsertFormat( aFormatSeq[nIdx], diff --git a/svtools/source/numbers/zformat.cxx b/svtools/source/numbers/zformat.cxx index 1054ea8e83e2..0afbf3b4a3f5 100644 --- a/svtools/source/numbers/zformat.cxx +++ b/svtools/source/numbers/zformat.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: zformat.cxx,v $ - * $Revision: 1.78.168.1 $ + * $Revision: 1.78.138.1 $ * * This file is part of OpenOffice.org. * @@ -1816,6 +1816,7 @@ void SvNumberformat::ImpGetOutputStandard(double& fNumber, String& OutString) OutString.GetTokenCount('0') == OutString.Len()) OutString.EraseLeadingChars('-'); // nicht -0 } + ImpTransliterate( OutString, NumFor[0].GetNatNum() ); return; } diff --git a/svtools/source/numbers/zforscan.cxx b/svtools/source/numbers/zforscan.cxx index d9a65a9b5fc6..d6ce04c4da2a 100644 --- a/svtools/source/numbers/zforscan.cxx +++ b/svtools/source/numbers/zforscan.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: zforscan.cxx,v $ - * $Revision: 1.49 $ + * $Revision: 1.49.140.2 $ * * This file is part of OpenOffice.org. * @@ -188,6 +188,50 @@ void ImpSvNumberformatScan::InitKeywords() const } +/** Extract the name of General, Standard, Whatever, ignoring leading modifiers + such as [NatNum1]. */ +static String lcl_extractStandardGeneralName( const ::rtl::OUString & rCode ) +{ + String aStr; + const sal_Unicode* p = rCode.getStr(); + const sal_Unicode* const pStop = p + rCode.getLength(); + const sal_Unicode* pBeg = p; // name begins here + bool bMod = false; + bool bDone = false; + while (p < pStop && !bDone) + { + switch (*p) + { + case '[': + bMod = true; + break; + case ']': + if (bMod) + { + bMod = false; + pBeg = p+1; + } + // else: would be a locale data error, easily to be spotted in + // UI dialog + break; + case ';': + if (!bMod) + { + bDone = true; + --p; // put back, increment by one follows + } + break; + } + ++p; + if (bMod) + pBeg = p; + } + if (pBeg < p) + aStr = rCode.copy( pBeg - rCode.getStr(), p - pBeg); + return aStr; +} + + void ImpSvNumberformatScan::SetDependentKeywords() { using namespace ::com::sun::star; @@ -202,7 +246,7 @@ void ImpSvNumberformatScan::SetDependentKeywords() NumberFormatCodeWrapper aNumberFormatCode( pFormatter->GetServiceManager(), aLoadedLocale ); i18n::NumberFormatCode aFormat = aNumberFormatCode.getFormatCode( NF_NUMBER_STANDARD ); - sNameStandardFormat = aFormat.Code; + sNameStandardFormat = lcl_extractStandardGeneralName( aFormat.Code); sKeyword[NF_KEY_GENERAL] = pCharClass->upper( sNameStandardFormat ); // preset new calendar keywords @@ -328,9 +372,9 @@ void ImpSvNumberformatScan::SetDependentKeywords() case LANGUAGE_FRENCH_MONACO : case LANGUAGE_PORTUGUESE : case LANGUAGE_PORTUGUESE_BRAZILIAN : - case LANGUAGE_SPANISH : - case LANGUAGE_SPANISH_MEXICAN : case LANGUAGE_SPANISH_MODERN : + case LANGUAGE_SPANISH_DATED : + case LANGUAGE_SPANISH_MEXICAN : case LANGUAGE_SPANISH_GUATEMALA : case LANGUAGE_SPANISH_COSTARICA : case LANGUAGE_SPANISH_PANAMA : @@ -1070,6 +1114,7 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&) USHORT i = 0; short eNewType; BOOL bMatchBracket = FALSE; + bool bHaveGeneral = false; // if General/Standard encountered SkipStrings(i, nPos); while (i < nAnzStrings) @@ -1139,6 +1184,7 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&) break; case NF_KEY_GENERAL: // Standard eNewType = NUMBERFORMAT_NUMBER; + bHaveGeneral = true; break; default: eNewType = NUMBERFORMAT_UNDEFINED; @@ -1361,7 +1407,7 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&) } if ((eScannedType == NUMBERFORMAT_NUMBER || eScannedType == NUMBERFORMAT_UNDEFINED) - && nCurrPos != STRING_NOTFOUND) + && nCurrPos != STRING_NOTFOUND && !bHaveGeneral) eScannedType = NUMBERFORMAT_CURRENCY; // old "automatic" currency if (eScannedType == NUMBERFORMAT_UNDEFINED) eScannedType = NUMBERFORMAT_DEFINED; |