summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2012-04-13 02:15:12 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2012-04-13 02:18:05 +0900
commit7465f5e604ee449006a243f1d55cb0882bb58ac1 (patch)
tree2cba05c5f3ba3ca132c37382e7684064a452d116 /basic
parentb30c9f7d8eea41fadcf3ff09db9e005f2f266006 (diff)
extract ImpGetIntntlSep() into sbxconv.hxx and reuse it
Diffstat (limited to 'basic')
-rw-r--r--basic/source/sbx/sbxconv.hxx2
-rw-r--r--basic/source/sbx/sbxcurr.cxx11
-rw-r--r--basic/source/sbx/sbxdec.cxx3
3 files changed, 5 insertions, 11 deletions
diff --git a/basic/source/sbx/sbxconv.hxx b/basic/source/sbx/sbxconv.hxx
index 2a11f151d862..8c0a4b1f0585 100644
--- a/basic/source/sbx/sbxconv.hxx
+++ b/basic/source/sbx/sbxconv.hxx
@@ -42,6 +42,8 @@ extern SbxError ImpScan
// with advanced evaluation (International, "TRUE"/"FALSE")
extern sal_Bool ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType );
+void ImpGetIntntlSep( sal_Unicode& rcDecimalSep, sal_Unicode& rcThousandSep );
+
// SBXINT.CXX
double ImpRound( double );
diff --git a/basic/source/sbx/sbxcurr.cxx b/basic/source/sbx/sbxcurr.cxx
index 20a396813824..a41834625f06 100644
--- a/basic/source/sbx/sbxcurr.cxx
+++ b/basic/source/sbx/sbxcurr.cxx
@@ -40,13 +40,10 @@ static rtl::OUString ImpCurrencyToString( const sal_Int64 &rVal )
bool isNeg = ( rVal < 0 );
sal_Int64 absVal = isNeg ? -rVal : rVal;
- SvtSysLocale aSysLocale;
sal_Unicode cDecimalSep = '.';
#if MAYBEFUTURE
sal_Unicode cThousandSep = ',';
- const LocaleDataWrapper& rData = aSysLocale.GetLocaleData();
- cDecimalSep = rData.getNumDecimalSep().GetBuffer()[0];
- cThousandSep = rData.getNumThousandSep().GetBuffer()[0];
+ ImpGetIntntlSep( cDecimalSep, cThousandSep );
#endif
rtl::OUString aAbsStr = rtl::OUString::valueOf( absVal );
@@ -119,14 +116,12 @@ static sal_Int64 ImpStringToCurrency( const rtl::OUString &rStr )
sal_Int32 nFractDigit = 4;
- SvtSysLocale aSysLocale;
sal_Unicode cDeciPnt = sal_Unicode('.');
sal_Unicode c1000Sep = sal_Unicode(',');
#if MAYBEFUTURE
- const LocaleDataWrapper& rData = aSysLocale.GetLocaleData();
- sal_Unicode cLocaleDeciPnt = rData.getNumDecimalSep().GetBuffer()[0];
- sal_Unicode cLocale1000Sep = rData.getNumThousandSep().GetBuffer()[0];
+ 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
diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx
index 320c444a120f..50d175991738 100644
--- a/basic/source/sbx/sbxdec.cxx
+++ b/basic/source/sbx/sbxdec.cxx
@@ -201,9 +201,6 @@ void SbxDecimal::setUInt( unsigned int val )
setULong( (sal_uInt32)val );
}
-// sbxscan.cxx
-void ImpGetIntntlSep( sal_Unicode& rcDecimalSep, sal_Unicode& rcThousandSep );
-
bool SbxDecimal::setString( ::rtl::OUString* pOUString )
{
static LCID nLANGID = MAKELANGID( LANG_ENGLISH, SUBLANG_ENGLISH_US );