diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-07-21 18:34:26 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-07-21 18:34:26 +0200 |
commit | 09727e4dbf46c3cb0dcd5de27b2b3c648425ac8b (patch) | |
tree | caba50518b9f6a5818c8fa5869524c0f33c0c08d /wizards/source/tools | |
parent | c7ae1c289e34a90727f388cda3b837b07804eb48 (diff) | |
parent | cfbcec3375a958cd0ff4a03c4eb6afded9b803d2 (diff) |
resyncing to master
Diffstat (limited to 'wizards/source/tools')
-rw-r--r-- | wizards/source/tools/Misc.xba | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/wizards/source/tools/Misc.xba b/wizards/source/tools/Misc.xba index 7eca46671f12..faa0f802f6c6 100644 --- a/wizards/source/tools/Misc.xba +++ b/wizards/source/tools/Misc.xba @@ -271,14 +271,18 @@ End Sub Function InitResources(Description, ShortDescription as String) as boolean +Dim xResource as Object +Dim aArgs(0) as String On Error Goto ErrorOcurred - oResSrv = createUnoService( "com.sun.star.resource.VclStringResourceLoader" ) - If (IsNull(oResSrv)) then + aArgs(0) = ShortDescription + oConfigProvider = createUnoService("com.sun.star.configuration.ConfigurationProvider") + xResource = getProcessServiceManager().createInstanceWithArguments( "org.libreoffice.resource.ResourceIndexAccess", aArgs() ) + If (IsNull(xResource)) then InitResources = FALSE - MsgBox( Description & ": No resource loader found", 16, GetProductName()) + MsgBox("could not initialize ResourceIndexAccess") Else InitResources = TRUE - oResSrv.FileName = ShortDescription + oResSrv = xResource.getByName( "String" ) End If Exit Function ErrorOcurred: @@ -294,7 +298,7 @@ End Function Function GetResText( nID as integer ) As string On Error Goto ErrorOcurred If Not IsNull(oResSrv) Then - GetResText = oResSrv.getString( nID ) + GetResText = oResSrv.getByIndex( nID ) Else GetResText = "" End If @@ -814,4 +818,4 @@ End Sub Function CalIsLeapYear(ByVal iYear as Integer) as Boolean CalIsLeapYear = ((iYear Mod 4 = 0) And ((iYear Mod 100 <> 0) Or (iYear Mod 400 = 0))) End Function -</script:module>
\ No newline at end of file +</script:module> |