get rid of some Germanism (and some Windowsism)
Change-Id: I2ca1b34ff688a7d4fcf6c84c02035eda3ab0dee8
This commit is contained in:
parent
f1efc98b45
commit
29bfb507b3
@ -379,25 +379,25 @@ void SbiInstance::PrepareNumberFormatter( SvNumberFormatter*& rpNumberFormatter,
|
||||
// HACK, beause the numberformatter doesn't swap the place holders
|
||||
// for month, day and year according to the system setting.
|
||||
// Problem: Print Year(Date) under engl. BS
|
||||
// also have a look at: svtools\source\sbx\sbxdate.cxx
|
||||
// also have a look at: basic/source/sbx/sbxdate.cxx
|
||||
|
||||
OUString aDateStr;
|
||||
switch( eDate )
|
||||
{
|
||||
case MDY: aDateStr = "MM.TT.JJJJ"; break;
|
||||
case DMY: aDateStr = "TT.MM.JJJJ"; break;
|
||||
case YMD: aDateStr = "JJJJ.MM.TT"; break;
|
||||
default: aDateStr = "MM.TT.JJJJ"; break;
|
||||
default:
|
||||
case MDY: aDateStr = "MM/DD/YYYY"; break;
|
||||
case DMY: aDateStr = "DD/MM/YYYY"; break;
|
||||
case YMD: aDateStr = "YYYY/MM/DD"; break;
|
||||
}
|
||||
OUString aStr( aDateStr ); // PutandConvertEntry() modifies string!
|
||||
rpNumberFormatter->PutandConvertEntry( aStr, nCheckPos, nType,
|
||||
rnStdDateIdx, LANGUAGE_GERMAN, eLangType );
|
||||
rnStdDateIdx, LANGUAGE_ENGLISH_US, eLangType );
|
||||
nCheckPos = 0;
|
||||
OUString aStrHHMMSS(" HH:MM:SS");
|
||||
aDateStr += aStrHHMMSS;
|
||||
aStr = aDateStr;
|
||||
rpNumberFormatter->PutandConvertEntry( aStr, nCheckPos, nType,
|
||||
rnStdDateTimeIdx, LANGUAGE_GERMAN, eLangType );
|
||||
rnStdDateTimeIdx, LANGUAGE_ENGLISH_US, eLangType );
|
||||
}
|
||||
|
||||
|
||||
|
@ -110,24 +110,24 @@ double ImpGetDate( const SbxValues* p )
|
||||
// HACK, because the number formatter in PutandConvertEntry replace the wildcard
|
||||
// for month, day, year not according to the configuration.
|
||||
// Problem: Print Year(Date) under Engl. OS
|
||||
// quod vide basic\source\runtime\runtime.cxx
|
||||
// quod vide basic/source/runtime/runtime.cxx
|
||||
|
||||
SvtSysLocale aSysLocale;
|
||||
DateFormat eDate = aSysLocale.GetLocaleData().getDateFormat();
|
||||
OUString aDateStr;
|
||||
switch( eDate )
|
||||
{
|
||||
case MDY: aDateStr = "MM.TT.JJJJ"; break;
|
||||
case DMY: aDateStr = "TT.MM.JJJJ"; break;
|
||||
case YMD: aDateStr = "JJJJ.MM.TT"; break;
|
||||
default: aDateStr = "MM.TT.JJJJ";
|
||||
default:
|
||||
case MDY: aDateStr = "MM/DD/YYYY"; break;
|
||||
case DMY: aDateStr = "DD/MM/YYYY"; break;
|
||||
case YMD: aDateStr = "YYYY/MM/DD"; break;
|
||||
}
|
||||
|
||||
OUString aStr( aDateStr );
|
||||
aStr += " HH:MM:SS";
|
||||
|
||||
pFormatter->PutandConvertEntry( aStr, nCheckPos, nType,
|
||||
nIndex, LANGUAGE_GERMAN, eLangType );
|
||||
nIndex, LANGUAGE_ENGLISH_US, eLangType );
|
||||
sal_Bool bSuccess = pFormatter->IsNumberFormat( *p->pOUString, nIndex, nRes );
|
||||
if ( bSuccess )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user