diff options
author | Behrend Cornelius <bc@openoffice.org> | 2001-07-13 07:26:28 +0000 |
---|---|---|
committer | Behrend Cornelius <bc@openoffice.org> | 2001-07-13 07:26:28 +0000 |
commit | 55b3870d456b1b9ebbbf1f881a3b0bc48c280e80 (patch) | |
tree | fcfc42793461140910f5a63bd168286973791840 | |
parent | fce5a701b814dd75d23689c57ba971c91eddeb6c (diff) |
#89603# FileOpenRoutine modified
-rw-r--r-- | wizards/source/tools/ModuleControls.xba | 30 | ||||
-rw-r--r-- | wizards/source/tools/Strings.xba | 63 |
2 files changed, 34 insertions, 59 deletions
diff --git a/wizards/source/tools/ModuleControls.xba b/wizards/source/tools/ModuleControls.xba index b4c2bfa8d2fe..c2c4d72fe7cc 100644 --- a/wizards/source/tools/ModuleControls.xba +++ b/wizards/source/tools/ModuleControls.xba @@ -157,34 +157,6 @@ Dim oRuntimeDialog as Object End Function -Sub SwitchWizardDialogHeight(oDialog as Object, sReduceDialog as String, sHeightenDialog as String) -Dim oDialogModel as Object -Dim iDlgHeight as Integer -Dim iYPos as Integer - oDialogModel = oDialog.Model - If oDialogModel.Height > 100 Then - iDlgHeight = 26 - oDialog.GetControl("imgTheme").visible = false - oDialog.GetControl("cmdSwitchHeight").Model.Label = CHR(9663) - oDialog.GetControl("cmdSwitchHeight").Model.HelpText = sHeightenDialog - Else - iDlgHeight = 210 - oDialog.GetControl("imgTheme").visible = true - oDialog.GetControl("cmdSwitchHeight").Model.Label = CHR(9653) - oDialog.GetControl("cmdSwitchHeight").Model.HelpText = sReduceDialog - End If - iYPos = iDlgHeight - 20 - oDialogModel.cmdCancel.PositionY = iYPos - oDialogModel.cmdHelp.PositionY = iYPos -' Todo: Abfragen, ob in der Sequenze oDialogModel.GetControls() auch ein cmdBack -' vorhanden ist - oDialogModel.cmdBack.PositionY = iYPos - oDialogModel.cmdGoOn.PositionY = iYPos - oDialogModel.cmdSwitchHeight.PositionY = iYPos - oDialogModel.Height = iDlgHeight -End Sub - - Sub GetFolderName(oRefModel as Object) Dim oFolderDialog Dim iAccept as Integer @@ -200,7 +172,7 @@ Dim oUcb as object End If iAccept = oFolderDialog.Execute() If iAccept = 1 Then - sPath = oFolderDialog.GetDisplayDirectory() + sPath = oFolderDialog.GetDirectory() If oUcb.Exists(sPath) Then oRefModel.Text = ConvertFromUrl(sPath) End If diff --git a/wizards/source/tools/Strings.xba b/wizards/source/tools/Strings.xba index d43d36ec5ed7..2855b8c7fe42 100644 --- a/wizards/source/tools/Strings.xba +++ b/wizards/source/tools/Strings.xba @@ -280,38 +280,38 @@ End Function ' Converts an "ordinary" path to a "URL-Path" -Function ConverttoURL(ByVal BigString as String) as String -Dim Separator as String - If sProductname = "" Then - sProductname = GetProductname() - End If - If BigString <> "" Then - If IsFatOffice() Then - Separator = GetPathSeparator() - ' Is the delivered Path already a URL - If Instr(1,UCase(BigString),"FILE:///") = 0 Then - BigString = ReplaceString(BigString,"/",Separator) - BigString = "file:///" & BigString - End If - End If - ConvertToURL = BigString - Else - ConvertToUrl = "" - End If -End Function +'Function ConverttoURL(ByVal BigString as String) as String +'Dim Separator as String +' If sProductname = "" Then +' sProductname = GetProductname() +' End If +' If BigString <> "" Then +' If IsFatOffice() Then +' Separator = GetPathSeparator() +' ' Is the delivered Path already a URL +' If Instr(1,UCase(BigString),"FILE:///") = 0 Then +' BigString = ReplaceString(BigString,"/",Separator) +' BigString = "file:///" & BigString +' End If +' End If +' ConvertToURL = BigString +' Else +' ConvertToUrl = "" +' End If +'End Function ' Converts an "URL-Path" to an ordinary "Path" -Function ConvertfromURL(ByVal BigString as String) as String -Dim Separator as String - Separator = GetPathSeparator() - If Left(Ucase(BigString),8)= "FILE:///" Then - BigString = Mid(BigString, 9, Len(BigString)-8) - BigString = ReplaceString(BigString,Separator,"/") - BigString = ReplaceString(BigString,":","|") - ConvertFromUrl = BigString - End If -End Function +'Function ConvertfromURL(ByVal BigString as String) as String +'Dim Separator as String +' Separator = GetPathSeparator() +' If Left(Ucase(BigString),8)= "FILE:///" Then +' BigString = Mid(BigString, 9, Len(BigString)-8) +' BigString = ReplaceString(BigString,Separator,"/") +' BigString = ReplaceString(BigString,":","|") +' ConvertFromUrl = BigString +' End If +'End Function ' Retrieves the second value for a next to 'SearchString' in @@ -448,12 +448,15 @@ On Local Error Goto No2ndDim End Function -Function GetValueoutofList(SearchValue, BigList(), iDim as Integer) +Function GetValueoutofList(SearchValue, BigList(), iDim as Integer, Optional ValueIndex) Dim i as Integer Dim MaxIndex as Integer MaxIndex = Ubound(BigList(),1) For i = 0 To MaxIndex If BigList(i,0) = SearchValue Then + If Not IsMissing(ValueIndex) Then + ValueIndex = i + End If GetValueOutOfList() = BigList(i,iDim) End If Next i |