summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-09-16 14:55:33 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-09-16 14:55:33 +0000
commitf67921c8a411cd5740ee2e1884f5c3c95ce4dd05 (patch)
treeff26918c511e22181b7edf6b5bc90989c3a711bf
parent259f5785aada7d4949609f1743359cd1f4a8349d (diff)
CWS-TOOLING: integrate CWS locales32
2009-09-06 19:13:15 +0200 er r275860 : #i104308# Lower and Upper Sorbian 2009-09-03 01:40:09 +0200 erack r275732 : CWS-TOOLING: rebase CWS locales32 to trunk@275331 (milestone: DEV300:m56) 2009-08-17 21:48:26 +0200 erack r275072 : * #i102920# use OUString::iterateCodePoints() in xdictionary; patch from <cmc> * Adapted local iterateCodePoints() in breakiteratorImpl.cxx to cope with surrogates at text end. * Use OUString::iterateCodePoints() in BreakIterator_CJK::getLineBreak() 2009-08-09 23:14:39 +0200 erack r274792 : mergeinfo 2009-08-09 23:09:31 +0200 erack r274791 : re-adding this again, merge from tag didn't work; SVN IS A PIECE OF CRAP 2009-08-09 22:45:02 +0200 erack r274790 : don't re-add file, merge instead 2009-08-09 22:09:49 +0200 erack r274789 : cws rebase ERRONEOUSLY REMOVED THIS FILE! 2009-08-09 22:01:02 +0200 erack r274788 : adapt to new postset.mk completelangiso content; get rid of /i modifier uglyness 2009-08-09 19:40:46 +0200 erack r274787 : #i99823# sort currency list ISO,symbol,language/country; removed unused STR_EUROPE 2009-08-09 01:23:35 +0200 erack r274786 : make AZM currency legacyOnly to avoid duplicate listing in number formatter because of the identical 'man.' currency symbol 2009-08-09 01:11:38 +0200 erack r274785 : #i94445# make ROL currency legacyOnly to avoid duplicate listing in number formatter because of the identical 'lei' currency symbol 2009-08-06 19:10:34 +0200 erack r274743 : CWS-TOOLING: rebase CWS locales32 to trunk@274622 (milestone: DEV300:m54) 2009-08-04 21:26:24 +0200 erack r274634 : #i94445# new currency RON 2009-08-04 21:06:55 +0200 erack r274633 : #i103193# corrected data; from <calibaashi> 2009-07-18 23:56:55 +0200 erack r274104 : #i103408# ignore an empty LANGUAGE variable; patch from <cmc> 2009-07-07 00:21:02 +0200 erack r273764 : Langpack.ulf is gone 2009-07-07 00:02:39 +0200 erack r273763 : #i103358# add 'is' Icelandic 2009-07-04 02:10:55 +0200 erack r273720 : #i101173# typographic quotation marks 2009-07-04 01:07:44 +0200 erack r273719 : #i65127# make it compile with OSL_DEBUG_LEVEL>2 again 2009-06-26 22:50:49 +0200 erack r273444 : #i97602# add Asturian_Spain [ast-ES]; locale data contributed by <astur>/<it46> 2009-06-26 22:01:25 +0200 erack r273443 : #i101173# add Oromo [om-ET] locale data; contributed by <barreessaa> 2009-06-26 21:55:41 +0200 erack r273442 : #i101173# add Oromo [om-ET] locale data; contributed by <barreessaa> 2009-06-26 21:11:46 +0200 erack r273441 : #i102991# linguistic corrections 2009-06-26 21:02:45 +0200 erack r273440 : #i102986# add Somali 'so' 2009-06-22 00:04:35 +0200 erack r273190 : #i101235# add Uyghur_China [ug-CN] locale; contributed by <sahran>/<it46> 2009-06-21 23:35:21 +0200 erack r273189 : blah 2009-06-21 23:22:40 +0200 erack r273188 : #i99972# add Quechua (Ecuador) [qu-EC] 2009-06-21 21:57:29 +0200 erack r273187 : #i97791# add Yiddish [yi-IL] 2009-06-21 21:24:29 +0200 erack r273186 : #i102186# add Greek, Ancient [grc-GR] 2009-06-21 21:00:59 +0200 erack r273185 : #i98489# add Arabic (Oman) [ar-OM] locale data; contributed by <zayed2001>/<it46> 2009-06-21 20:54:07 +0200 erack r273184 : check ListSeparator for ';' semicolon, for consistency 2009-06-21 20:20:13 +0200 erack r273183 : ISO 4217 checks only if not legacy (e.g. Macau Pound 'P') 2009-06-21 20:00:27 +0200 erack r273182 : check CurrencyID and BankSymbol vor ISO 4217 2009-06-21 19:10:36 +0200 erack r273181 : #i73118# Bokmål instead of Bokmal 2009-06-21 19:00:47 +0200 erack r273180 : #i99827# add Sardinian locale data; contributed by <valterubuntu> 2009-06-21 18:20:05 +0200 erack r273179 : give URL of svn instead of legacy cvs 2009-06-21 17:45:31 +0200 erack r273178 : #i87907# add Oromo [om-ET] 2009-06-21 17:23:14 +0200 erack r273177 : grep in completelangiso of postset.mk 2009-03-24 00:22:16 +0100 erack r269901 : #i100368# parentheses, parentheses, parentheses ... 2009-03-23 23:31:22 +0100 erack r269899 : #i99712# call OutlineNumberingLevel_Impl dtor 2009-03-23 22:37:31 +0100 erack r269897 : #i98347# register NumToCharHalfwidth 2009-03-22 18:07:40 +0100 erack r269852 : definitely ignore any output resulting from the cd command in list of rules, which may have lead to a spurious rule file
-rw-r--r--svx/inc/svx/numfmtsh.hxx4
-rw-r--r--svx/source/cui/numfmt.cxx3
-rw-r--r--svx/source/cui/numfmt.hrc7
-rw-r--r--svx/source/cui/numfmt.hxx1
-rw-r--r--svx/source/cui/numfmt.src4
-rw-r--r--svx/source/items/numfmtsh.cxx61
6 files changed, 44 insertions, 36 deletions
diff --git a/svx/inc/svx/numfmtsh.hxx b/svx/inc/svx/numfmtsh.hxx
index 8e2eb238d3bd..5e6fe3737f94 100644
--- a/svx/inc/svx/numfmtsh.hxx
+++ b/svx/inc/svx/numfmtsh.hxx
@@ -212,8 +212,8 @@ public:
short GetListPos4Entry(sal_uInt32 nIdx);
short GetListPos4Entry( const String& rFmtString );
- void GetCurrencySymbols(SvStringsDtor& rList,const XubString& rStrEurope,USHORT* pPos);
- void GetCurrencySymbols(SvStringsDtor& rList,const XubString& rStrEurope, BOOL bFlag);
+ void GetCurrencySymbols( SvStringsDtor& rList, USHORT* pPos );
+ void GetCurrencySymbols( SvStringsDtor& rList, BOOL bFlag );
USHORT FindCurrencyTableEntry( const String& rFmtString, BOOL &bTestBanking );
BOOL IsInTable(USHORT nPos,BOOL bTmpBanking,const String &rFmtString);
diff --git a/svx/source/cui/numfmt.cxx b/svx/source/cui/numfmt.cxx
index a3b426c6110e..d6978ea008b8 100644
--- a/svx/source/cui/numfmt.cxx
+++ b/svx/source/cui/numfmt.cxx
@@ -292,7 +292,6 @@ SvxNumberFormatTabPage::SvxNumberFormatTabPage( Window* pParent,
pNumFmtShell ( NULL ),
nInitFormat ( ULONG_MAX ),
- aStrEurope ( THIS_SVX_RES( STR_EUROPE) ),
sAutomaticEntry ( THIS_SVX_RES( STR_AUTO_ENTRY)),
pLastActivWindow( NULL )
{
@@ -1887,7 +1886,7 @@ void SvxNumberFormatTabPage::FillCurrencyBox()
USHORT nPos=0;
USHORT nSelPos=0;
- pNumFmtShell->GetCurrencySymbols(aList,aStrEurope,&nSelPos);
+ pNumFmtShell->GetCurrencySymbols( aList, &nSelPos);
for(USHORT i=1;i<aList.Count();i++)
{
diff --git a/svx/source/cui/numfmt.hrc b/svx/source/cui/numfmt.hrc
index 7f63e02b57d5..102c5a212ac6 100644
--- a/svx/source/cui/numfmt.hrc
+++ b/svx/source/cui/numfmt.hrc
@@ -64,10 +64,9 @@
#define IB_INFO 31
#define IL_ICON 32
#define LB_CURRENCY 33
-#define STR_EUROPE 34
-#define CB_SOURCEFORMAT 35
-#define IL_ICON_HC 36
-#define STR_AUTO_ENTRY 37
+#define CB_SOURCEFORMAT 34
+#define IL_ICON_HC 35
+#define STR_AUTO_ENTRY 36
#define TBX_ADDREMOVE 1
#define IID_ADD 1
diff --git a/svx/source/cui/numfmt.hxx b/svx/source/cui/numfmt.hxx
index ff9d0813f6e5..e14f397cf0ba 100644
--- a/svx/source/cui/numfmt.hxx
+++ b/svx/source/cui/numfmt.hxx
@@ -170,7 +170,6 @@ private:
long nCurFormatHeight;
long nStdFormatY;
long nStdFormatHeight;
- LocalizedString aStrEurope;
LocalizedString sAutomaticEntry;
Window* pLastActivWindow;
diff --git a/svx/source/cui/numfmt.src b/svx/source/cui/numfmt.src
index ab71ae446998..96269bb9ec09 100644
--- a/svx/source/cui/numfmt.src
+++ b/svx/source/cui/numfmt.src
@@ -256,10 +256,6 @@ TabPage RID_SVXPAGE_NUMBERFORMAT
IdCount = { 3 ; };
};
- String STR_EUROPE
- {
- Text [ en-US ] = "Europe";
- };
String STR_AUTO_ENTRY
{
Text [ en-US ] = "Automatic";
diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx
index d4dd02f74a3b..ca6333753769 100644
--- a/svx/source/items/numfmtsh.cxx
+++ b/svx/source/items/numfmtsh.cxx
@@ -45,6 +45,7 @@
#include <svtools/langtab.hxx>
#include <vcl/svapp.hxx>
+#include <comphelper/processfactory.hxx>
#include <svx/numfmtsh.hxx>
// class SvxNumberFormatShell --------------------------------------------
@@ -1523,22 +1524,22 @@ String SvxNumberFormatShell::GetStandardName() const
return pFormatter->GetStandardName( eCurLanguage);
}
-void SvxNumberFormatShell::GetCurrencySymbols(SvStringsDtor& rList,const XubString& rStrEurope, sal_uInt16* pPos)
+void SvxNumberFormatShell::GetCurrencySymbols( SvStringsDtor& rList, sal_uInt16* pPos )
{
const NfCurrencyEntry* pTmpCurrencyEntry=SvNumberFormatter::MatchSystemCurrency();
sal_Bool bFlag=(pTmpCurrencyEntry==NULL);
- GetCurrencySymbols(rList,rStrEurope, bFlag);
+ GetCurrencySymbols( rList, bFlag);
if(pPos!=NULL)
{
const NfCurrencyTable& rCurrencyTable=SvNumberFormatter::GetTheCurrencyTable();
- sal_uInt16 nCount=rCurrencyTable.Count();
+ sal_uInt16 nTableCount=rCurrencyTable.Count();
*pPos=0;
- nCount=aCurCurrencyList.Count();
+ sal_uInt16 nCount=aCurCurrencyList.Count();
if(bFlag)
{
@@ -1549,8 +1550,9 @@ void SvxNumberFormatShell::GetCurrencySymbols(SvStringsDtor& rList,const XubStri
{
for(sal_uInt16 i=1;i<nCount;i++)
{
- if(aCurCurrencyList[i]!=(sal_uInt16)-1 &&
- pTmpCurrencyEntry==rCurrencyTable[aCurCurrencyList[i]])
+ const sal_uInt16 j = aCurCurrencyList[i];
+ if (j != (sal_uInt16)-1 && j < nTableCount &&
+ pTmpCurrencyEntry == rCurrencyTable[j])
{
*pPos=i;
nCurCurrencyEntryPos=i;
@@ -1562,7 +1564,7 @@ void SvxNumberFormatShell::GetCurrencySymbols(SvStringsDtor& rList,const XubStri
}
-void SvxNumberFormatShell::GetCurrencySymbols(SvStringsDtor& rList,const XubString& /*rStrEurope*/, sal_Bool bFlag)
+void SvxNumberFormatShell::GetCurrencySymbols( SvStringsDtor& rList, sal_Bool bFlag )
{
aCurCurrencyList.Remove(0,aCurCurrencyList.Count());
@@ -1574,9 +1576,9 @@ void SvxNumberFormatShell::GetCurrencySymbols(SvStringsDtor& rList,const XubStri
sal_uInt16 nStart=1;
sal_uInt16 i,j;
- XubString aString(rCurrencyTable[0]->GetSymbol());
+ XubString aString( ApplyLreOrRleEmbedding( rCurrencyTable[0]->GetSymbol()));
aString += sal_Unicode(' ');
- aString += pLanguageTable->GetString(rCurrencyTable[0]->GetLanguage());
+ aString += ApplyLreOrRleEmbedding( pLanguageTable->GetString( rCurrencyTable[0]->GetLanguage()));
WSStringPtr pStr = new XubString(aString);
rList.Insert( pStr,rList.Count());
@@ -1591,41 +1593,54 @@ void SvxNumberFormatShell::GetCurrencySymbols(SvStringsDtor& rList,const XubStri
++nStart;
}
- for(i=1;i<nCount;i++)
- {
- XubString _aString(rCurrencyTable[i]->GetSymbol());
- _aString += sal_Unicode(' ');
- _aString += pLanguageTable->GetString(rCurrencyTable[i]->GetLanguage());
+ CollatorWrapper aCollator( ::comphelper::getProcessServiceFactory());
+ aCollator.loadDefaultCollator( Application::GetSettings().GetLocale(), 0);
- pStr = new XubString(_aString);
+ const String aTwoSpace( RTL_CONSTASCII_USTRINGPARAM( " "));
+ for(i=1;i<nCount;i++)
+ {
+ XubString aStr( ApplyLreOrRleEmbedding( rCurrencyTable[i]->GetBankSymbol()));
+ aStr += aTwoSpace;
+ aStr += ApplyLreOrRleEmbedding( rCurrencyTable[i]->GetSymbol());
+ aStr += aTwoSpace;
+ aStr += ApplyLreOrRleEmbedding( pLanguageTable->GetString( rCurrencyTable[i]->GetLanguage()));
+
+ pStr = new XubString(aStr);
+#if 0
+ fprintf( stderr, "currency entry: %s\n", ByteString( *pStr, RTL_TEXTENCODING_UTF8).GetBuffer());
+#endif
for(j=nStart;j<rList.Count();j++)
{
const StringPtr pTestStr=rList[j];
-
- if(*pTestStr>aString) break;
+ if (aCollator.compareString( *pStr, *pTestStr) < 0)
+ break; // insert before first greater than
}
rList.Insert( pStr,j);
aCurCurrencyList.Insert(i,j);
}
+ // Append ISO codes to symbol list.
+ // XXX If this is to be changed, various other places would had to be
+ // adapted that assume this order!
sal_uInt16 nCont = rList.Count();
for(i=1;i<nCount;i++)
{
- sal_Bool bTest=sal_True;
- pStr = new XubString(rCurrencyTable[i]->GetBankSymbol());
+ bool bInsert = true;
+ pStr = new XubString( ApplyLreOrRleEmbedding( rCurrencyTable[i]->GetBankSymbol()));
- for(j=nCont;j<rList.Count();j++)
+ for (j = nCont; j < rList.Count() && bInsert; ++j)
{
const StringPtr pTestStr=rList[j];
if(*pTestStr==*pStr)
- bTest=sal_False;
+ bInsert = false;
else
- if(*pTestStr>*pStr) break;
+ if (aCollator.compareString( *pStr, *pTestStr) < 0)
+ break; // insert before first greater than
}
- if(bTest)
+ if(bInsert)
{
rList.Insert( pStr,j);
aCurCurrencyList.Insert(i,j);