summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-12 13:01:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-13 09:12:58 +0200
commite272761e8fca9eccbf6fd5737df2b1aee1730947 (patch)
treef60cf5f8febc599a910d0a94e1fbd6ce960920d1 /basic
parent42353b95629322f51e059337ab06579ffb1c6934 (diff)
remove MAYBEFUTURE dead code
Seems to date from: commit c631cf94e468d6f5ced5cacda3600c683c44dca2 Author: John LeMoyne Castle <jlc@mail2lee.com> Date: Tue Dec 21 15:47:53 2010 +0000 68bit currency enhancement Change-Id: I81863991ec3717ea213dffb535283e6fc8abceb7 Reviewed-on: https://gerrit.libreoffice.org/38693 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/sbx/sbxcurr.cxx54
1 files changed, 0 insertions, 54 deletions
diff --git a/basic/source/sbx/sbxcurr.cxx b/basic/source/sbx/sbxcurr.cxx
index 130f51e6de27..9f013ea64f8c 100644
--- a/basic/source/sbx/sbxcurr.cxx
+++ b/basic/source/sbx/sbxcurr.cxx
@@ -32,10 +32,6 @@ static OUString ImpCurrencyToString( sal_Int64 rVal )
sal_Int64 absVal = isNeg ? -rVal : rVal;
sal_Unicode cDecimalSep = '.';
-#ifdef MAYBEFUTURE
- sal_Unicode cThousandSep = ',';
- ImpGetIntntlSep( cDecimalSep, cThousandSep );
-#endif
OUString aAbsStr = OUString::number( absVal );
OUStringBuffer aBuf;
@@ -51,13 +47,6 @@ static OUString ImpCurrencyToString( sal_Int64 rVal )
if ( !bLessThanOne )
{
nCapacity = initialLen + 1;
-#ifdef MAYBEFUTURE
- if ( initialLen > 5 )
- {
- sal_Int32 nThouSeparators = ( initialLen - 5 ) / 3;
- nCapacity += nThouSeparators;
- }
-#endif
}
if ( isNeg )
@@ -74,10 +63,6 @@ static OUString ImpCurrencyToString( sal_Int64 rVal )
{
if ( nDigitCount == 4 )
aBuf[nInsertIndex--] = cDecimalSep;
-#ifdef MAYBEFUTURE
- if ( nDigitCount > 4 && ! ( ( nDigitCount - 4 ) % 3) )
- aBuf[nInsertIndex--] = cThousandSep;
-#endif
if ( nDigitCount < initialLen )
aBuf[nInsertIndex--] = aAbsStr[ charCpyIndex-- ];
else
@@ -110,45 +95,6 @@ static sal_Int64 ImpStringToCurrency( const OUString &rStr )
sal_Unicode cDeciPnt = '.';
sal_Unicode c1000Sep = ',';
-#ifdef MAYBEFUTURE
- sal_Unicode cLocaleDeciPnt, cLocale1000Sep;
- ImpGetIntntlSep( cLocaleDeciPnt, cLocale1000Sep );
-
- // score each set of separators (Locale and Basic) on total number of matches
- // if one set has more matches use that set
- // if tied use the set with the only or rightmost decimal separator match
- // currency is fixed pt system: usually expect the decimal pt, 1000sep may occur
- sal_Int32 LocaleScore = 0;
- sal_Int32 LocaleLastDeci = -1;
- sal_Int32 LOBasicScore = 0;
- sal_Int32 LOBasicLastDeci = -1;
-
- for( int idx=0; idx<rStr.getLength(); idx++ )
- {
- if ( *(p+idx) == cLocaleDeciPnt )
- {
- LocaleScore++;
- LocaleLastDeci = idx;
- }
- if ( *(p+idx) == cLocale1000Sep )
- LocaleScore++;
-
- if ( *(p+idx) == cDeciPnt )
- {
- LOBasicScore++;
- LOBasicLastDeci = idx;
- }
- if ( *(p+idx) == c1000Sep )
- LOBasicScore++;
- }
- if ( ( LocaleScore > LOBasicScore )
- ||( LocaleScore = LOBasicScore && LocaleLastDeci > LOBasicLastDeci ) )
- {
- cDeciPnt = cLocaleDeciPnt;
- c1000Sep = cLocale1000Sep;
- }
-#endif
-
// lets use the existing string number conversions
// there is a performance impact here ( multiple string copies )
// but better I think than a home brewed string parser, if we need a parser