summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehrend Cornelius <bc@openoffice.org>2001-07-13 07:26:28 +0000
committerBehrend Cornelius <bc@openoffice.org>2001-07-13 07:26:28 +0000
commit55b3870d456b1b9ebbbf1f881a3b0bc48c280e80 (patch)
treefcfc42793461140910f5a63bd168286973791840
parentfce5a701b814dd75d23689c57ba971c91eddeb6c (diff)
#89603# FileOpenRoutine modified
-rw-r--r--wizards/source/tools/ModuleControls.xba30
-rw-r--r--wizards/source/tools/Strings.xba63
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 &gt; 100 Then
- iDlgHeight = 26
- oDialog.GetControl(&quot;imgTheme&quot;).visible = false
- oDialog.GetControl(&quot;cmdSwitchHeight&quot;).Model.Label = CHR(9663)
- oDialog.GetControl(&quot;cmdSwitchHeight&quot;).Model.HelpText = sHeightenDialog
- Else
- iDlgHeight = 210
- oDialog.GetControl(&quot;imgTheme&quot;).visible = true
- oDialog.GetControl(&quot;cmdSwitchHeight&quot;).Model.Label = CHR(9653)
- oDialog.GetControl(&quot;cmdSwitchHeight&quot;).Model.HelpText = sReduceDialog
- End If
- iYPos = iDlgHeight - 20
- oDialogModel.cmdCancel.PositionY = iYPos
- oDialogModel.cmdHelp.PositionY = iYPos
-&apos; Todo: Abfragen, ob in der Sequenze oDialogModel.GetControls() auch ein cmdBack
-&apos; 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
&apos; Converts an &quot;ordinary&quot; path to a &quot;URL-Path&quot;
-Function ConverttoURL(ByVal BigString as String) as String
-Dim Separator as String
- If sProductname = &quot;&quot; Then
- sProductname = GetProductname()
- End If
- If BigString &lt;&gt; &quot;&quot; Then
- If IsFatOffice() Then
- Separator = GetPathSeparator()
- &apos; Is the delivered Path already a URL
- If Instr(1,UCase(BigString),&quot;FILE:///&quot;) = 0 Then
- BigString = ReplaceString(BigString,&quot;/&quot;,Separator)
- BigString = &quot;file:///&quot; &amp; BigString
- End If
- End If
- ConvertToURL = BigString
- Else
- ConvertToUrl = &quot;&quot;
- End If
-End Function
+&apos;Function ConverttoURL(ByVal BigString as String) as String
+&apos;Dim Separator as String
+&apos; If sProductname = &quot;&quot; Then
+&apos; sProductname = GetProductname()
+&apos; End If
+&apos; If BigString &lt;&gt; &quot;&quot; Then
+&apos; If IsFatOffice() Then
+&apos; Separator = GetPathSeparator()
+&apos; &apos; Is the delivered Path already a URL
+&apos; If Instr(1,UCase(BigString),&quot;FILE:///&quot;) = 0 Then
+&apos; BigString = ReplaceString(BigString,&quot;/&quot;,Separator)
+&apos; BigString = &quot;file:///&quot; &amp; BigString
+&apos; End If
+&apos; End If
+&apos; ConvertToURL = BigString
+&apos; Else
+&apos; ConvertToUrl = &quot;&quot;
+&apos; End If
+&apos;End Function
&apos; Converts an &quot;URL-Path&quot; to an ordinary &quot;Path&quot;
-Function ConvertfromURL(ByVal BigString as String) as String
-Dim Separator as String
- Separator = GetPathSeparator()
- If Left(Ucase(BigString),8)= &quot;FILE:///&quot; Then
- BigString = Mid(BigString, 9, Len(BigString)-8)
- BigString = ReplaceString(BigString,Separator,&quot;/&quot;)
- BigString = ReplaceString(BigString,&quot;:&quot;,&quot;|&quot;)
- ConvertFromUrl = BigString
- End If
-End Function
+&apos;Function ConvertfromURL(ByVal BigString as String) as String
+&apos;Dim Separator as String
+&apos; Separator = GetPathSeparator()
+&apos; If Left(Ucase(BigString),8)= &quot;FILE:///&quot; Then
+&apos; BigString = Mid(BigString, 9, Len(BigString)-8)
+&apos; BigString = ReplaceString(BigString,Separator,&quot;/&quot;)
+&apos; BigString = ReplaceString(BigString,&quot;:&quot;,&quot;|&quot;)
+&apos; ConvertFromUrl = BigString
+&apos; End If
+&apos;End Function
&apos; Retrieves the second value for a next to &apos;SearchString&apos; 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