diff options
author | Oliver Bolte <obo@openoffice.org> | 2004-09-08 13:20:33 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2004-09-08 13:20:33 +0000 |
commit | e6344b9e609481c0f4acda2434472cc486300455 (patch) | |
tree | 2ccf598b8362aac00b7105e226fa69ec4c13db65 /wizards/source/tools | |
parent | 8f5e53fdf054c12684c6a161b04494b865b5f01d (diff) |
INTEGRATION: CWS qwizards2 (1.32.2); FILE MERGED
2004/07/08 15:27:40 tv 1.32.2.2: replaced deprecated service
2004/06/16 12:04:03 bc 1.32.2.1: ## presentationdocument service added
Diffstat (limited to 'wizards/source/tools')
-rw-r--r-- | wizards/source/tools/Misc.xba | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/wizards/source/tools/Misc.xba b/wizards/source/tools/Misc.xba index fe8ce75fb5ea..99ec3d11b79a 100644 --- a/wizards/source/tools/Misc.xba +++ b/wizards/source/tools/Misc.xba @@ -177,20 +177,21 @@ End Function ' Gets a special configured PathSetting Function GetPathSettings(sPathType as String, Optional bshowall as Boolean, Optional ListIndex as integer) as String -Dim oPathSettings as Object +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") - oPathSettings = createUnoService("com.sun.star.util.PathSettings") +Dim oPS as Object + + oPS = createUnoService("com.sun.star.util.PathSettings") + If Not IsMissing(bShowall) Then If bShowAll Then - ShowPropertyValues(oPathSettings) + ShowPropertyValues(oPS) Exit Function End If End If - sPath = oPathSettings.GetPropertyValue(sPathType) + sPath = oPS.getPropertyValue(sPathType) If Not IsMissing(ListIndex) Then ' Share and User-Directory If Instr(1,sPath,";") <> 0 Then @@ -435,12 +436,15 @@ End Sub Function GetDocumentType(oDocument) On Local Error GoTo NODOCUMENTTYPE +' ShowSupportedServiceNames(oDocument) If oDocument.SupportsService("com.sun.star.sheet.SpreadsheetDocument") Then GetDocumentType() = "scalc" ElseIf oDocument.SupportsService("com.sun.star.text.TextDocument") Then GetDocumentType() = "swriter" ElseIf oDocument.SupportsService("com.sun.star.drawing.DrawingDocument") Then GetDocumentType() = "sdraw" + ElseIf oDocument.SupportsService("com.sun.star.presentation.PresentationDocument") Then + GetDocumentType() = "simpress" ElseIf oDocument.SupportsService("com.sun.star.formula.FormulaProperties") Then GetDocumentType() = "smath" End If @@ -755,18 +759,18 @@ Dim ErrMsg as String oDocument = StarDesktop.LoadComponentFromURL(sUrl,"_default",0, NoArgs()) NOMODULEINSTALLED: If (Err <> 0) OR IsNull(oDocument) Then - If InitResources("", "dbw") Then + If InitResources("", "com") Then Select Case sType Case "swriter" - ErrMsg = GetResText(501) + ErrMsg = GetResText(1001) Case "scalc" - ErrMsg = GetResText(502) + ErrMsg = GetResText(1002) Case "simpress" - ErrMsg = GetResText(503) + ErrMsg = GetResText(1003) Case "sdraw" - ErrMsg = GetResText(504) + ErrMsg = GetResText(1004) Case "smath" - ErrMsg = GetResText(505) + ErrMsg = GetResText(1005) Case Else ErrMsg = "Invalid Document Type!" End Select @@ -806,4 +810,4 @@ Dim oFrame as Object End If End Sub -</script:module> +</script:module>
\ No newline at end of file |