diff options
Diffstat (limited to 'wizards/source/scriptforge/SF_Utils.xba')
-rw-r--r-- | wizards/source/scriptforge/SF_Utils.xba | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/wizards/source/scriptforge/SF_Utils.xba b/wizards/source/scriptforge/SF_Utils.xba index b18a42781bab..b3031e33f09a 100644 --- a/wizards/source/scriptforge/SF_Utils.xba +++ b/wizards/source/scriptforge/SF_Utils.xba @@ -368,19 +368,6 @@ Dim vNodePath As Variant Set .Introspection = CreateUnoService("com.sun.star.beans.Introspection") End If Set _GetUNOService = .Introspection - Case "Locale" - If IsEmpty(.Locale) Or IsNull(.Locale) Then - .Locale = CreateUnoStruct("com.sun.star.lang.Locale") - ' Derived from the Tools library - Set oConfigProvider = createUnoService("com.sun.star.configuration.ConfigurationProvider") - vNodePath = Array() : ReDim vNodePath(0) - vNodePath(0) = New com.sun.star.beans.PropertyValue - vNodePath(0).Name = "nodepath" : vNodePath(0).Value = "org.openoffice.Setup/L10N" - sLocale = oConfigProvider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", vNodePath()).getByName("ooLocale") - .Locale.Language = Left(sLocale, 2) - .Locale.Country = Right(sLocale, 2) - End If - Set _GetUNOService = .Locale Case "MacroExpander" Set oDefaultContext = GetDefaultContext() If Not IsNull(oDefaultContext) Then Set _GetUNOService = oDefaultContext.getValueByName("/singletons/com.sun.star.util.theMacroExpander") @@ -429,6 +416,19 @@ Dim vNodePath As Variant End With End If Set _GetUNOService = .SearchOptions + Case "SystemLocale", "Locale" + If IsEmpty(.Locale) Or IsNull(.Locale) Then + .Locale = CreateUnoStruct("com.sun.star.lang.Locale") + ' Derived from the Tools library + Set oConfigProvider = createUnoService("com.sun.star.configuration.ConfigurationProvider") + vNodePath = Array() : ReDim vNodePath(0) + vNodePath(0) = New com.sun.star.beans.PropertyValue + vNodePath(0).Name = "nodepath" : vNodePath(0).Value = "org.openoffice.System/L10N" + sLocale = oConfigProvider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", vNodePath()).getByName("SystemLocale") + .Locale.Language = Left(sLocale, 2) + .Locale.Country = Right(sLocale, 2) + End If + Set _GetUNOService = .Locale Case "SystemShellExecute" If IsEmpty(.SystemShellExecute) Or IsNull(.SystemShellExecute) Then Set .SystemShellExecute = CreateUnoService("com.sun.star.system.SystemShellExecute") |