author | eric <eric> | 2003-02-25 13:37:30 (UTC) |
---|---|---|
committer | eric <eric> | 2003-02-25 13:37:30 (UTC) |
commit | af4a36adc86052db4ab6855830cb7c5cc9e2d008 (patch) (side-by-side diff) | |
tree | 6c1e4c51ce9663b8256f56aa0c98ab1eaab72d07 /noncore | |
parent | e21765875b06f8e76bdd6cfce120a68beaf48e41 (diff) | |
download | opie-af4a36adc86052db4ab6855830cb7c5cc9e2d008.zip opie-af4a36adc86052db4ab6855830cb7c5cc9e2d008.tar.gz opie-af4a36adc86052db4ab6855830cb7c5cc9e2d008.tar.bz2 |
- add more currency support
-rw-r--r-- | noncore/tools/euroconv/calcdisplay.cpp | 40 | ||||
-rw-r--r-- | noncore/tools/euroconv/currency.h | 10 |
2 files changed, 43 insertions, 7 deletions
diff --git a/noncore/tools/euroconv/calcdisplay.cpp b/noncore/tools/euroconv/calcdisplay.cpp index 1659858..898de81 100644 --- a/noncore/tools/euroconv/calcdisplay.cpp +++ b/noncore/tools/euroconv/calcdisplay.cpp @@ -167,50 +167,82 @@ setValue(dCurrentValue); /*********************************************************************** * Euro2x converts dValue from Euro to the currency which combo box * index is provided in iIndex. **********************************************************************/ double LCDDisplay::Euro2x(int iIndex, double dValue){ switch (iIndex){ case 0: // Euro return(dValue); break; case 1: // FF: French Francs - return(dValue*FF); + return(dValue*FRF); break; case 2: // DM: Deutch Mark - return(dValue*DM); + return(dValue*DEM); + break; + + case 3: // BEL Belgium Francs + return(dValue*BEF); + break; + + case 4: // ITL Itialian Lire + return(dValue*ITL); + break; + + case 5: // LUF Luxemburg + return(dValue*LUF); + break; + + case 6: // IEP Irish Pound + return(dValue*IEP); break; default: return 0; }//switch (iIndex) }// fct Eur2x /*********************************************************************** * x2Euro converts dValue to Euro from the currency which combo box * index is provided in iIndex. **********************************************************************/ double LCDDisplay::x2Euro(int iIndex, double dValue){ switch (iIndex){ case 0: // Euro return(dValue); break; case 1: // FF: French Francs - return(dValue/FF); + return(dValue/FRF); break; case 2: // DM: Deutch Mark - return(dValue/DM); + return(dValue/DEM); + break; + + case 3: // BEL Belgium Francs + return(dValue/BEF); + break; + + case 4: // ITL Itialian Lire + return(dValue/ITL); + break; + + case 5: // LUF Luxemburg + return(dValue/LUF); + break; + + case 6: // IEP Irish Pound + return(dValue/IEP); break; }//switch (iIndex) // we shouldn't come here return 0; }// fct x2Euro diff --git a/noncore/tools/euroconv/currency.h b/noncore/tools/euroconv/currency.h index d9ee75c..6ca4d09 100644 --- a/noncore/tools/euroconv/currency.h +++ b/noncore/tools/euroconv/currency.h @@ -5,16 +5,20 @@ * Description: define constant for currency compare Euro * * * Authors: Eric Santonacci <Eric.Santonacci@talc.fr> * * * $Id$ * ***************************************************************************/ // 1 Euro equal.... #define EURO 1 // Euro -#define FF 6.55957 // French Francs -#define DM 1.9594 // Deutch Mark +#define FRF 6.55957 // French Francs +#define DEM 1.9594 // Deutch Mark +#define BEF 40.3399 // Belgium Francs +#define ITL 1936.27 // Italian Lire +#define LUF 40.3399 // Luxemburg +#define IEP 0.787564 // Irish Pound -static const char* aCurrency[] = { "Euro", "FF", "DM", 0 }; +static const char* aCurrency[] = { "Euro", "FRF", "DEM", "BEF", "ITL", "LUF", "IEP", 0 }; |