summaryrefslogtreecommitdiff
path: root/wizards/source/tools/Misc.xba
diff options
context:
space:
mode:
Diffstat (limited to 'wizards/source/tools/Misc.xba')
-rw-r--r--wizards/source/tools/Misc.xba6
1 files changed, 4 insertions, 2 deletions
diff --git a/wizards/source/tools/Misc.xba b/wizards/source/tools/Misc.xba
index 576bc58c525c..4a05f20bf092 100644
--- a/wizards/source/tools/Misc.xba
+++ b/wizards/source/tools/Misc.xba
@@ -76,13 +76,15 @@ End Function
Function GetStarOfficeLocale() as New com.sun.star.lang.Locale
Dim aLocLocale As New com.sun.star.lang.Locale
Dim sLocale as String
-Dim sLocaleList()
+Dim sLocaleList(1)
Dim oMasterKey
oMasterKey = GetRegistryKeyContent("org.openoffice.UserProfile/International/")
sLocale = oMasterKey.getByName("Locale")
sLocaleList() = ArrayoutofString(sLocale, "-")
aLocLocale.Language = sLocaleList(0)
- aLocLocale.Country = sLocaleList(1)
+ If Ubound(sLocaleList()) > 0 Then
+ aLocLocale.Country = sLocaleList(1)
+ End If
GetStarOfficeLocale() = aLocLocale
End Function