[Libreoffice-commits] core.git: basic/source

Eike Rathke erack at redhat.com
Thu Apr 18 14:43:38 PDT 2013


 basic/source/runtime/runtime.cxx |   14 +++++++-------
 basic/source/sbx/sbxdate.cxx     |   12 ++++++------
 2 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 29bfb507b39b84a788df66d91e23166a8cfa88f2
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Apr 18 23:24:52 2013 +0200

    get rid of some Germanism (and some Windowsism)
    
    Change-Id: I2ca1b34ff688a7d4fcf6c84c02035eda3ab0dee8

diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index d18f42b..d1f026d 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -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 );
 }
 
 
diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx
index 40896b2..6db87a7 100644
--- a/basic/source/sbx/sbxdate.cxx
+++ b/basic/source/sbx/sbxdate.cxx
@@ -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 )
             {


More information about the Libreoffice-commits mailing list