diff options
author | Behrend Cornelius <bc@openoffice.org> | 2002-11-06 14:18:31 +0000 |
---|---|---|
committer | Behrend Cornelius <bc@openoffice.org> | 2002-11-06 14:18:31 +0000 |
commit | 810b3473a08f9270259683b2a5d1bdf8b99321ed (patch) | |
tree | f5872393ba5267579e810aa8fa03eba0fe78bfcc /wizards/source/tools/Misc.xba | |
parent | bb076a8c1e4cca59e8e1bfba555f65a3dfdce26b (diff) |
#104710# GetOfficeSubPath routine modified. Resource added
Diffstat (limited to 'wizards/source/tools/Misc.xba')
-rw-r--r-- | wizards/source/tools/Misc.xba | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/wizards/source/tools/Misc.xba b/wizards/source/tools/Misc.xba index 60d09cb6d587..e254aa33043b 100644 --- a/wizards/source/tools/Misc.xba +++ b/wizards/source/tools/Misc.xba @@ -181,7 +181,8 @@ Dim oSettings, oPathSettings as Object Dim sPath as String Dim PathList() as String Dim MaxIndex as Integer - +Dim oUcb as Object + oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") oSettings = createUnoService("com.sun.star.frame.Settings") oPathSettings = oSettings.getByName("PathSettings") If Not IsMissing(bShowall) Then @@ -198,7 +199,7 @@ Dim MaxIndex as Integer If ListIndex <= MaxIndex Then sPath = PathList(ListIndex) Else - Msgbox("Cannot analyze the String " & sPath , 16, GetProductName()) + Msgbox("String Cannot be analyzed!" & sPath , 16, GetProductName()) End If End If End If @@ -207,6 +208,7 @@ Dim MaxIndex as Integer Else GetPathSettings = sPath End If + End Function @@ -216,13 +218,13 @@ End Function ' The parameter must be passed over in Url-scription ' The return-Value is in Urlscription Function GetOfficeSubPath(sOfficePath as String, ByVal sSubDir as String) -Dim oUcb as Object Dim sOfficeString as String Dim sOfficeList() as String Dim sOfficeDir as String Dim sBigDir as String Dim i as Integer Dim MaxIndex as Integer +Dim oUcb as Object oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") sOfficeString = GetPathSettings(sOfficePath) If Right(sSubDir,1) <> "/" Then @@ -240,10 +242,33 @@ Dim MaxIndex as Integer Exit Function End If Next i + ShowNoOfficePathError() GetOfficeSubPath = "" End Function +Sub ShowNoOfficePathError() +Dim ProductName as String +Dim sError as String +Dim bResObjectexists as Boolean +Dim oLocResSrv as Object + bResObjectexists = not IsNull(oResSrv) + If bResObjectexists Then + oLocResSrv = oResSrv + End If + If InitResources("Tools", "com") Then + ProductName = GetProductName() + sError = GetResText(1006) + sError = ReplaceString(sError, ProductName, "%PRODUCTNAME") + sError = ReplaceString(sError, chr(13), "<BR>") + MsgBox(sError, 16, ProductName) + End If + If bResObjectexists Then + oResSrv = oLocResSrv + End If + +End Sub + Function InitResources(Description, ShortDescription as String) as boolean On Error Goto ErrorOcurred |