Kaydet (Commit) acfe27b4 authored tarafından Jean-Pierre Ledure's avatar Jean-Pierre Ledure

Access2Base - Call GetLocale() only once

and not for each individual label

Change-Id: I7014be30569a275fa20faaa2ba9255d3968b70dd
üst ee0e713b
...@@ -14,7 +14,7 @@ REM ---------------------------------------------------------------------------- ...@@ -14,7 +14,7 @@ REM ----------------------------------------------------------------------------
Public Function _GetLabel(ByVal psShortlabel As String, Optional ByVal psLocale As String) As String Public Function _GetLabel(ByVal psShortlabel As String, Optional ByVal psLocale As String) As String
' Return the localized label corresponding with ShortLabel ' Return the localized label corresponding with ShortLabel
If IsMissing(psLocale) Then psLocale = UCase(Left(_GetLocale(), 2)) Else psLocale = UCase(psLocale) If IsMissing(psLocale) Then psLocale = UCase(Left(_A2B_.Locale, 2)) Else psLocale = UCase(psLocale)
On Local Error Goto Error_Function On Local Error Goto Error_Function
If Not Utils._InList(psLocale, Array( _ If Not Utils._InList(psLocale, Array( _
"EN", "FR", "ES" _ "EN", "FR", "ES" _
......
...@@ -27,6 +27,7 @@ Private TraceLogMaxEntries As Integer ...@@ -27,6 +27,7 @@ Private TraceLogMaxEntries As Integer
Private CalledSub As String Private CalledSub As String
Private Introspection As Object ' com.sun.star.beans.Introspection Private Introspection As Object ' com.sun.star.beans.Introspection
Private VersionNumber As String ' Actual Access2Base version number Private VersionNumber As String ' Actual Access2Base version number
Private Locale As String
Private FindRecord As Object Private FindRecord As Object
Private StatusBar As Object Private StatusBar As Object
Private Dialogs As Object ' Collection Private Dialogs As Object ' Collection
...@@ -46,6 +47,7 @@ Dim vCurrentDoc() As Variant ...@@ -46,6 +47,7 @@ Dim vCurrentDoc() As Variant
TraceLogLast = 0 TraceLogLast = 0
TraceLogMaxEntries = 0 TraceLogMaxEntries = 0
CalledSub = "" CalledSub = ""
Locale = L10N._GetLocale()
Set Introspection = CreateUnoService("com.sun.star.beans.Introspection") Set Introspection = CreateUnoService("com.sun.star.beans.Introspection")
Set FindRecord = Nothing Set FindRecord = Nothing
Set StatusBar = Nothing Set StatusBar = Nothing
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment