summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wizards/source/template/Autotext.xba2
-rw-r--r--wizards/source/template/Correspondence.xba2
-rw-r--r--wizards/source/template/DialogStyles.xdl8
-rw-r--r--wizards/source/template/Samples.xba15
-rw-r--r--wizards/source/template/TemplateDialog.xdl20
-rw-r--r--wizards/source/tools/Debug.xba10
-rw-r--r--wizards/source/tools/Misc.xba6
-rw-r--r--wizards/source/tools/ModuleControls.xba6
-rw-r--r--wizards/source/tools/Strings.xba96
-rw-r--r--wizards/source/webwizard/HtmlAutoPilotBasic.xba3
-rw-r--r--wizards/source/webwizard/WebWzrd.xdl2
11 files changed, 104 insertions, 66 deletions
diff --git a/wizards/source/template/Autotext.xba b/wizards/source/template/Autotext.xba
index 14b74d3ef205..d9aca4269f31 100644
--- a/wizards/source/template/Autotext.xba
+++ b/wizards/source/template/Autotext.xba
@@ -135,4 +135,4 @@ Dim MaxIndex as Integer
End Sub
-</script:module>
+</script:module> \ No newline at end of file
diff --git a/wizards/source/template/Correspondence.xba b/wizards/source/template/Correspondence.xba
index 27299a7fc35c..ce3bf788ab14 100644
--- a/wizards/source/template/Correspondence.xba
+++ b/wizards/source/template/Correspondence.xba
@@ -212,4 +212,4 @@ Dim oDisp as Object
oDisp = StarDesktop.currentFrame.queryDispatch(oUrl, &quot;_self&quot;, 0)
oDisp.dispatch(oUrl, oArg())
End Sub
-</script:module>
+</script:module> \ No newline at end of file
diff --git a/wizards/source/template/DialogStyles.xdl b/wizards/source/template/DialogStyles.xdl
index 84b22e8027ec..969cc9ccb0e8 100644
--- a/wizards/source/template/DialogStyles.xdl
+++ b/wizards/source/template/DialogStyles.xdl
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
-<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" dlg:id="DialogStyles" dlg:left="170" dlg:top="93" dlg:width="120" dlg:height="169">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" dlg:id="DialogStyles" dlg:style-id="0" dlg:left="170" dlg:top="93" dlg:width="120" dlg:height="169">
<dlg:styles>
<dlg:style dlg:style-id="0"/>
</dlg:styles>
<dlg:bulletinboard>
- <dlg:button dlg:style-id="0" dlg:id="cmdCancel" dlg:left="5" dlg:top="150" dlg:width="50" dlg:height="13" dlg:value="cmdCancel">
+ <dlg:button dlg:style-id="0" dlg:id="cmdCancel" dlg:tab-index="0" dlg:left="5" dlg:top="150" dlg:width="50" dlg:height="13" dlg:value="cmdCancel">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="Template.Samples.RestoreCurrentStyles"/>
</dlg:button>
- <dlg:button dlg:style-id="0" dlg:id="cmdOk" dlg:left="65" dlg:top="150" dlg:width="50" dlg:height="12" dlg:value="cmdOk">
+ <dlg:button dlg:style-id="0" dlg:id="cmdOk" dlg:tab-index="1" dlg:left="65" dlg:top="150" dlg:width="50" dlg:height="12" dlg:value="cmdOk">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="Template.Samples.CloseStyleDialog"/>
</dlg:button>
- <dlg:menulist dlg:style-id="0" dlg:id="lbStyles" dlg:left="5" dlg:top="5" dlg:width="110" dlg:height="133">
+ <dlg:menulist dlg:style-id="0" dlg:id="lbStyles" dlg:tab-index="2" dlg:left="5" dlg:top="5" dlg:width="110" dlg:height="133">
<dlg:event dlg:listener-type="com.sun.star.awt.XItemListener" dlg:event-method="itemStateChanged" dlg:script-type="StarBasic" dlg:script-code="Template.Samples.SelectStyle"/>
</dlg:menulist>
</dlg:bulletinboard>
diff --git a/wizards/source/template/Samples.xba b/wizards/source/template/Samples.xba
index 00407ef7bc77..b4feb5aa6b68 100644
--- a/wizards/source/template/Samples.xba
+++ b/wizards/source/template/Samples.xba
@@ -4,7 +4,7 @@
Const SAMPLES = 1000
Const STYLES = 1100
-Const aTempFileName = &quot;Berend_Ilko_Peter_Tom.vor&quot;
+Const aTempFileName = &quot;Berend_Ilko_Tom_Stella_Volker.stc&quot;
Public Const Twip = 425
Dim oUcbObject as Object
Public StylesDir as String
@@ -91,12 +91,13 @@ Dim MaxIndex as Integer
DialogModel.Title = GetResText(STYLES)
DialogModel.cmdCancel.Label = GetResText(STYLES+2)
DialogModel.cmdOk.Label = GetResText(STYLES+3)
- Stylenames() = ReadDirectories(StylesDir, False, False, True,)
- MaxIndex = Val(StyleNames(0,0))-1
+ Stylenames() = ReadDirectories(StylesDir, False, False, True,)
+ MaxIndex = Ubound(Stylenames())
+ BubbleSortList(Stylenames(),True)
Dim cStyles(MaxIndex)
For t = 0 to MaxIndex
- Files(t) = StyleNames(t+1,0)
- cStyles(t) = StyleNames(t+1,1)
+ Files(t) = StyleNames(t,0)
+ cStyles(t) = StyleNames(t,1)
Next t
On Local Error Resume Next
DialogModel.lbStyles.StringItemList() = cStyles()
@@ -132,7 +133,7 @@ Sub SaveCurrentStyles(oDocument as Object)
aTempURL = aTempURL &amp; &quot;/&quot; &amp; aTempFileName
While FileExists(aTempURL)
- aTempURL=Left(aTempURL,(Len(aTempURL)-4)) &amp; &quot;_1.vor&quot;
+ aTempURL=Left(aTempURL,(Len(aTempURL)-4)) &amp; &quot;_1.stc&quot;
Wend
oDocument.storeToURL(aTempURL, NoArgs())
Exit Sub
@@ -176,4 +177,4 @@ Sub KillTempFile()
End If
End Sub
-</script:module>
+</script:module> \ No newline at end of file
diff --git a/wizards/source/template/TemplateDialog.xdl b/wizards/source/template/TemplateDialog.xdl
index b7d95a81a087..cf69f6bf2531 100644
--- a/wizards/source/template/TemplateDialog.xdl
+++ b/wizards/source/template/TemplateDialog.xdl
@@ -1,35 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
-<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" dlg:id="TemplateDialog" dlg:left="170" dlg:top="93" dlg:width="160" dlg:height="62" dlg:page="1">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" dlg:id="TemplateDialog" dlg:style-id="0" dlg:left="170" dlg:top="93" dlg:width="160" dlg:height="62" dlg:page="1">
<dlg:styles>
<dlg:style dlg:style-id="0"/>
</dlg:styles>
<dlg:bulletinboard>
- <dlg:titledbox dlg:style-id="0" dlg:id="FrmAgenda" dlg:left="5" dlg:top="5" dlg:width="85" dlg:height="47" dlg:page="1">
+ <dlg:titledbox dlg:style-id="0" dlg:id="FrmAgenda" dlg:tab-index="0" dlg:left="5" dlg:top="5" dlg:width="85" dlg:height="47" dlg:page="1">
<dlg:title dlg:value="FrmAgenda"/>
</dlg:titledbox>
<dlg:radiogroup>
- <dlg:radio dlg:style-id="0" dlg:id="OptAgenda1" dlg:left="11" dlg:top="16" dlg:width="74" dlg:height="14" dlg:page="1" dlg:tag="TOP2;PT1" dlg:value="OptAgenda1">
+ <dlg:radio dlg:style-id="0" dlg:id="OptAgenda1" dlg:tab-index="1" dlg:left="11" dlg:top="16" dlg:width="74" dlg:height="14" dlg:page="1" dlg:tag="TOP2;PT1" dlg:value="OptAgenda1">
<dlg:event dlg:listener-type="com.sun.star.awt.XItemListener" dlg:event-method="itemStateChanged" dlg:script-type="StarBasic" dlg:script-code="Template.ModuleAgenda.GetOptionValues"/>
</dlg:radio>
- <dlg:radio dlg:style-id="0" dlg:id="OptAgenda2" dlg:left="11" dlg:top="33" dlg:width="73" dlg:height="14" dlg:page="1" dlg:tag="TOP1;PT2" dlg:value="OptAgenda2">
+ <dlg:radio dlg:style-id="0" dlg:id="OptAgenda2" dlg:tab-index="2" dlg:left="11" dlg:top="33" dlg:width="73" dlg:height="14" dlg:page="1" dlg:tag="TOP1;PT2" dlg:value="OptAgenda2">
<dlg:event dlg:listener-type="com.sun.star.awt.XItemListener" dlg:event-method="itemStateChanged" dlg:script-type="StarBasic" dlg:script-code="Template.ModuleAgenda.GetOptionValues"/>
</dlg:radio>
</dlg:radiogroup>
- <dlg:button dlg:style-id="0" dlg:id="CmdCorrGoOn" dlg:left="100" dlg:top="16" dlg:width="50" dlg:height="13" dlg:page="2" dlg:value="CmdCorrGoOn">
+ <dlg:button dlg:style-id="0" dlg:id="CmdCorrGoOn" dlg:tab-index="3" dlg:left="100" dlg:top="16" dlg:width="50" dlg:height="13" dlg:page="2" dlg:value="CmdCorrGoOn">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="Template.Correspondence.OK"/>
</dlg:button>
<dlg:radiogroup>
- <dlg:radio dlg:style-id="0" dlg:id="OptSingle" dlg:left="11" dlg:top="16" dlg:width="74" dlg:height="14" dlg:page="2" dlg:value="OptSingle"/>
- <dlg:radio dlg:style-id="0" dlg:id="Optmerge" dlg:left="11" dlg:top="33" dlg:width="73" dlg:height="14" dlg:page="2" dlg:value="Optmerge"/>
+ <dlg:radio dlg:style-id="0" dlg:id="OptSingle" dlg:tab-index="4" dlg:left="11" dlg:top="16" dlg:width="74" dlg:height="14" dlg:page="2" dlg:value="OptSingle"/>
+ <dlg:radio dlg:style-id="0" dlg:id="Optmerge" dlg:tab-index="5" dlg:left="11" dlg:top="33" dlg:width="73" dlg:height="14" dlg:page="2" dlg:value="Optmerge"/>
</dlg:radiogroup>
- <dlg:titledbox dlg:style-id="0" dlg:id="FrmCorr" dlg:left="5" dlg:top="5" dlg:width="85" dlg:height="47" dlg:page="2">
+ <dlg:titledbox dlg:style-id="0" dlg:id="FrmCorr" dlg:tab-index="6" dlg:left="5" dlg:top="5" dlg:width="85" dlg:height="47" dlg:page="2">
<dlg:title dlg:value="FrmCorr"/>
</dlg:titledbox>
- <dlg:button dlg:style-id="0" dlg:id="CmdAgdGoon" dlg:left="100" dlg:top="16" dlg:width="50" dlg:height="13" dlg:page="1" dlg:value="CmdAgdGoOn">
+ <dlg:button dlg:style-id="0" dlg:id="CmdAgdGoon" dlg:tab-index="7" dlg:left="100" dlg:top="16" dlg:width="50" dlg:height="13" dlg:page="1" dlg:value="CmdAgdGoOn">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="Template.ModuleAgenda.ModifyTemplate"/>
</dlg:button>
- <dlg:button dlg:style-id="0" dlg:id="CmdCancel" dlg:left="100" dlg:top="33" dlg:width="50" dlg:height="13" dlg:value="CmdCancel">
+ <dlg:button dlg:style-id="0" dlg:id="CmdCancel" dlg:tab-index="8" dlg:left="100" dlg:top="33" dlg:width="50" dlg:height="13" dlg:value="CmdCancel">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="Template.ModuleAgenda.DisposeDocument"/>
</dlg:button>
</dlg:bulletinboard>
diff --git a/wizards/source/tools/Debug.xba b/wizards/source/tools/Debug.xba
index 04d8235af493..d7af2b539dbe 100644
--- a/wizards/source/tools/Debug.xba
+++ b/wizards/source/tools/Debug.xba
@@ -81,13 +81,11 @@ End Sub
Sub ShowPropertyValues(oLocObject as Object)
Dim PropName as String
Dim sValues as String
-Dim MaxIndex as Integer
On Local Error Goto NOPROPERTYSETINFO:
sValues = &quot;&quot;
- MaxIndex = Ubound(oLocObject.PropertySetInfo.Properties)
- For i = 0 To MaxIndex
+ For i = 0 To Ubound(oLocObject.PropertySetInfo.Properties)
Propname = oLocObject.PropertySetInfo.Properties(i).Name
- sValues = sValues &amp; PropName &amp; oLocObject.GetPropertyValue(PropName) &amp; chr(13)
+ sValues = sValues &amp; PropName &amp; chr(13) &apos;&quot; = &quot; &amp; oLocObject.GetPropertyValue(PropName) &amp; chr(13)
Next i
Msgbox(sValues , 64, GetProductName())
Exit Sub
@@ -175,6 +173,4 @@ Sub ShowCommands(oLocObject as Object)
Msgbox(&quot;Sorry, No &apos;QueryCommands&apos; - Property attached to the object&quot;, 16, GetProductName())
Resume LEAVEPROC
LEAVEPROC:
-End Sub
-
-</script:module> \ No newline at end of file
+End Sub</script:module> \ No newline at end of file
diff --git a/wizards/source/tools/Misc.xba b/wizards/source/tools/Misc.xba
index 576bc58c525c..4a05f20bf092 100644
--- a/wizards/source/tools/Misc.xba
+++ b/wizards/source/tools/Misc.xba
@@ -76,13 +76,15 @@ End Function
Function GetStarOfficeLocale() as New com.sun.star.lang.Locale
Dim aLocLocale As New com.sun.star.lang.Locale
Dim sLocale as String
-Dim sLocaleList()
+Dim sLocaleList(1)
Dim oMasterKey
oMasterKey = GetRegistryKeyContent(&quot;org.openoffice.UserProfile/International/&quot;)
sLocale = oMasterKey.getByName(&quot;Locale&quot;)
sLocaleList() = ArrayoutofString(sLocale, &quot;-&quot;)
aLocLocale.Language = sLocaleList(0)
- aLocLocale.Country = sLocaleList(1)
+ If Ubound(sLocaleList()) &gt; 0 Then
+ aLocLocale.Country = sLocaleList(1)
+ End If
GetStarOfficeLocale() = aLocLocale
End Function
diff --git a/wizards/source/tools/ModuleControls.xba b/wizards/source/tools/ModuleControls.xba
index 186523a9bc8c..ad0ad04dfeea 100644
--- a/wizards/source/tools/ModuleControls.xba
+++ b/wizards/source/tools/ModuleControls.xba
@@ -145,9 +145,9 @@ End Function
Function LoadDialog(Libname as String, DialogName as String)
Dim oLib as Object
Dim oDialog as Object
- DialogLibraries.loadLibrary(Libname)
- oLib = DialogLibraries.GetByName(Libname)
+ dialogs.loadLibrary(Libname)
+ oLib = dialogs.GetByName(Libname)
oDialog = CreateUnoDialog(oLib, DialogName)
LoadDialog() = oDialog
End Function
-</script:module>
+</script:module> \ No newline at end of file
diff --git a/wizards/source/tools/Strings.xba b/wizards/source/tools/Strings.xba
index 2e70535b9d49..987796299e78 100644
--- a/wizards/source/tools/Strings.xba
+++ b/wizards/source/tools/Strings.xba
@@ -35,8 +35,7 @@ End Function
&apos; Finds a PartString, that is framed by the Strings &apos;Prestring&apos; and &apos;PostString&apos;
Function FindPartString(BigString, PreString, PostString as String, SearchPos as Integer) as String
Dim StartPos%, EndPos%
-Dim BigLen%,PreLen%,PostLen%
-
+Dim BigLen%, PreLen%, PostLen%
StartPos = Instr(SearchPos,BigString,PreString)
If StartPos &lt;&gt; 0 Then
PreLen = Len(PreString)
@@ -61,9 +60,8 @@ End Function
&apos; Deletes the String &apos;SmallString&apos; out of the String &apos;BigString&apos;
&apos; in case SmallString&apos;s Position in BigString is right at the end
Function RTrimStr(ByVal BigString, SmallString as String) as String
-Dim SmallLen%
-Dim BigLen%
-
+Dim SmallLen as Integer
+Dim BigLen as Integer
SmallLen = Len(SmallString)
BigLen = Len(BigString)
If Mid(BigString,BigLen + 1 - SmallLen, SmallLen) = SmallString Then
@@ -96,26 +94,34 @@ End Function
&apos; The Array MaxLocindex delivers the highest Index of this Array
Function ArrayOutOfString(BigString, Separator as String, Optional MaxIndex as integer)
Dim i%, OldPos%, Pos%, SepLen%, BigLen%
-Dim LocList(200) as string
-
+Dim CurUbound as Integer
+Dim StartUbound as Integer
+ StartUbound = 50
+ Dim LocList(StartUbound) as String
+ CurUbound = StartUbound
OldPos = 1
i = -1
SepLen = Len(Separator)
BigLen = Len(BigString)
Do
- Pos = Instr(OldPos,BigString,Separator)
+ Pos = Instr(OldPos,BigString, Separator)
i = i + 1
If Pos = 0 Then
- LocList(i) = Mid(BigString,OldPos,BigLen - OldPos + 1 )
+ LocList(i) = Mid(BigString, OldPos, BigLen - OldPos + 1 )
Else
- LocList(i) = Mid(BigString,OldPos,Pos-OldPos )
+ LocList(i) = Mid(BigString, OldPos, Pos-OldPos )
OldPos = Pos + SepLen
End If
+ If i = CurUbound Then
+ CurUbound = CurUbound + StartUbound
+ ReDim Preserve LocList(CurUbound) as String
+ End If
Loop until Pos = 0
- If Vartype(Maxindex) &lt;&gt; 0 Then
- MaxIndex = i
+ If Not IsMissing(Maxindex) Then
+ MaxIndex = i
End If
- ArrayoutofString = LocList()
+ ReDim Preserve LocList(i) as String
+ ArrayOutofString = LocList()
End Function
@@ -154,7 +160,6 @@ Dim i as integer
End Function
-
&apos; Checks if a Field (LocField) is already defined in an Array
&apos; Returns &apos;True&apos; or &apos;False&apos;
Function FieldinList(LocField, BigList()) As Boolean
@@ -353,25 +358,58 @@ Dim LocCount%, LocPos%
End Function
-Function BubbleSortList(ByVal SortList())
-Dim s as Integer
-Dim t as Integer
-Dim i as Integer
-Dim DisplayDummy as String
- i = Val(SortList(0,0))
+Function BubbleSortList(ByVal SortList(),optional sort2ndValue as Boolean)
+ Dim s as Integer
+ Dim t as Integer
+ Dim i,k as Integer
+ Dim bJustOneDim, bSort2nd as Boolean
+ Dim DisplayDummy as String
+ bJustOneDim = false
+ bSort2nd = false
+On Local Error Goto No2ndDim
+ k = Ubound(SortList(),2)
+ No2ndDim:
+ bJustOneDim = Err &lt;&gt; 0
+ i = Ubound(SortList(),1)
+ If ismissing(sort2ndValue) then
+ bSort2nd = false
+ else
+ bSort2nd = sort2ndValue
+ end if
+
For s = 1 to i - 1
For t = 0 to i-s
- If SortList(t,0) &gt; SortList(t+1, 0) Then
- DisplayDummy = SortList(t,0)
- SortList(t,0) = SortList(t+1,0)
- SortList(t+1,0) = DisplayDummy
-
- DisplayDummy = SortList(t,1)
- SortList(t,1) = SortList(t+1,1)
- SortList(t+1,1) = DisplayDummy
+ If bJustOneDim Then
+ If SortList(t) &gt; SortList(t+1) Then
+ DisplayDummy = SortList(t)
+ SortList(t) = SortList(t+1)
+ SortList(t+1) = DisplayDummy
+ End If
+ Else
+ If bSort2nd Then
+ If SortList(t,1) &gt; SortList(t+1,1) Then
+ DisplayDummy = SortList(t,0)
+ SortList(t,0) = SortList(t+1,0)
+ SortList(t+1,0) = DisplayDummy
+
+ DisplayDummy = SortList(t,1)
+ SortList(t,1) = SortList(t+1,1)
+ SortList(t+1,1) = DisplayDummy
+ End If
+ Else
+ If SortList(t,0) &gt; SortList(t+1,0) Then
+ DisplayDummy = SortList(t,0)
+ SortList(t,0) = SortList(t+1,0)
+ SortList(t+1,0) = DisplayDummy
+
+ DisplayDummy = SortList(t,1)
+ SortList(t,1) = SortList(t+1,1)
+ SortList(t+1,1) = DisplayDummy
+ End If
+ End If
End If
Next t
Next s
- BubbleSortList = SortList()
+ BubbleSortList = SortList()
End Function
</script:module> \ No newline at end of file
diff --git a/wizards/source/webwizard/HtmlAutoPilotBasic.xba b/wizards/source/webwizard/HtmlAutoPilotBasic.xba
index 576667416fc7..a605c04c0655 100644
--- a/wizards/source/webwizard/HtmlAutoPilotBasic.xba
+++ b/wizards/source/webwizard/HtmlAutoPilotBasic.xba
@@ -304,6 +304,7 @@ Dim LocMaxIndex as Integer
bItemFound = False
TemplatePath = GetOfficeSubPath(&quot;Template&quot;, &quot;wizard/web/&quot;)
DirContent() = oUcb.GetFolderContents(TemplatePath,True)
+ DirContent() = BubbleSortList(DirContent())
LocMaxIndex = Ubound(DirContent())
a = 0
For i = 0 To LocMaxIndex
@@ -529,4 +530,4 @@ Sub SetTileBackgroundorNot(DialogModel as Object, oStyle as Object)
End If
End Sub
-</script:module>
+</script:module> \ No newline at end of file
diff --git a/wizards/source/webwizard/WebWzrd.xdl b/wizards/source/webwizard/WebWzrd.xdl
index 9091f42b9434..23ee5b288a93 100644
--- a/wizards/source/webwizard/WebWzrd.xdl
+++ b/wizards/source/webwizard/WebWzrd.xdl
@@ -5,7 +5,7 @@
<dlg:style dlg:style-id="0"/>
</dlg:styles>
<dlg:bulletinboard>
- <dlg:button dlg:style-id="0" dlg:id="cbCancel" dlg:left="5" dlg:top="190" dlg:width="50" dlg:height="13" dlg:value="Cancel">
+ <dlg:button dlg:style-id="0" dlg:id="cbCancel" dlg:tab-index="0" dlg:left="5" dlg:top="190" dlg:width="50" dlg:height="13" dlg:value="Cancel">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="WebWizard.HtmlAutoPilotBasic.CancelHTMLWizard"/>
</dlg:button>
<dlg:button dlg:style-id="0" dlg:id="cbHelp" dlg:tab-index="1" dlg:left="65" dlg:top="190" dlg:width="50" dlg:height="13" dlg:value="Help"/>