summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorBehrend Cornelius <bc@openoffice.org>2001-06-15 14:34:18 +0000
committerBehrend Cornelius <bc@openoffice.org>2001-06-15 14:34:18 +0000
commit6ca32944979cf38fe408b68e040585b8820b36b4 (patch)
tree21808a7f5939165e7681b5d65c635b9b88da4d36 /wizards
parent3203cca098e3fddb2a94e0c5bfbee59ba2a3b89f (diff)
#87606# several improvements
Diffstat (limited to 'wizards')
-rw-r--r--wizards/source/formwizard/DBMeta.xba165
-rw-r--r--wizards/source/formwizard/DlgFormDB.xdl114
-rw-r--r--wizards/source/formwizard/FormWizard.xba238
-rw-r--r--wizards/source/formwizard/Language.xba251
-rw-r--r--wizards/source/formwizard/Layouter.xba87
-rw-r--r--wizards/source/formwizard/dbwizres.src21
-rw-r--r--wizards/source/formwizard/develop.xba42
-rw-r--r--wizards/source/formwizard/tools.xba107
-rw-r--r--wizards/source/tools/ModuleControls.xba33
9 files changed, 568 insertions, 490 deletions
diff --git a/wizards/source/formwizard/DBMeta.xba b/wizards/source/formwizard/DBMeta.xba
index 00a81ebfa167..b32f9dda85cc 100644
--- a/wizards/source/formwizard/DBMeta.xba
+++ b/wizards/source/formwizard/DBMeta.xba
@@ -14,56 +14,63 @@ End Sub
Sub GetSelectedDBMetaData()
Dim NullList()
Dim OldsDBname as String
-Dim bGetConnection as Boolean
- ToggleDatabasePage(False)
- bGetConnection = GetDBMetaData(sDatabaseList(), oDialogModel.lstDatabases.SelectedItems(0) )
- If bGetConnection Then
- With oDialogModel
- .lstTables.Enabled = True
- .lblTables.Enabled = True
- .lstTables.StringItemList() = AddListToList(TableNames(), QueryNames())
- .lstFields.StringItemList() = NullList()
- .lstSelFields.StringItemList() = NullList()
- End With
+Dim bGetMetaData as Boolean
+ If Ubound(oDialogModel.lstDatabases.SelectedItems()) &gt; -1 Then
+ ToggleDatabasePage(False)
+ DBIndex = oDialogModel.lstDatabases.SelectedItems(0)
+ If GetConnection(sDatabaseList(DBIndex)) Then
+ bGetMetaData = GetDBMetaData()
+ End If
+ If bGetMetaData Then
+ With oDialogModel
+ .lstTables.Enabled = True
+ .lblTables.Enabled = True
+ .lstTables.StringItemList() = AddListToList(TableNames(), QueryNames())
+ .lstFields.StringItemList() = NullList()
+ .lstSelFields.StringItemList() = NullList()
+ End With
+ End If
+ ToggleDatabasePage(True)
End If
- ToggleDatabasePage(True)
End Sub
-Function GetDBMetaData(sDataBaseList(), DBIndex as Integer)
+Function GetConnection(sDBName as String)
Dim oDatabase as Object
Dim oInteractionHandler as Object
Dim oDataSource as Object
Dim bExitLoop as Boolean
+Dim bGetConnection as Boolean
Dim iMsg as Integer
+ oDatabase = oDBContext.GetByName(sDBName)
+ If Not oDatabase.IsPasswordRequired Then
+ oDBConnection = oDBContext.GetByName(sDBName).GetConnection(&quot;&quot;,&quot;&quot;)
+ GetConnection() = True
+ Else
+ oInteractionHandler = createUnoService(&quot;com.sun.star.sdb.InteractionHandler&quot;)
+ oDataSource = oDBContext.GetByName(sDBName)
+&apos; On Local Error Goto NOCONNECTION
+ Do
+ bExitLoop = True
+ oDBConnection = oDataSource.ConnectWithCompletion(oInteractionHandler)
+ NOCONNECTION:
+ bGetConnection = Err = 0
+ If Not bGetConnection Then
+ iMsg = Msgbox (sMsgNoConnection,32 + 2, sMsgWizardName) &apos; &apos;?&apos; &amp; &apos; Repeat and Cancel&apos;
+ bExitLoop = iMsg = SBCANCEL
+ End If
+ On Local Error Goto 0
+ Loop Until bExitLoop
+ End If
+ GetConnection() = bGetConnection
+End Function
+
+
+Function GetDBMetaData()
If oDBContext.HasElements Then
- oDatabase = oDBContext.GetByName(sDatabaseList(DBIndex))
- sDBName = oDatabase.Name
- If Not oDatabase.IsPasswordRequired Then
- oDBConnection = oDBContext.GetByName(sDatabaseList(DBIndex)).GetConnection(&quot;&quot;,&quot;&quot;)
- bGetConnection = True
- Else
- oInteractionHandler = createUnoService(&quot;com.sun.star.sdb.InteractionHandler&quot;)
- oDataSource = oDBContext.GetByName(sDatabaseList(DBIndex))
- On Local Error Goto NOCONNECTION
- Do
- bExitLoop = True
- oDBConnection = oDataSource.ConnectWithCompletion(oInteractionHandler)
-
- NOCONNECTION:
- bGetConnection = Err = 0
- If Not bGetConnection Then
- iMsg = Msgbox (sMsgNoConnection,32 + 2, sMsgWizardName) &apos; &apos;?&apos; &amp; &apos; Repeat and Cancel&apos;
- bExitLoop = iMsg = SBCANCEL
- End If
- On Local Error Goto 0
- Loop Until bExitLoop
- End If
- If bGetConnection Then
- Tablenames() = oDBConnection.Tables.ElementNames()
- Querynames() = oDBConnection.Queries.ElementNames()
- End If
- GetDBMetaData() = bGetConnection
+ Tablenames() = oDBConnection.Tables.ElementNames()
+ Querynames() = oDBConnection.Queries.ElementNames()
+ GetDBMetaData = True
Else
MsgBox(sMsgErrNoDatabase, 64, sMsgWizardName)
GetDBMetaData = False
@@ -95,14 +102,17 @@ Dim Found as Boolean
Wend
Next i
-&apos; Todo: Was Wenn die Reihenfolge durcheinandergebracht ist?
For n = 0 to MaxIndex
sFieldname = FieldNames(n)
iType = oColumns.GetByName(sFieldName).Type
FieldMetaValues(n,0) = iType
+ &apos; Todo: Geht das nicht etwas performanter?
FieldMetaValues(n,1) = GetValueoutofList(iType, WidthList(),1)
FieldMetaValues(n,2) = GetValueoutofList(iType, WidthList(),2)
+ FieldMetaValues(n,3) = GetValueoutofList(iType, WidthList(),4)
Next
+ ReDim oDBShapeList(MaxIndex) as Object
+ ReDim oTCShapeList(MaxIndex) as Object
End Sub
@@ -115,38 +125,71 @@ Dim MaxIndex as Integer
Dim EmptyList()
If Ubound(oDialogModel.lstTables.StringItemList()) &gt; -1 Then
FieldNames() = oColumns.GetElementNames()
- If oDialogModel.optIgnoreBinaries.State = 1 Then
- MaxIndex = Ubound(FieldNames())
- Dim ResultFieldNames(MaxIndex)
- m = 0
- For n = 0 To MaxIndex
- oField = oColumns.GetByName(FieldNames(n))
- iType = oField.Type
- If (iType &lt;&gt; com.sun.star.sdbc.DataType.BINARY)AND(iType &lt;&gt; com.sun.star.sdbc.DataType.VARBINARY)AND(iType &lt;&gt; com.sun.star.sdbc.DataType.LONGVARBINARY) Then
- ResultFieldNames(m) = FieldNames(n)
- m = m + 1
- End If
- Next n
- Redim Preserve ResultFieldNames(m-1)
- Redim Preserve FieldNames(m-1)
- FieldNames() = ResultFieldNames()
- End If
+ MaxIndex = Ubound(FieldNames())
+ Dim ResultFieldNames(MaxIndex)
+ m = 0
+ For n = 0 To MaxIndex
+ oField = oColumns.GetByName(FieldNames(n))
+ iType = oField.Type
+ If GetIndexInMultiArray(WidthList(), iType, 0) &lt;&gt; -1 Then
+ ResultFieldNames(m) = FieldNames(n)
+ m = m + 1
+ End If
+ Next n
+ Redim Preserve ResultFieldNames(m-1)
+ Redim Preserve FieldNames(m-1)
+ FieldNames() = ResultFieldNames()
oDialogModel.lstFields.StringItemList = FieldNames()
+ InitializeListboxProcedures(oDialogModel, oDialogModel.lstFields, oDialogModel.lstSelFields)
End If
End Sub
Sub CreateDBForm()
- oDBForm = oDocument.CreateInstance(&quot;com.sun.star.form.component.Form&quot;)
- oDocument.Drawpage.Forms.InsertByIndex (0, oDBForm)
+ If oDrawPage.Forms.Count = 0 Then
+ oDBForm = oDocument.CreateInstance(&quot;com.sun.star.form.component.Form&quot;)
+ oDrawpage.Forms.InsertByIndex (0, oDBForm)
+ Else
+ oDBForm = oDrawPage.Forms.GetByIndex(0)
+ End If
oDBForm.Name = &quot;Standard&quot;
oDBForm.DataSourceName = sDBName
oDBForm.Command = TableName
- &apos; Todo: Ist diese Abfrage notwendig?
If bIsQuery Then
oDBForm.CommandType = 1 &apos; Abfrage
else
oDBForm.CommandType = 0 &apos; Tabelle
End If
End Sub
-</script:module> \ No newline at end of file
+
+
+Sub AddBinaryFieldsToWidthList()
+Dim LocWidthList()
+Dim MaxIndex as Integer
+Dim OldMaxIndex as Integer
+Dim s as Integer
+Dim n as Integer
+Dim m as Integer
+&apos; Todo: Die folgenden Zeilen könnten in einer allgemeinen Routine
+&apos; bearbeitet werden, z. B. durch Umschreiben von AddListToList, wobei
+&apos; beim Abfragen des Ubounds der zweiten Dimension eine Fehlerabfrage nötig wäre.
+ MaxIndex = Ubound(WidthList(),1) + Ubound(ImgWidthList(),1) + 1
+ OldMaxIndex = Ubound(WidthList(),1)
+ ReDim Preserve WidthList(MaxIndex,4)
+ s = 0
+ For n = OldMaxIndex + 1 To MaxIndex
+ For m = 0 To 4
+ WidthList(n,m) = ImgWidthList(s,m)
+ Next m
+ s = s + 1
+ Next n
+ FillUpFieldsListbox()
+End Sub
+
+
+Sub RemoveBinaryFieldsFromWidthList()
+Dim MaxIndex as Integer
+ MaxIndex = Ubound(WidthList(),1) - Ubound(ImgWidthList(),1) - 1
+ ReDim Preserve WidthList(MaxIndex, 4)
+ FillUpFieldsListbox()
+End Sub</script:module> \ No newline at end of file
diff --git a/wizards/source/formwizard/DlgFormDB.xdl b/wizards/source/formwizard/DlgFormDB.xdl
index 54c165c17086..7963979a1495 100644
--- a/wizards/source/formwizard/DlgFormDB.xdl
+++ b/wizards/source/formwizard/DlgFormDB.xdl
@@ -1,122 +1,108 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
-<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" dlg:id="DlgFormDB" dlg:style-id="0" dlg:left="96" dlg:top="28" dlg:width="270" dlg:height="210" dlg:page="3">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" dlg:id="DlgFormDB" dlg:style-id="0" dlg:left="96" dlg:top="28" dlg:width="270" dlg:height="210" dlg:page="1">
<dlg:styles>
<dlg:style dlg:style-id="0"/>
<dlg:style dlg:style-id="1" dlg:text-color="0x80" dlg:font-name="StarMath" dlg:font-stylename="Standard" dlg:font-charset="symbol"/>
</dlg:styles>
<dlg:bulletinboard>
- <dlg:radiogroup>
- <dlg:radio dlg:style-id="0" dlg:id="optSaveDocument" dlg:tab-index="0" dlg:left="6" dlg:top="93" dlg:width="152" dlg:height="8" dlg:page="3" dlg:value="optSaveDocument">
- <dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="FormWizard.FormWizard.ToggleControlsofLastPage"/>
- </dlg:radio>
- <dlg:radio dlg:style-id="0" dlg:id="optUseDocument" dlg:tab-index="1" dlg:left="5" dlg:top="122" dlg:width="153" dlg:height="8" dlg:page="3" dlg:value="optUseDocument">
- <dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="FormWizard.FormWizard.ToggleControlsofLastPage"/>
- </dlg:radio>
- </dlg:radiogroup>
- <dlg:text dlg:style-id="0" dlg:id="lblPath" dlg:tab-index="2" dlg:left="20" dlg:top="106" dlg:width="74" dlg:height="8" dlg:page="3" dlg:value="lblPath" dlg:align="right"/>
- <dlg:textfield dlg:style-id="0" dlg:id="txtInputPath" dlg:tab-index="3" dlg:left="99" dlg:top="104" dlg:width="145" dlg:height="14" dlg:page="3">
- <dlg:event dlg:listener-type="com.sun.star.awt.XKeyListener" dlg:event-method="keyReleased" dlg:script-type="StarBasic" dlg:script-code="FormWizard.FormWizard.CheckPathValidation"/>
- </dlg:textfield>
- <dlg:button dlg:style-id="0" dlg:id="cmdGetPathDialog" dlg:tab-index="4" dlg:disabled="true" dlg:left="250" dlg:top="103" dlg:width="14" dlg:height="14" dlg:page="3" dlg:value="..."/>
- <dlg:text dlg:style-id="0" dlg:id="lblSelFields" dlg:tab-index="5" dlg:left="154" dlg:top="96" dlg:width="110" dlg:height="8" dlg:page="1" dlg:value="lblSelFields"/>
- <dlg:menulist dlg:style-id="0" dlg:id="lstDatabases" dlg:tab-index="6" dlg:left="6" dlg:top="51" dlg:width="110" dlg:height="12" dlg:page="1" dlg:spin="true">
+ <dlg:text dlg:style-id="0" dlg:id="lblSelFields" dlg:tab-index="0" dlg:left="154" dlg:top="96" dlg:width="110" dlg:height="8" dlg:page="1" dlg:value="lblSelFields"/>
+ <dlg:menulist dlg:style-id="0" dlg:id="lstDatabases" dlg:tab-index="1" dlg:left="6" dlg:top="51" dlg:width="110" dlg:height="12" dlg:page="1" dlg:spin="true">
<dlg:event dlg:listener-type="com.sun.star.awt.XItemListener" dlg:event-method="itemStateChanged" dlg:script-type="StarBasic" dlg:script-code="FormWizard.DBMeta.GetSelectedDBMetaData"/>
</dlg:menulist>
- <dlg:menulist dlg:style-id="0" dlg:id="lstTables" dlg:tab-index="7" dlg:left="6" dlg:top="78" dlg:width="110" dlg:height="12" dlg:page="1" dlg:spin="true">
+ <dlg:menulist dlg:style-id="0" dlg:id="lstTables" dlg:tab-index="2" dlg:left="6" dlg:top="78" dlg:width="110" dlg:height="12" dlg:page="1" dlg:spin="true">
<dlg:event dlg:listener-type="com.sun.star.awt.XItemListener" dlg:event-method="itemStateChanged" dlg:script-type="StarBasic" dlg:script-code="FormWizard.FormWizard.FormGetFields"/>
</dlg:menulist>
- <dlg:img dlg:id="imgTheme" dlg:tab-index="8" dlg:left="6" dlg:top="6" dlg:width="258" dlg:height="31"/>
- <dlg:textfield dlg:style-id="0" dlg:id="txtTitle" dlg:tab-index="9" dlg:left="142" dlg:top="44" dlg:width="122" dlg:height="14" dlg:page="3">
- <dlg:event dlg:listener-type="com.sun.star.awt.XKeyListener" dlg:event-method="keyReleased" dlg:script-type="StarBasic" dlg:script-code="FormWizard.FormWizard.ChangeDocumentTitle"/>
- </dlg:textfield>
- <dlg:button dlg:style-id="0" dlg:id="cmdCancel" dlg:tab-index="10" dlg:left="6" dlg:top="190" dlg:width="53" dlg:height="14" dlg:value="cmdCancel">
+ <dlg:img dlg:id="imgTheme" dlg:tab-index="3" dlg:left="6" dlg:top="6" dlg:width="258" dlg:height="31"/>
+ <dlg:button dlg:style-id="0" dlg:id="cmdCancel" dlg:tab-index="4" dlg:left="6" dlg:top="190" dlg:width="53" dlg:height="14" dlg:value="cmdCancel">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="FormWizard.FormWizard.CancelFormWizard"/>
</dlg:button>
- <dlg:button dlg:style-id="0" dlg:id="cmdHelp" dlg:tab-index="11" dlg:left="63" dlg:top="190" dlg:width="53" dlg:height="14" dlg:value="cmdHelp"/>
- <dlg:button dlg:style-id="0" dlg:id="cmdBack" dlg:tab-index="12" dlg:left="155" dlg:top="190" dlg:width="53" dlg:height="14" dlg:value="cmdBack">
+ <dlg:button dlg:style-id="0" dlg:id="cmdHelp" dlg:tab-index="5" dlg:left="63" dlg:top="190" dlg:width="53" dlg:height="14" dlg:value="cmdHelp"/>
+ <dlg:button dlg:style-id="0" dlg:id="cmdBack" dlg:tab-index="6" dlg:left="155" dlg:top="190" dlg:width="53" dlg:height="14" dlg:value="cmdBack">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="FormWizard.FormWizard.PreviousStep"/>
</dlg:button>
- <dlg:button dlg:style-id="0" dlg:id="cmdGoOn" dlg:tab-index="13" dlg:left="211" dlg:top="190" dlg:width="53" dlg:height="14" dlg:value="cmdGoOn">
+ <dlg:button dlg:style-id="0" dlg:id="cmdGoOn" dlg:tab-index="7" dlg:left="211" dlg:top="190" dlg:width="53" dlg:height="14" dlg:value="cmdGoOn">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="FormWizard.FormWizard.NextStep"/>
</dlg:button>
- <dlg:text dlg:style-id="0" dlg:id="lblDatabases" dlg:tab-index="14" dlg:left="6" dlg:top="40" dlg:width="74" dlg:height="8" dlg:page="1" dlg:value="lblDatabases"/>
- <dlg:text dlg:style-id="0" dlg:id="lblTables" dlg:tab-index="15" dlg:left="6" dlg:top="67" dlg:width="72" dlg:height="8" dlg:page="1" dlg:value="lblTables"/>
- <dlg:text dlg:style-id="0" dlg:id="lblFields" dlg:tab-index="16" dlg:left="6" dlg:top="96" dlg:width="109" dlg:height="8" dlg:page="1" dlg:value="lblFields"/>
- <dlg:button dlg:style-id="0" dlg:id="cmdMoveSelected" dlg:tab-index="17" dlg:left="122" dlg:top="112" dlg:width="25" dlg:height="14" dlg:page="1" dlg:value="-&gt;">
- <dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="FormWizard.Listbox.FormMoveSelected"/>
+ <dlg:text dlg:style-id="0" dlg:id="lblDatabases" dlg:tab-index="8" dlg:left="6" dlg:top="40" dlg:width="74" dlg:height="8" dlg:page="1" dlg:value="lblDatabases"/>
+ <dlg:text dlg:style-id="0" dlg:id="lblTables" dlg:tab-index="9" dlg:left="6" dlg:top="67" dlg:width="72" dlg:height="8" dlg:page="1" dlg:value="lblTables"/>
+ <dlg:text dlg:style-id="0" dlg:id="lblFields" dlg:tab-index="10" dlg:left="6" dlg:top="96" dlg:width="109" dlg:height="8" dlg:page="1" dlg:value="lblFields"/>
+ <dlg:button dlg:style-id="0" dlg:id="cmdMoveSelected" dlg:tab-index="11" dlg:left="122" dlg:top="112" dlg:width="25" dlg:height="14" dlg:page="1" dlg:value="-&gt;">
+ <dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="Tools.Listbox.FormMoveSelected"/>
</dlg:button>
- <dlg:button dlg:style-id="0" dlg:id="cmdMoveAll" dlg:tab-index="18" dlg:left="122" dlg:top="130" dlg:width="25" dlg:height="14" dlg:page="1" dlg:value="=&gt;&gt;">
- <dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="FormWizard.Listbox.FormMoveAll"/>
+ <dlg:button dlg:style-id="0" dlg:id="cmdMoveAll" dlg:tab-index="12" dlg:left="122" dlg:top="130" dlg:width="25" dlg:height="14" dlg:page="1" dlg:value="=&gt;&gt;">
+ <dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="Tools.Listbox.FormMoveAll"/>
</dlg:button>
- <dlg:button dlg:style-id="0" dlg:id="cmdRemoveSelected" dlg:tab-index="19" dlg:left="122" dlg:top="148" dlg:width="25" dlg:height="14" dlg:page="1" dlg:value="&lt;-">
- <dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="FormWizard.Listbox.FormRemoveSelected"/>
+ <dlg:button dlg:style-id="0" dlg:id="cmdRemoveSelected" dlg:tab-index="13" dlg:left="122" dlg:top="148" dlg:width="25" dlg:height="14" dlg:page="1" dlg:value="&lt;-">
+ <dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="Tools.Listbox.FormRemoveSelected"/>
</dlg:button>
- <dlg:button dlg:style-id="0" dlg:id="cmdRemoveAll" dlg:tab-index="20" dlg:left="122" dlg:top="166" dlg:width="25" dlg:height="14" dlg:page="1" dlg:value="&lt;&lt;=">
- <dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="FormWizard.Listbox.FormRemoveAll"/>
+ <dlg:button dlg:style-id="0" dlg:id="cmdRemoveAll" dlg:tab-index="14" dlg:left="122" dlg:top="166" dlg:width="25" dlg:height="14" dlg:page="1" dlg:value="&lt;&lt;=">
+ <dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="Tools.Listbox.FormRemoveAll"/>
</dlg:button>
<dlg:radiogroup>
- <dlg:radio dlg:style-id="0" dlg:id="optIgnoreBinaries" dlg:tab-index="21" dlg:left="160" dlg:top="62" dlg:width="104" dlg:height="8" dlg:page="1" dlg:help-text="Todo: GetSpecificFieldNames an Status geändert" dlg:value="optIgnoreBinaries"/>
- <dlg:radio dlg:style-id="0" dlg:id="optBinariesasGraphics" dlg:tab-index="22" dlg:left="160" dlg:top="74" dlg:width="104" dlg:height="8" dlg:page="1" dlg:help-text="Todo: GetSpecificFieldNames an Status geändert" dlg:value="optBinariesasGraphics"/>
+ <dlg:radio dlg:style-id="0" dlg:id="optIgnoreBinaries" dlg:tab-index="15" dlg:left="160" dlg:top="62" dlg:width="104" dlg:height="8" dlg:page="1" dlg:value="optIgnoreBinaries">
+ <dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="FormWizard.DBMeta.RemoveBinaryFieldsFromWidthList"/>
+ </dlg:radio>
+ <dlg:radio dlg:style-id="0" dlg:id="optBinariesasGraphics" dlg:tab-index="16" dlg:left="160" dlg:top="74" dlg:width="104" dlg:height="8" dlg:page="1" dlg:value="optBinariesasGraphics">
+ <dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="FormWizard.DBMeta.AddBinaryFieldsToWidthList"/>
+ </dlg:radio>
</dlg:radiogroup>
- <dlg:menulist dlg:style-id="0" dlg:id="lstFields" dlg:tab-index="23" dlg:left="6" dlg:top="107" dlg:width="110" dlg:height="77" dlg:page="1" dlg:multiselection="true">
+ <dlg:menulist dlg:style-id="0" dlg:id="lstFields" dlg:tab-index="17" dlg:left="6" dlg:top="107" dlg:width="110" dlg:height="77" dlg:page="1" dlg:multiselection="true">
<dlg:event dlg:listener-type="com.sun.star.awt.XItemListener" dlg:event-method="itemStateChanged" dlg:script-type="StarBasic" dlg:script-code="Tools.Listbox.FormSetMoveRights"/>
</dlg:menulist>
- <dlg:menulist dlg:style-id="0" dlg:id="lstSelFields" dlg:tab-index="24" dlg:left="154" dlg:top="107" dlg:width="110" dlg:height="77" dlg:page="1" dlg:multiselection="true">
+ <dlg:menulist dlg:style-id="0" dlg:id="lstSelFields" dlg:tab-index="18" dlg:left="154" dlg:top="107" dlg:width="110" dlg:height="77" dlg:page="1" dlg:multiselection="true">
<dlg:event dlg:listener-type="com.sun.star.awt.XItemListener" dlg:event-method="itemStateChanged" dlg:script-type="StarBasic" dlg:script-code="Tools.Listbox.FormSetMoveRights"/>
</dlg:menulist>
- <dlg:text dlg:style-id="0" dlg:id="lblStyles" dlg:tab-index="25" dlg:left="6" dlg:top="41" dlg:width="110" dlg:height="8" dlg:page="2" dlg:value="lblStyles"/>
+ <dlg:text dlg:style-id="0" dlg:id="lblStyles" dlg:tab-index="19" dlg:left="6" dlg:top="41" dlg:width="110" dlg:height="8" dlg:page="2" dlg:value="lblStyles"/>
<dlg:radiogroup>
- <dlg:radio dlg:style-id="0" dlg:id="optTiled" dlg:tab-index="26" dlg:left="126" dlg:top="164" dlg:width="81" dlg:height="8" dlg:page="2" dlg:tag="11" dlg:value="optTiled">
+ <dlg:radio dlg:style-id="0" dlg:id="optTiled" dlg:tab-index="20" dlg:left="126" dlg:top="164" dlg:width="81" dlg:height="8" dlg:page="2" dlg:tag="11" dlg:value="optTiled">
<dlg:event dlg:listener-type="com.sun.star.awt.XMouseListener" dlg:event-method="mouseReleased" dlg:script-type="StarBasic" dlg:script-code="WebWizard.Common.SetBackGraphicStyle"/>
</dlg:radio>
- <dlg:radio dlg:style-id="0" dlg:id="optArea" dlg:tab-index="27" dlg:left="126" dlg:top="176" dlg:width="81" dlg:height="8" dlg:page="2" dlg:tag="10" dlg:value="optArea">
+ <dlg:radio dlg:style-id="0" dlg:id="optArea" dlg:tab-index="21" dlg:left="126" dlg:top="176" dlg:width="81" dlg:height="8" dlg:page="2" dlg:tag="10" dlg:value="optArea">
<dlg:event dlg:listener-type="com.sun.star.awt.XMouseListener" dlg:event-method="mouseReleased" dlg:script-type="StarBasic" dlg:script-code="WebWizard.Common.SetBackGraphicStyle"/>
</dlg:radio>
</dlg:radiogroup>
- <dlg:menulist dlg:style-id="0" dlg:id="lstStyles" dlg:tab-index="28" dlg:left="6" dlg:top="51" dlg:width="110" dlg:height="135" dlg:page="2">
+ <dlg:menulist dlg:style-id="0" dlg:id="lstStyles" dlg:tab-index="22" dlg:left="6" dlg:top="51" dlg:width="110" dlg:height="135" dlg:page="2">
<dlg:event dlg:listener-type="com.sun.star.awt.XItemListener" dlg:event-method="itemStateChanged" dlg:script-type="StarBasic" dlg:script-code="FormWizard.tools.ImportStyles"/>
</dlg:menulist>
- <dlg:text dlg:style-id="0" dlg:id="lblInputTitle" dlg:tab-index="29" dlg:left="5" dlg:top="47" dlg:width="135" dlg:height="8" dlg:page="3" dlg:value="lblInputTitle"/>
- <dlg:text dlg:style-id="0" dlg:id="lblFinalConfig" dlg:tab-index="30" dlg:left="6" dlg:top="72" dlg:width="258" dlg:height="16" dlg:page="3" dlg:value="lblFinalConfig"/>
- <dlg:fixedline dlg:style-id="0" dlg:id="hlnBinaries" dlg:tab-index="31" dlg:left="154" dlg:top="51" dlg:width="110" dlg:height="8" dlg:page="1" dlg:value="hlnBinaries"/>
- <dlg:button dlg:style-id="1" dlg:id="cmdSwitchHeight" dlg:tab-index="32" dlg:left="122" dlg:top="191" dlg:width="25" dlg:height="14" dlg:help-text="Verkleinert den Dialog!">
+ <dlg:fixedline dlg:style-id="0" dlg:id="hlnBinaries" dlg:tab-index="23" dlg:left="154" dlg:top="51" dlg:width="110" dlg:height="8" dlg:page="1" dlg:value="hlnBinaries"/>
+ <dlg:button dlg:style-id="1" dlg:id="cmdSwitchHeight" dlg:tab-index="24" dlg:left="122" dlg:top="191" dlg:width="25" dlg:height="14">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="FormWizard.FormWizard.SwitchDialogHeight"/>
</dlg:button>
- <dlg:fixedline dlg:style-id="0" dlg:id="FixedLine1" dlg:tab-index="33" dlg:left="154" dlg:top="84" dlg:width="110" dlg:height="8" dlg:page="1"/>
- <dlg:fixedline dlg:style-id="0" dlg:id="hlnBackground" dlg:tab-index="34" dlg:left="120" dlg:top="153" dlg:width="144" dlg:height="8" dlg:page="2" dlg:value="hlnBackground"/>
- <dlg:fixedline dlg:style-id="0" dlg:id="hlnAlign" dlg:tab-index="35" dlg:left="209" dlg:top="100" dlg:width="55" dlg:height="8" dlg:page="2" dlg:value="hlnAlign"/>
- <dlg:fixedline dlg:style-id="0" dlg:id="hlnBorderLayout" dlg:tab-index="36" dlg:left="120" dlg:top="100" dlg:width="81" dlg:height="8" dlg:page="2" dlg:value="hlnBorderLayout"/>
- <dlg:fixedline dlg:style-id="0" dlg:id="hlnArrangements" dlg:tab-index="37" dlg:left="120" dlg:top="51" dlg:width="144" dlg:height="10" dlg:page="2" dlg:value="hlnArrangements"/>
- <dlg:button dlg:style-id="0" dlg:id="cmdArrange1" dlg:tab-index="38" dlg:left="126" dlg:top="62" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="1">
+ <dlg:fixedline dlg:style-id="0" dlg:id="FixedLine1" dlg:tab-index="25" dlg:left="154" dlg:top="84" dlg:width="110" dlg:height="8" dlg:page="1"/>
+ <dlg:fixedline dlg:style-id="0" dlg:id="hlnBackground" dlg:tab-index="26" dlg:left="120" dlg:top="153" dlg:width="144" dlg:height="8" dlg:page="2" dlg:value="hlnBackground"/>
+ <dlg:fixedline dlg:style-id="0" dlg:id="hlnAlign" dlg:tab-index="27" dlg:left="209" dlg:top="100" dlg:width="55" dlg:height="8" dlg:page="2" dlg:value="hlnAlign"/>
+ <dlg:fixedline dlg:style-id="0" dlg:id="hlnBorderLayout" dlg:tab-index="28" dlg:left="120" dlg:top="100" dlg:width="81" dlg:height="8" dlg:page="2" dlg:value="hlnBorderLayout"/>
+ <dlg:fixedline dlg:style-id="0" dlg:id="hlnArrangements" dlg:tab-index="29" dlg:left="120" dlg:top="51" dlg:width="144" dlg:height="10" dlg:page="2" dlg:value="hlnArrangements"/>
+ <dlg:button dlg:style-id="0" dlg:id="cmdArrange1" dlg:tab-index="30" dlg:left="126" dlg:top="62" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="1">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="FormWizard.Layouter.ChangeArrangemode"/>
</dlg:button>
- <dlg:button dlg:style-id="0" dlg:id="cmdArrange2" dlg:tab-index="39" dlg:left="152" dlg:top="62" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="2">
+ <dlg:button dlg:style-id="0" dlg:id="cmdArrange2" dlg:tab-index="31" dlg:left="152" dlg:top="62" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="2">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="FormWizard.Layouter.ChangeArrangemode"/>
</dlg:button>
- <dlg:button dlg:style-id="0" dlg:id="cmdArrange3" dlg:tab-index="40" dlg:left="178" dlg:top="62" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="3">
+ <dlg:button dlg:style-id="0" dlg:id="cmdArrange3" dlg:tab-index="32" dlg:left="178" dlg:top="62" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="3">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="FormWizard.Layouter.ChangeArrangemode"/>
</dlg:button>
- <dlg:button dlg:style-id="0" dlg:id="cmdArrange4" dlg:tab-index="41" dlg:left="215" dlg:top="62" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="4">
+ <dlg:button dlg:style-id="0" dlg:id="cmdArrange4" dlg:tab-index="33" dlg:left="215" dlg:top="62" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="4">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="FormWizard.Layouter.ChangeArrangemode"/>
</dlg:button>
- <dlg:button dlg:style-id="0" dlg:id="cmdArrange5" dlg:tab-index="42" dlg:left="241" dlg:top="62" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="5">
+ <dlg:button dlg:style-id="0" dlg:id="cmdArrange5" dlg:tab-index="34" dlg:left="241" dlg:top="62" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="5">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="FormWizard.Layouter.ChangeArrangemode"/>
</dlg:button>
- <dlg:button dlg:style-id="0" dlg:id="cmdBorder0" dlg:tab-index="43" dlg:left="126" dlg:top="111" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="0">
+ <dlg:button dlg:style-id="0" dlg:id="cmdBorder0" dlg:tab-index="35" dlg:left="126" dlg:top="111" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="0">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="FormWizard.Layouter.ChangeBorderLayouts"/>
</dlg:button>
- <dlg:button dlg:style-id="0" dlg:id="cmdBorder1" dlg:tab-index="44" dlg:left="152" dlg:top="111" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="1">
+ <dlg:button dlg:style-id="0" dlg:id="cmdBorder1" dlg:tab-index="36" dlg:left="152" dlg:top="111" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="1">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="FormWizard.Layouter.ChangeBorderLayouts"/>
</dlg:button>
- <dlg:button dlg:style-id="0" dlg:id="CommandButton1" dlg:tab-index="45" dlg:left="15" dlg:top="128" dlg:width="0" dlg:height="2" dlg:page="2" dlg:tag="1" dlg:value="CommandButton1"/>
- <dlg:button dlg:style-id="0" dlg:id="cmdBorder2" dlg:tab-index="46" dlg:left="178" dlg:top="111" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="2">
+ <dlg:button dlg:style-id="0" dlg:id="CommandButton1" dlg:tab-index="37" dlg:left="15" dlg:top="128" dlg:width="0" dlg:height="2" dlg:page="2" dlg:tag="1" dlg:value="CommandButton1"/>
+ <dlg:button dlg:style-id="0" dlg:id="cmdBorder2" dlg:tab-index="38" dlg:left="178" dlg:top="111" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="2">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="FormWizard.Layouter.ChangeBorderLayouts"/>
</dlg:button>
- <dlg:button dlg:style-id="0" dlg:id="cmdAlign0" dlg:tab-index="47" dlg:left="215" dlg:top="111" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="0">
+ <dlg:button dlg:style-id="0" dlg:id="cmdAlign0" dlg:tab-index="39" dlg:left="215" dlg:top="111" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="0">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="FormWizard.Layouter.ChangeLabelAlignments"/>
</dlg:button>
- <dlg:button dlg:style-id="0" dlg:id="cmdAlign2" dlg:tab-index="48" dlg:left="241" dlg:top="111" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="2">
+ <dlg:button dlg:style-id="0" dlg:id="cmdAlign2" dlg:tab-index="40" dlg:left="241" dlg:top="111" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="2">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="FormWizard.Layouter.ChangeLabelAlignments"/>
</dlg:button>
</dlg:bulletinboard>
diff --git a/wizards/source/formwizard/FormWizard.xba b/wizards/source/formwizard/FormWizard.xba
index 182dd745467e..e1888651e9b0 100644
--- a/wizards/source/formwizard/FormWizard.xba
+++ b/wizards/source/formwizard/FormWizard.xba
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="FormWizard" script:language="StarBasic">Option Explicit
-&apos;Very new version
+
Public DocumentName as String
Public FormPath$, FormDBName$, FormReturnValue$
Public TemplatePath$
@@ -27,21 +27,23 @@ Public oDBContext as Object
Public oUcb as Object
Public oDocInfo as Object
&apos;Public TemplateList(50,1) as String
-Public WidthList(27,3) as Long
-Public ControlList(1 To 9) as String
+Public WidthList(15,4)
+Public ImgWidthList(3,4)
Public sDBName as String
Public Tablename as String
-Sub MainWithDefault()
+&apos; Todo: &apos;Datenquelle&apos; für &apos;Datenbank&apos;
+&apos; &apos;Inhalte&apos; oder &apos;Objekte&apos; mit &apos;Tabellen und Abfragen&apos; evtl als Hilfetext für &apos;Datenquelle&apos;
+Sub MainWithDefault(Optional DatasourceName as String, Optional Contenttype as Integer, Optional sContent as String, Optional oConnection as Object)
&apos;On Local Error Goto GlobalError
BasicLibraries.LoadLibrary(&quot;Tools&quot;)
BasicLibraries.LoadLibrary(&quot;WebWizard&quot;)
bControlsareCreated = False
+ MaxIndex = -1
If Not InitResources(&quot;Formwizard&quot;,&quot;dbw&quot;) Then
Exit Sub
End If
- MaxIndex = -1
oDBContext = CreateUnoService(&quot;com.sun.star.sdb.DatabaseContext&quot;)
oUcb = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
FormPath = GetOfficeSubPath(&quot;Template&quot;,&quot;wizard/bitmap&quot;)
@@ -49,15 +51,16 @@ Sub MainWithDefault()
WizardPath = GetOfficeSubPath(&quot;Template&quot;,&quot;wizard/&quot;)
TexturePath = GetOfficeSubPath(&quot;Gallery&quot;, &quot;www-back/&quot;)
WorkPath = GetPathSettings(&quot;Work&quot;)
- OpenBaseDocument()
+ OpenFormDocument()
GetDatabaseNames()
InitializeWidthList()
- &apos; calc some special currency control properties (they depend from the system language)
- &apos; Todo: What&apos;s going on here?
-&apos; calcCurrencyProperties()
LoadLanguage
bNeedFieldRefresh = True
- CreateForm()
+ If Not IsMissing(DataSourceName) Then
+ CreateForm(DatasourceName, Contenttype, sContent, oConnection)
+ Else
+ CreateForm()
+ End If
GlobalError:
If Err &lt;&gt; 0 Then
ToggleWindow(True)
@@ -66,20 +69,29 @@ GlobalError:
End Sub
-Sub CreateForm() as String
+Sub CreateForm(Optional DatasourceName as String, Optional Contenttype as Integer, Optional sContent as String, Optional oConnection as Object) as String
Dim i as Integer
-&apos; On Error Goto GlobalError
With oDialogModel
.optIgnoreBinaries.State = True
- .optUseDocument.State = True
.cmdBack.Enabled = False
.cmdGoOn.Enabled = False
.lblTables.Enabled = False
.lstSelFields.Tag = False
- ToggleListboxControls(oDialogModel, False)
.Step = 1
.lstDatabases.StringItemList()= sDatabaseList()&apos; = AddItem(sDatabaseList(i)
End With
+ If Not IsMissing(DataSourceName) Then
+ DlgFormDB.GetControl(&quot;lstDatabases&quot;).SelectItem(DataSourceName, True)
+ &apos; Todo: Hier muss auch noch der Contenttype untergebracht werden
+ If GetDBMetaData() Then
+ Set oDBConnection = oConnection
+ oDialogModel.lstTables.StringItemList() = AddListToList(TableNames(), QueryNames()
+ DlgFormDB.GetControl(&quot;lstTables&quot;).SelectItem(sContent, True)
+ FillUpFieldsListbox()
+ End If
+ Else
+ ToggleListboxControls(oDialogModel, False)
+ End If
DlgFormDB.Title = WizardTitle(1)
NumberofStyles = FillupWebListbox(oUcb, &quot;/stl&quot;, DlgFormDB, &quot;lstStyles&quot;, Styles())
ImportStyles()
@@ -97,29 +109,17 @@ GlobalError:
End Sub
-Function AddListtoList(FirstArray(), SecondArray(), Optional StarIndex)
-Dim n as Integer
-Dim m as Integer
-Dim MaxIndex as Integer
- MaxIndex = Ubound(FirstArray()) + Ubound(SecondArray()) + 1
- Dim ResultArray(MaxIndex)
- For m = 0 To Ubound(FirstArray())
- ResultArray(m) = FirstArray(m)
- Next m
- For n = 0 To Ubound(SecondArray())
- ResultArray(m) = SecondArray(n)
- m = m + 1
- Next n
- AddListToList() = ResultArray()
-End Function
-
-
Sub FormGetFields()
Dim i as Integer
-Dim n as Integer
ToggleDatabasePage(False)
+ FillUpFieldsListbox()
+ ToggleDatabasePage(True)
+End Sub
+
+
+Sub FillUpFieldsListbox()
+Dim n as Integer
n = Ubound(oDialogModel.lstTables.SelectedItems())
- InitializeListboxProcedures(oDialogModel, oDialogModel.lstFields, oDialogModel.lstSelFields)
If n &lt;&gt; -1 Then
Tablename = Tablenames(oDialogModel.lstTables.SelectedItems(0))
bIsQuery = FieldinArray(QueryNames(), Ubound(QueryNames()), TableName)
@@ -131,15 +131,12 @@ Dim n as Integer
GetSpecificFieldNames()
ToggleListboxControls(oDialogModel, True)
End If
- ToggleDatabasePage(True)
-
-&apos; bNeedFieldRefresh = False
Exit Sub
-no_fields:
+&apos;TODO: Diese Fehlermarke sinnvoll einbinden
+NOFIELDS:
MsgBox sMsgErrCouldNotOpenObject, 16, sMsgWizardName
End Sub
-
Sub CancelFormWizard()
DlgFormDB.EndExecute()
DlgFormDB.Dispose()
@@ -149,121 +146,62 @@ End Sub
Sub PreviousStep()
-Dim CurStep as Integer
- CurStep = oDialogModel.Step - 1
- oDialogModel.Step = CurStep
- oDialogModel.cmdBack.Enabled = CurStep &lt;&gt; 1
- oDialogModel.cmdGoOn.Enabled = True
- Select Case oDialogModel.Step
- Case 1
- oDialogModel.lstSelFields.Tag = Not bControlsareCreated
- Case 2
- oDialogModel.cmdGoOn.Label = sGoOn
- End Select
- oDialogModel.imgTheme.ImageUrl = FormPath &amp; &quot;FormWizard_&quot; &amp; CurStep &amp; &quot;.bmp&quot;
- DlgFormDB.Title = WizardTitle(CurStep)
+ With oDialogModel
+ .Step = 1
+ .cmdBack.Enabled = False
+ .cmdGoOn.Enabled = True
+ .lstSelFields.Tag = Not bControlsareCreated
+ .cmdGoOn.Label = sGoOn
+ .imgTheme.ImageUrl = FormPath &amp; &quot;FormWizard_1.bmp&quot;
+ End With
+ DlgFormDB.Title = WizardTitle(1)
End Sub
Sub NextStep()
+Dim bOldVisible
+ &apos; Note: Unfortunately it is not possible to query the visibility of the imagecontrol directly
+ bOldVisible = oDialogModel.Height &gt; 40
Select Case oDialogModel.Step
Case 1
- GetTableMetaData()
- CreateDBForm()
- InitializeLayoutSettings()
+ bControlsAreCreated = Not (CBool(oDialogModel.lstSelFields.Tag))
+ If Not bControlsAreCreated Then
+ GetTableMetaData()
+ CreateDBForm()
+ RemoveShapes()
+ InitializeLayoutSettings()
+ oDBForm.Load
+ End If
+ oDialogModel.cmdGoOn.Label = sReady
+ oDialogModel.cmdBack.Enabled = True
oDialogModel.Step = 2
- oDBForm.Load
Case 2
- oDialogModel.cmdGoOn.Label = sReady
- ToggleControlsofLastPage()
- oDialogModel.Step = 3
- Case 3
- HandleCreatedDocument()
+ StoreForm()
End Select
+ DlgFormDB.GetControl(&quot;imgTheme&quot;).Visible = bOldVisible
oDialogModel.imgTheme.ImageUrl = FormPath &amp; &quot;FormWizard_&quot; &amp; oDialogModel.Step &amp; &quot;.bmp&quot;
- DlgFormDB.Title = WizardTitle(oDialogModel.Step)
+ DlgFormDB.Title = WizardTitle(oDialogModel.Step)
End Sub
Sub InitializeLayoutSettings()
-&apos; Todo: Dieses Flag neu setzen!
- bControlsAreCreated = False &apos;Not (CBool(oDialogModel.lstSelFields.Tag))
- If Not bControlsAreCreated Then
+ If oPageStyle.BackGraphicLocation = com.sun.star.style.GraphicLocation.TILED Then
oDialogModel.optTiled.State = 1
- OldArrangement = 0
- CurArrangement = cTabled
- CurBorderType = SB3DBORDER
- CurAlignmode = SBALIGNLEFT
- ToggleBorderGroup(bControlsAreCreated)
- ToggleAlignGroup(bControlsAreCreated)
- ArrangeControls()
- End If
-End Sub
-
-
-Sub HandleCreatedDocument()
-Dim sPath as String
-Dim NoArgs() as new com.sun.star.beans.PropertyValue
-Dim DocTitle as String
-Dim sDirPath as String
- On Local Error Goto NOSAVING
-
- If oDialogModel.optSaveDocument.State = 1 Then
- sDirPath = ConvertToUrl(oDialogModel.txtInputPath.Text)
- sDirPath = RTrimStr(sDirPath,&quot;/&quot;)
- DocTitle = oDialogModel.txtTitle.Text
- sPath = sDirPath &amp; &quot;/&quot; &amp; DocTitle &amp; &quot;.sxw&quot;
-
- oDocument.StoreToUrl(sPath,NoArgs()
- NOSAVING:
- If Err &lt;&gt; 0 Then
- Msgbox(&quot;Todo: Resourcen für fehlerhaftes Abspeichern suchen!&quot;, 16, GetProductname)
- Resume CLERROR
- Else
- DlgFormDB.EndExecute()
- oDocument.Dispose
- End If
- CLERROR:
Else
- DlgFormDB.EndExecute()
+ oDialogModel.optArea.State = 1
End If
-End Sub
-
-
-Sub ChangeDocumentTitle
- oDocument.DocumentInfo.Title = oDialogModel.txtTitle.Text
-End Sub
-
-
-Sub CheckPathValidation()
-Dim sPath as String
-Dim sDir as String
- sPath = ConvertToUrl(oDialogModel.txtInputPath.Text)
- If sPath &lt;&gt; &quot;&quot; Then
- sDir = DirectorynameoutofPath(sPath, &quot;/&quot;)
- End If
- If oUcb.IsFolder(sDir) Then
- oDialogModel.cmdGoOn.Enabled = oUcb.Exists(sDir)
- Else
- oDialogModel.cmdGoOn.Enabled = False
+ SwitchArrangementButtons(cTabled)
+ SwitchAlignButtons(SBALIGNLEFT)
+ SwitchBorderButtons(SB3DBORDER)
+ ToggleBorderGroup(bControlsAreCreated)
+ ToggleAlignGroup(bControlsAreCreated)
+ ArrangeControls()
+ If OldAlignMode &lt;&gt; 0 Then
+ DlgFormDB.GetControl(&quot;cmdAlign&quot; &amp; OldAlignmode).Model.State = 0
+ End If
+ If OldAlignMode &lt;&gt; 0 Then
+ DlgFormDB.GetControl(&quot;cmdAlign&quot; &amp; OldAlignmode).Model.State = 0
End If
-End Sub
-
-
-Sub ToggleControlsofLastPage()
- With oDialogModel
- If .optUseDocument.State = 1 Then
- .cmdGoOn.Enabled = True
- .txtInputPath.Enabled = False
- .cmdGetPathDialog.Enabled = False
- .lblPath.Enabled = False
- Else
- .lblPath.Enabled = True
- .txtInputPath.Enabled = True
- .cmdGetPathDialog.Enabled = True
- CheckPathValidation()
- End If
- End With
End Sub
@@ -278,6 +216,32 @@ End Sub
Sub SwitchDialogHeight()
- SwitchWizardDialogHeight(DlgFormDB)
+ SwitchWizardDialogHeight(DlgFormDB, sHeightenDialog, sReduceDialog)
End Sub
-</script:module> \ No newline at end of file
+
+
+Sub StoreForm()
+Dim oFileDialog
+Dim iAccept as Integer
+Dim sPath as String
+Dim oStoreProperties(0) as New com.sun.star.beans.PropertyValue
+Dim ListAny(0)
+&apos; Todo: Laut DV soll hierfür ein integer Wert gesetzt werden
+ ListAny(0) = &quot;FileSave_AutoextPwdBox&quot;
+ oFileDialog = CreateUnoService(&quot;com.sun.star.ui.FilePicker&quot;)
+ oFileDialog.AppendFilter(&quot;Writer 6.0&quot;, &quot;*.sxw&quot;)
+ oFileDialog.AppendFilter(&quot;Writer 6.0 Vorlage&quot;, &quot;*.stw&quot;)
+ oFileDialog.SetCurrentFilter(&quot;Writer 6.0&quot;)
+ oFileDialog.Initialize(ListAny())
+ oFileDialog.SetDisplayDirectory(WorkPath)
+&apos; Todo: Vorschlag für Namen: &quot;Form_DatasourceName.ContentName
+ iAccept = oFileDialog.Execute()
+ If iAccept = 1 Then
+ sPath = oFileDialog.Path(0)
+ oStoreProperties(0).Name = &quot;FilterName&quot;
+ oStoreProperties(0).Value = oFileDialog.GetCurrentFilter
+ RemoveShapes()
+ oDocument.StoreAsUrl(sPath, oStoreProperties())
+ DlgFormDB.EndExecute()
+ End If
+End Sub</script:module> \ No newline at end of file
diff --git a/wizards/source/formwizard/Language.xba b/wizards/source/formwizard/Language.xba
index 13a6d014f7af..ae60dd6e8ffa 100644
--- a/wizards/source/formwizard/Language.xba
+++ b/wizards/source/formwizard/Language.xba
@@ -34,6 +34,9 @@ Dim sMsgDatetime_TimeComponent as String
Public sGoOn as String
Public sReady as String
Public sMsgNoConnection as String
+Public sReduceDialog as String
+Public sHeightenDialog as String
+
Sub LoadLanguage ()
sMsgWizardName = GetResText(RID_FORM + 0)
@@ -63,232 +66,216 @@ End Sub
Sub SetDialogLanguage ()
DlgFormDB = LoadDialog(&quot;FormWizard&quot;, &quot;DlgFormDB&quot;)
oDialogModel = DlgFormDB.Model
- oDialogModel.cmdCancel.Label = GetResText(RID_COMMON + 1)
- oDialogModel.cmdBack.Label = GetResText(RID_COMMON + 2)
- oDialogModel.cmdHelp.Label = GetResText(RID_COMMON + 20)
- sGoOn = GetResText(RID_COMMON + 3)
- oDialogModel.cmdGoOn.Label = sGoOn
- oDialogModel.lblDatabases.Label = GetResText(RID_COMMON + 4)
- oDialogModel.lblTables.Label = GetResText(RID_FORM + 11) &apos;Form_1_frameTables
-
- oDialogModel.lblFields.Label = GetResText(RID_FORM + 12) &apos;Form_2_lblAvailable
- oDialogModel.lblSelFields.Label = GetResText(RID_FORM + 13) &apos;Form_2_lblSelected
-
-
- oDialogModel.lblStyles.Label = GetResText(RID_FORM + 21)
-&apos; Todo: Die Position des Eingabefeld für den Formulartitel entsprechend der Länge seines Labels bestimmen
- oDialogModel.lblInputTitle.Label = GetResText(RID_FORM + 22)
- oDialogModel.lblFinalConfig.Label = GetResText(RID_FORM + 23)
- oDialogModel.optUseDocument.Label = GetResText(RID_FORM + 24)
- oDialogModel.optSaveDocument.Label = GetResText(RID_FORM + 25)
- oDialogModel.optUseDocument.Enabled = True
- oDialogModel.lblPath.Label = GetResText(RID_FORM + 60)
- oDialogModel.txtInputPath.Text = ConvertFromUrl(WorkPath)
- oDialogModel.hlnBorderLayout.Label = GetResText(RID_FORM + 28)
- oDialogModel.hlnAlign.Label = GetResText(RID_FORM + 32)
- oDialogModel.hlnArrangements.Label = GetResText(RID_FORM + 35)
-
- WizardTitle(1) = GetResText(RID_FORM + 45)
- WizardTitle(2) = GetResText(RID_FORM + 46)
- WizardTitle(3) = GetResText(RID_FORM + 47)
-
- oDialogModel.hlnBinaries.Label = GetResText(RID_FORM + 50)
- oDialogModel.optIgnoreBinaries.Label = GetResText(RID_FORM + 51)
- oDialogModel.optBinariesasGraphics.Label = GetResText(RID_FORM + 52)
+ With oDialogModel
+ .cmdCancel.Label = GetResText(RID_COMMON + 1)
+ .cmdBack.Label = GetResText(RID_COMMON + 2)
+ .cmdHelp.Label = GetResText(RID_COMMON + 20)
+ sGoOn = GetResText(RID_COMMON + 3)
+ .cmdGoOn.Label = sGoOn
+ .lblDatabases.Label = GetResText(RID_COMMON + 4)
+ .lblTables.Label = GetResText(RID_FORM + 11)
+
+ .lblFields.Label = GetResText(RID_FORM + 12)
+ .lblSelFields.Label = GetResText(RID_FORM + 13)
+
+ .lblStyles.Label = GetResText(RID_FORM + 21)
+ .hlnBorderLayout.Label = GetResText(RID_FORM + 28)
+ .hlnAlign.Label = GetResText(RID_FORM + 32)
+ .hlnArrangements.Label = GetResText(RID_FORM + 35)
+
+ WizardTitle(1) = GetResText(RID_FORM + 45)
+ WizardTitle(2) = GetResText(RID_FORM + 46)
+ WizardTitle(3) = GetResText(RID_FORM + 47)
+
+ .hlnBinaries.Label = GetResText(RID_FORM + 50)
+ .optIgnoreBinaries.Label = GetResText(RID_FORM + 51)
+ .optBinariesasGraphics.Label = GetResText(RID_FORM + 52)
- oDialogModel.hlnBackground.Label = GetResText(RID_FORM + 55)
- oDialogModel.optTiled.Label = GetResText(RID_FORM + 56)
- oDialogModel.optArea.Label = GetResText(RID_FORM + 57)
-
- oDialogModel.cmdAlign0.ImageURL = FormPath &amp; &quot;Align_0.bmp&quot;
- oDialogModel.cmdAlign0.HelpText = GetResText(RID_FORM + 33)
+ .hlnBackground.Label = GetResText(RID_FORM + 55)
+ .optTiled.Label = GetResText(RID_FORM + 56)
+ .optArea.Label = GetResText(RID_FORM + 57)
- oDialogModel.cmdAlign2.ImageURL = FormPath &amp; &quot;Align_2.bmp&quot;
- oDialogModel.cmdAlign2.HelpText = GetResText(RID_FORM + 34)
+ .cmdAlign0.ImageURL = FormPath &amp; &quot;Align_0.bmp&quot;
+ .cmdAlign0.HelpText = GetResText(RID_FORM + 33)
- oDialogModel.cmdBorder0.ImageURL = FormPath &amp; &quot;Border_0.bmp&quot;
- oDialogModel.cmdBorder0.HelpText = GetResText(RID_FORM + 29)
+ .cmdAlign2.ImageURL = FormPath &amp; &quot;Align_2.bmp&quot;
+ .cmdAlign2.HelpText = GetResText(RID_FORM + 34)
- oDialogModel.cmdBorder1.ImageURL = FormPath &amp; &quot;Border_1.bmp&quot;
- oDialogModel.cmdBorder1.HelpText = GetResText(RID_FORM + 30)
+ .cmdBorder0.ImageURL = FormPath &amp; &quot;Border_0.bmp&quot;
+ .cmdBorder0.HelpText = GetResText(RID_FORM + 29)
- oDialogModel.cmdBorder2.ImageURL = FormPath &amp; &quot;Border_2.bmp&quot;
- oDialogModel.cmdBorder2.HelpText = GetResText(RID_FORM + 31)
+ .cmdBorder1.ImageURL = FormPath &amp; &quot;Border_1.bmp&quot;
+ .cmdBorder1.HelpText = GetResText(RID_FORM + 30)
+ .cmdBorder2.ImageURL = FormPath &amp; &quot;Border_2.bmp&quot;
+ .cmdBorder2.HelpText = GetResText(RID_FORM + 31)
- oDialogModel.cmdArrange1.ImageURL = FormPath &amp; &quot;Arrange_1.bmp&quot;
- oDialogModel.cmdArrange1.HelpText = GetResText(RID_FORM + 36)
+ .cmdArrange1.ImageURL = FormPath &amp; &quot;Arrange_1.bmp&quot;
+ .cmdArrange1.HelpText = GetResText(RID_FORM + 36)
+
+ .cmdArrange2.ImageURL = FormPath &amp; &quot;Arrange_2.bmp&quot;
+ .cmdArrange2.HelpText = GetResText(RID_FORM + 37)
- oDialogModel.cmdArrange2.ImageURL = FormPath &amp; &quot;Arrange_2.bmp&quot;
- oDialogModel.cmdArrange2.HelpText = GetResText(RID_FORM + 37)
+ .cmdArrange3.ImageURL = FormPath &amp; &quot;Arrange_3.bmp&quot;
+ .cmdArrange3.HelpText = GetResText(RID_FORM + 40)
- oDialogModel.cmdArrange3.ImageURL = FormPath &amp; &quot;Arrange_3.bmp&quot;
- oDialogModel.cmdArrange3.HelpText = GetResText(RID_FORM + 40)
+ .cmdArrange4.ImageURL = FormPath &amp; &quot;Arrange_4.bmp&quot;
+ .cmdArrange4.HelpText = GetResText(RID_FORM + 38)
- oDialogModel.cmdArrange4.ImageURL = FormPath &amp; &quot;Arrange_4.bmp&quot;
- oDialogModel.cmdArrange4.HelpText = GetResText(RID_FORM + 38)
+ .cmdArrange5.ImageURL = FormPath &amp; &quot;Arrange_5.bmp&quot;
+ .cmdArrange5.HelpText = GetResText(RID_FORM + 39)
+
+ sHeightenDialog = GetResText(RID_FORM + 66)
+ sReduceDialog = GetResText(RID_FORM + 65)
- oDialogModel.cmdArrange5.ImageURL = FormPath &amp; &quot;Arrange_5.bmp&quot;
- oDialogModel.cmdArrange5.HelpText = GetResText(RID_FORM + 39)
+ .cmdSwitchHeight.HelpText = sReduceDialog
+ .cmdSwitchHeight.ImageURL = FormPath &amp; &quot;up.bmp&quot;
+ End With
End Sub
Sub InitializeWidthList()
+
&apos;Todo: Was ist mit Currencies? Wieso sind dafür in der API keine Feldtypen definiert?
+&apos; &apos;Currency&apos; ist ein Flag, dass grundsätzlich an jedes Feld angehängt sein kann.
+&apos; An der Connection kann man irgendwie abfragen, ob ein bestimmter Datentyp als Währung
+&apos; interpretiert wird. Darstellung über Numberformatter. Ist nicht konsistent über Datenbanken.
+&apos; außerdem dürften hier einige Treiber auch buggy sein.
WidthList(0,0) = com.sun.star.sdbc.DataType.BIT &apos; = -7;
WidthList(0,1) = 5
WidthList(0,2) = cCheckbox
WidthList(0,3) = False
-
+ WidthList(0,4) = &quot;CheckBox&quot;
WidthList(1,0) = com.sun.star.sdbc.DataType.TINYINT &apos; = -6;
WidthList(1,1) = 4
WidthList(1,2) = cNumericBox
WidthList(1,3) = False
+ WidthList(1,4) = &quot;FormattedField&quot;
WidthList(2,0) = com.sun.star.sdbc.DataType.SMALLINT &apos; = 5;
WidthList(2,1) = 4
WidthList(2,2) = cNumericBox
WidthList(2,3) = False
+ WidthList(2,4) = &quot;FormattedField&quot;
WidthList(3,0) = com.sun.star.sdbc.DataType.INTEGER &apos; = 4;
WidthList(3,1) = 6
WidthList(3,2) = cNumericBox
WidthList(3,3) = False
+ WidthList(3,4) = &quot;FormattedField&quot;
WidthList(4,0) = com.sun.star.sdbc.DataType.BIGINT &apos; = -5;
WidthList(4,1) = 11
WidthList(4,2) = cNumericBox
WidthList(4,3) = False
+ WidthList(4,4) = &quot;FormattedField&quot;
WidthList(5,0) = com.sun.star.sdbc.DataType.FLOAT &apos; = 6;
WidthList(5,1) = 21
WidthList(5,2) = cNumericBox
WidthList(5,3) = False
+ WidthList(5,4) = &quot;FormattedField&quot;
WidthList(6,0) = com.sun.star.sdbc.DataType.REAL &apos; = 7;
- WidthList(6,1) = 21
+ WidthList(6,1) = 21 &apos;Property &apos;Scale&apos;, keine maximalwerte
WidthList(6,2) = cNumericBox
WidthList(6,3) = False
+ WidthList(6,4) = &quot;FormattedField&quot;
WidthList(7,0) = com.sun.star.sdbc.DataType.DOUBLE &apos; = 8;
- WidthList(7,1) = 21
+ WidthList(7,1) = 21 &apos; dynamisch erstellen
+ &apos;Property &apos;Scale&apos;
WidthList(7,2) = cNumericBox
WidthList(7,3) = False
+ WidthList(7,4) = &quot;FormattedField&quot;
WidthList(8,0) = com.sun.star.sdbc.DataType.NUMERIC &apos; = 2;
WidthList(8,1) = 21
WidthList(8,2) = cNumericBox
WidthList(8,3) = False
+ WidthList(8,4) = &quot;FormattedField&quot;
- WidthList(9,0) = com.sun.star.sdbc.DataType.DECIMAL &apos; = 3;
+ WidthList(9,0) = com.sun.star.sdbc.DataType.DECIMAL &apos; = 3; (mit Nachkommastellen)
WidthList(9,1) = 10 &apos; ToDo: Dies muss in einer Routine errechnet werden
WidthList(9,2) = cNumericBox
WidthList(9,3) = False
+ WidthList(9,4) = &quot;FormattedField&quot;
WidthList(10,0) = com.sun.star.sdbc.DataType.CHAR &apos; = 1;
WidthList(10,1) = 3
WidthList(10,2) = cTextBox
WidthList(10,3) = False
+ WidthList(10,4) = &quot;TextField&quot;
+
&apos; Todo: Sollte die Feldlänge vielleicht lieber aus den Metadaten ausgelesen werden?
WidthList(11,0) = com.sun.star.sdbc.DataType.VARCHAR &apos; = 12;
WidthList(11,1) = 20
WidthList(11,2) = cTextBox
WidthList(11,3) = True
+ WidthList(11,4) = &quot;TextField&quot;
WidthList(12,0) = com.sun.star.sdbc.DataType.LONGVARCHAR &apos; = -1;
WidthList(12,1) = 20
WidthList(12,2) = cTextBox
WidthList(12,3) = True
+ WidthList(12,4) = &quot;TextField&quot;
WidthList(13,0) = com.sun.star.sdbc.DataType.DATE &apos; = 91;
WidthList(13,1) = 12
WidthList(13,2) = cDateBox
WidthList(13,3) = False
+ WidthList(13,4) = &quot;DateField&quot;
WidthList(14,0) = com.sun.star.sdbc.DataType.TIME &apos; = 92;
WidthList(14,1) = 11
WidthList(14,2) = cTimeBox
WidthList(14,3) = False
+ WidthList(14,4) = &quot;TimeField&quot;
&apos; Todo: Die folgenden Felder auffüllen!
WidthList(15,0) = com.sun.star.sdbc.DataType.TIMESTAMP &apos; = 93;
-&apos; WidthList(15,1) =
+&apos; WidthList(15,1) = Datum-Zeit Feld
&apos; WidthList(15,2) =
WidthList(15,3) = False
+&apos; WidthList(15,4) =
+
+
+ ImgWidthList(0,0) = com.sun.star.sdbc.DataType.BINARY &apos; = -2;
+ ImgWidthList(0,1) = 1000
+ ImgWidthList(0,2) = cImageControl
+ ImgWidthList(0,3) = False
+ ImgWidthList(0,4) = &quot;ImageControl&quot;
- WidthList(16,0) = com.sun.star.sdbc.DataType.BINARY &apos; = -2;
-&apos; WidthList(16,1) =
-&apos; WidthList(16,2) = cImageControl
- WidthList(16,3) = False
-
- WidthList(17,0) = com.sun.star.sdbc.DataType.VARBINARY &apos; = -3;
-&apos; WidthList(17,1) =
-&apos; WidthList(17,2) = cImageControl
- WidthList(17,3) = False
-
- WidthList(18,0) = com.sun.star.sdbc.DataType.LONGVARBINARY &apos; = -4;
-&apos; WidthList(18,1) =
-&apos; WidthList(18,2) = cImageControl
- WidthList(18,3) = False
-
- WidthList(19,0) = com.sun.star.sdbc.DataType.SQLNULL &apos; = 0;
-&apos; WidthList(19,1) =
-&apos; WidthList(19,2) =
- WidthList(19,3) = False
-
- WidthList(20,0) = com.sun.star.sdbc.DataType.OTHER &apos; = 1111;
-&apos; WidthList(20,1) =
-&apos; WidthList(20,2) =
- WidthList(20,3) = False
-
- WidthList(21,0) = com.sun.star.sdbc.DataType.OBJECT &apos; = 2000;
-&apos; WidthList(21,1) =
-&apos; WidthList(21,2) =
- WidthList(21,3) = False
-
- WidthList(22,0) = com.sun.star.sdbc.DataType.DISTINCT &apos; = 2001;
-&apos; WidthList(22,1) =
-&apos; WidthList(22,2) =
- WidthList(22,3) = False
-
- WidthList(23,0) = com.sun.star.sdbc.DataType.STRUCT &apos; = 2002;
-&apos; WidthList(23,1) =
-&apos; WidthList(23,2) =
- WidthList(23,3) = False
-
- WidthList(24,0) = com.sun.star.sdbc.DataType.ARRAY &apos; = 2003;
-&apos; WidthList(24,1) =
-&apos; WidthList(24,2) =
- WidthList(24,3) = False
-
- WidthList(25,0) = com.sun.star.sdbc.DataType.BLOB &apos; = 2004;
-&apos; WidthList(25,1) =
-&apos; WidthList(25,2) =
- WidthList(25,3) = False
-
- WidthList(26,0) = com.sun.star.sdbc.DataType.CLOB &apos; = 2005;
-&apos; WidthList(26,1) =
-&apos; WidthList(26,2) =
- WidthList(26,3) = False
+ ImgWidthList(1,0) = com.sun.star.sdbc.DataType.VARBINARY &apos; = -3;
+ ImgWidthList(1,1) = 1000
+ ImgWidthList(1,2) = cImageControl
+ ImgWidthList(1,3) = False
+ ImgWidthList(1,4) = &quot;ImageControl&quot;
+
+ ImgWidthList(2,0) = com.sun.star.sdbc.DataType.LONGVARBINARY &apos; = -4;
+ ImgWidthList(2,1) = 1000
+ ImgWidthList(2,2) = cImageControl
+ ImgWidthList(2,3) = False
+ ImgWidthList(2,4) = &quot;ImageControl&quot;
+
+ ImgWidthList(3,0) = com.sun.star.sdbc.DataType.BLOB &apos; = 2004;
+ ImgWidthList(3,1) = 1000
+ ImgWidthList(3,2) = cImageControl
+ ImgWidthList(3,3) = False
+ ImgWidthList(3,4) = &quot;ImageControl&quot;
+
+&apos; Note: the following Fieldtypes cannot be presented
+&apos; Todo: This should be mentioned in the help
+&apos;ExcludeList(0) = com.sun.star.sdbc.DataType.SQLNULL
+&apos;ExcludeList(1) = com.sun.star.sdbc.DataType.OTHER
+&apos;ExcludeList(2) = com.sun.star.sdbc.DataType.OBJECT
+&apos;ExcludeList(3) = com.sun.star.sdbc.DataType.DISTINCT
+&apos;ExcludeList(4) = com.sun.star.sdbc.DataType.STRUCT
+&apos;ExcludeList(5) = com.sun.star.sdbc.DataType.ARRAY
+&apos;ExcludeList(6) = com.sun.star.sdbc.DataType.CLOB
+&apos;ExcludeList(7) = com.sun.star.sdbc.DataType.REF
- WidthList(27,0) = com.sun.star.sdbc.DataType.REF &apos; = 2006;
-&apos; WidthList(27,1) =
-&apos; WidthList(27,2) =
- WidthList(27,3) = False
-
- ControlList(cCheckBox) = &quot;CheckBox&quot; &apos; cBoolean
- ControlList(cNumericBox) = &quot;NumericField&quot; &apos; cFloat, cInteger, cLong, cCounter, cDecimal, cShortInt
- ControlList(cCurrencyBox) = &quot;CurrencyField&quot; &apos; cCurrency
- ControlList(cDateBox) = &quot;DateField&quot;
- ControlList(cTimeBox) = &quot;TimeField&quot;
- ControlList(cTextBox) = &quot;TextField&quot;
- ControlList(cImageControl) = &quot;ImageControl&quot;
-&apos; Todo: Und was ist hiermit?
-&apos;const cLabel = 1
-&apos;const cGridControl = 8
-&apos;const cImageControl = 9
-
oModelService(cLabel) = &quot;com.sun.star.form.component.FixedText&quot;
oModelService(cTextBox) = &quot;com.sun.star.form.component.TextField&quot;
oModelService(cCheckBox) = &quot;com.sun.star.form.component.CheckBox&quot;
diff --git a/wizards/source/formwizard/Layouter.xba b/wizards/source/formwizard/Layouter.xba
index 3d3d2251dce0..842e7147fde0 100644
--- a/wizards/source/formwizard/Layouter.xba
+++ b/wizards/source/formwizard/Layouter.xba
@@ -7,12 +7,16 @@
&apos; Was passiert, wenn Felder jenseits der Ränder positioniert werden?
&apos; Todo: Die ObjektArrays oDBShapeList() und oTCShaplist könnten 3-Dimensional sein mit dem Model und dem Control
&apos; in den anderen beiden Dimensionen
+&apos; Todo: doppelte Liste für Tabellen und Abfragen mit der Angabe des Contenttypes
+
Public oProgressbar as Object
Public ProgressValue as Integer
Public oDocument as Object
Public oController as Object
Public oForm as Object
Public oDrawPage as Object
+Public oPageStyle as Object
+
Public nMaxColRightX as Long
Public nMaxTCWidth as Long
Public nMaxRowRightX as Long
@@ -39,7 +43,10 @@ Public CurArrangement as Integer
Public CurBorderType as Integer
Public CurAlignmode as Integer
+Public OldAlignMode as Integer
+Public OldBorderType as Integer
Public OldArrangement as Integer
+
Public Const cColumnarLeft = 1
Public Const cColumnarTop = 2
Public Const cTabled = 3
@@ -64,7 +71,7 @@ Public Const cGridControl = 8
Public Const cImageControl = 9
Public Styles(8, 50) as String
-Public FieldMetaValues(MaxFieldIndex,2) as String
+Public FieldMetaValues(MaxFieldIndex,3)
&apos; Description of this List:
&apos; FieldMetaValues(0-MaxFieldIndex,0) (Datafieldtype)
&apos; FieldMetaValues(0-MaxFieldIndex,1) (Datafieldlength)
@@ -122,36 +129,37 @@ ErrorAndCloseForm:
End Function
-Sub OpenBaseDocument()
+Sub OpenFormDocument()
Dim NoArgs() as new com.sun.star.beans.PropertyValue
-Dim aPageSize As New com.sun.star.awt.Size
-Dim aSize As New com.sun.star.awt.Size
Dim oViewSettings as Object
-Dim oPageStyle as Object
-
oDocument = StarDesktop.LoadComponentFromURL(&quot;private:factory/swriter&quot;, &quot;_blank&quot;, 0, NoArgs())
+ oDocument.ApplyFormDesignMode = False
oController = oDocument.GetCurrentController
oViewSettings = oDocument.CurrentController.ViewSettings
&apos; oDocument.LockControllers
oViewSettings.ShowTableBoundaries = False
+&apos; Todo: Im Auge behalten, ob die Viewsettings auch mit abgespeichert werden
oViewSettings.ShowTextBoundaries = False
oViewSettings.ShowOnlineLayout = True
oViewSettings.ShowHoriRuler = True
-&apos; oCursor = oDocument.Text.CreateTextCursor
-&apos; oCursor.InsertDocumentfromURL(FileStr, NoArgs())
oDrawPage = oDocument.DrawPage
oPageStyle = oDocument.StyleFamilies.GetByName(&quot;PageStyles&quot;).GetByName(&quot;Standard&quot;)
+End Sub
+
+
+Sub ConfigurePageStyle()
+Dim aPageSize As New com.sun.star.awt.Size
+Dim aSize As New com.sun.star.awt.Size
oPageStyle.IsLandscape = True
-&apos; Todo: Prozedur schreiben um Seite auf Landscape/Portrait zu setzen
aPageSize = oPageStyle.Size
nPageWidth = aPageSize.Width
nPageHeight = aPageSize.Height
aSize.Width = nPageHeight
aSize.Height = nPageWidth
oPageStyle.Size = aSize
+
nPageWidth = nPageHeight
nPageHeight = oPageStyle.Size.Height
- &apos; Todo: Es könnte der unterste Grenze in Abhängigkeit von der Anzahl der DB-Felder bestimmt werden.
nFormWidth = nPageWidth - oPageStyle.RightMargin - oPageStyle.LeftMargin - 2 * cXOffset
nFormHeight = nPageHeight - oPageStyle.TopMargin - oPageStyle.BottomMargin - 2 * cYOffset - cSymbolMargin
End Sub
@@ -160,22 +168,18 @@ End Sub
&apos; Modify the Borders of the Controls
Sub ChangeBorderLayouts(oEvent as Object)
Dim oModel as Object
-Dim OldBorderType as Integer
Dim i as Integer
Dim oCurModel as Object
+ oModel = oEvent.Source.Model
+ SwitchBorderButtons(Val(Right(oModel.Name,1)))
ToggleLayoutPage(False)
&apos; oDocument.LockControllers
- OldBorderType = CurBorderType
- oModel = oEvent.Source.Model
- CurBorderType = Val(Right(oModel.Name,1))
-&apos; Todo: Die Grafikurl des Controls umsetzen, ebenso wie die Grafikurl des
-&apos; alten Controls
+
&apos; Todo: Auch unsichtbare Controls müssen eine neue Border bekommen
&apos; Am besten wird hierbei das dynamische Array oDBShapeList() abgegriffen
If CurArrangement = cTabled Then
oGridModel.Border = CurBorderType
Else
- &apos;
If OldBorderType &lt;&gt; CurBorderType Then
For i = 0 To MaxIndex
oCurModel = oDBShapeList(i).GetControl
@@ -193,15 +197,11 @@ End Sub
Sub ChangeLabelAlignments(oEvent as Object)
Dim i as Integer
Dim oCurModel as Object
-Dim OldAlignMode as Integer
Dim oModel as Object
+ oModel = oEvent.Source.Model
+ SwitchAlignButtons(Val(Right(oModel.Name,1)))
ToggleLayoutPage(False)
&apos; oDocument.LockControllers()
- OldAlignMode = CurAlignMode
- oModel = oEvent.Source.Model
- CurAlignMode = Val(Right(oModel.Name,1))
- &apos; Todo: Es muss festgestellt werden, welches Imagecontrol vorher selectiert war
- &apos; und die GrafikUrls müssen entsprechend angepasst werden.
If OldAlignMode &lt;&gt; CurAlignMode Then
For i = 0 To MaxIndex
oCurModel = oTCShapeList(i).GetControl
@@ -215,9 +215,10 @@ End Sub
Sub ChangeArrangemode(oEvent as Object)
Dim oModel as Object
- OldArrangement = CurArrangement
oModel = oEvent.Source.Model
- CurArrangement = Val(Right(oModel.Name,1))
+ SwitchArrangementButtons(Val(Right(oModel.Name,1)))
+ oModel.State = 1
+ DlgFormDB.GetControl(&quot;cmdArrange&quot; &amp; OldArrangement).Model.State = 0
If CurArrangement &lt;&gt; OldArrangement Then
ArrangeControls()
Select Case CurArrangement
@@ -228,8 +229,8 @@ Dim oModel as Object
ToggleAlignGroup(CurArrangement = cColumnarLeft)
ControlCaptionstoStandardLayout()
&apos; Todo: geht das nicht eleganter?
- ToggleDesignmode(oDocument)
- ToggleDesignmode(oDocument)
+&apos; ToggleDesignmode(oDocument)
+&apos; ToggleDesignmode(oDocument)
oDBForm.Load
End Select
@@ -276,7 +277,7 @@ Sub ToggleLayoutPage(bDoEnable as Boolean)
.cmdBack.Enabled = bDoEnable
.cmdGoOn.Enabled = bDoEnable
&apos; If DlgFormDB.GetControl(&quot;imgTheme&quot;).Visible Then
- .imgTheme.Enabled = bDoEnable
+&apos; .imgTheme.Enabled = bDoEnable
&apos; End If
End With
ToggleAlignGroup(bDoEnable)
@@ -294,4 +295,34 @@ Dim oShape as Object
End If
Next i
End Sub
+
+
+Sub SwitchArrangementButtons(ByVal LocArrangement as Integer)
+ OldArrangement = CurArrangement
+ CurArrangement = LocArrangement
+ If OldArrangement &lt;&gt; 0 Then
+ DlgFormDB.GetControl(&quot;cmdArrange&quot; &amp; OldArrangement).Model.State = 0
+ End If
+ DlgFormDB.GetControl(&quot;cmdArrange&quot; &amp; CurArrangement).Model.State = 1
+End Sub
+
+
+Sub SwitchBorderButtons(ByVal LocBorderType as Integer)
+ OldBorderType = CurBorderType
+ CurBorderType = LocBorderType
+&apos; If OldArrangement &lt;&gt; 0 Then
+ DlgFormDB.GetControl(&quot;cmdBorder&quot; &amp; OldBorderType).Model.State = 0
+&apos; End If
+ DlgFormDB.GetControl(&quot;cmdBorder&quot; &amp; CurBorderType).Model.State = 1
+End Sub
+
+
+Sub SwitchAlignButtons(ByVal LocAlignMode as Integer)
+ OldAlignMode = CurAlignMode
+ CurAlignMode = LocAlignMode
+&apos; If OldAlignMode &lt;&gt; 0 Then
+ DlgFormDB.GetControl(&quot;cmdAlign&quot; &amp; OldAlignMode).Model.State = 0
+&apos; End If
+ DlgFormDB.GetControl(&quot;cmdAlign&quot; &amp; CurAlignMode).Model.State = 1
+End Sub
</script:module> \ No newline at end of file
diff --git a/wizards/source/formwizard/dbwizres.src b/wizards/source/formwizard/dbwizres.src
index 6b2c7a706b84..21930c1be14e 100644
--- a/wizards/source/formwizard/dbwizres.src
+++ b/wizards/source/formwizard/dbwizres.src
@@ -2,9 +2,9 @@
*
* $RCSfile: dbwizres.src,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: kz $ $Date: 2001-06-13 23:33:31 $
+ * last change: $Author: bc $ $Date: 2001-06-15 15:29:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -2523,6 +2523,23 @@ String RID_DB_FORM_WIZARD_START + 60
};
+String RID_DB_FORM_WIZARD_START + 65
+{
+ Text = "Dialog wird verkleinert";
+ Text[English] = "Dialog will be reduced";
+ Text[ English_us ] = "Dialog will be reduced";
+ Text[ language_user1 ] = "Hilfetext eines Buttons";
+};
+
+String RID_DB_FORM_WIZARD_START + 66
+{
+ Text = "Dialog wird vergrert";
+ Text[English] = "Dialog will be enlarged";
+ Text[ English_us ] = "Dialog will be enlarged";
+ Text[ language_user1 ] = "Hilfetext eines Buttons";
+};
+
+
// ============================================================================
String RID_DB_QUERY_WIZARD_START + 0
diff --git a/wizards/source/formwizard/develop.xba b/wizards/source/formwizard/develop.xba
index 3d2aada4523a..3a58507ed703 100644
--- a/wizards/source/formwizard/develop.xba
+++ b/wizards/source/formwizard/develop.xba
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="develop" script:language="StarBasic">REM ***** BASIC *****
-Public oDBShapeList(200) as Object
-Public oTCShapeList(200) as Object
+Public oDBShapeList() as Object
+Public oTCShapeList() as Object
Public oGridShape as Object
Public a as Integer
Public StartA as Integer
@@ -20,6 +20,7 @@ Public CurControlType as Integer
Public CurFieldlength as Double
Public CurFieldType as Integer
Public CurFieldName as String
+Public CurControlName as String
Dim iReduceWidth as Integer
Function PositionControls(Maxindex as Integer)
@@ -36,15 +37,17 @@ Dim i as Integer
CurFieldType = FieldMetaValues(i,0)
CurFieldLength = CDbl(FieldMetaValues(i,1))
CurControlType = FieldMetaValues(i,2)
+ CurControlName = FieldMetaValues(i,3)
CurFieldName = FieldNames(i)
oTCModel = InsertTextControl(i)
InsertDBControl(oDBModel, i)
bIsVeryFirstRun = False
- oDBModel.LabelControl = oTCModel
+&apos; Todo: Klären, wieso er bei der folgenden Zeile abstürzt
+&apos; oDBModel.LabelControl = oTCModel
ResetPosSizes(i)
oProgressbar.Value = i
Next i
-&apos; ControlCaptionstoStandardLayout()
+ ControlCaptionstoStandardLayout()
bControlsareCreated = True
End Function
@@ -80,6 +83,7 @@ Sub ResetPosSizes(LastIndex as Integer)
a = a + 1
End If
Case cLeftJustified,cTopJustified
+&apos; Todo: Berücksichtigen, wenn das Label eines Controls länger als das DB-Control ist
If nMaxColRightX &gt; cXOffset + nFormWidth Then
Dim nOldYTCPos as Long
nOldYTCPos = nYTCPos
@@ -147,21 +151,20 @@ Dim aSize As New com.sun.star.awt.Size
oShape.Position = GetPoint(nXTCPos, nYTCPos)
Else
oModel = CreateUnoService(oModelService(cLabel))
- oModel.Name =&quot;Label&quot; + (i+1)
oModel.Label = CurFieldName &apos; + nFieldPostfixes(i) (Todo: Was ist ein fieldPostfix?)
oDBForm.InsertByName(oModel.Name, oModel)
aPoint = GetPoint(nXTCPos, nYTCPos)
aSize = GetSize(nTCWidth,nTCHeight)
Set oShape = InsertControl(oModel, aPoint, aSize)
- Set oTCShapeList(i)= oShape
+ Set oTCShapeList(i)= oShape
If bIsVeryFirstRun Then
nTCHeight = GetPreferredHeight(oModel, CurFieldname)
If CurArrangement = cColumnarTop Then
nYDBPos = nYTCPos + nTCHeight
End If
End If
+ nTCWidth = GetPreferredWidth(oModel, True, CurFieldname)
End If
- nTCWidth = GetPreferredWidth(oModel, True, CurFieldname)
CheckOuterPoints(oShape.Position.X, nTCWidth, nYTCPos, nTCHeight)
Select Case CurArrangement
Case cLeftJustified
@@ -206,9 +209,8 @@ Dim iColRightX as Long
Else
aSize = GetSize(nDBWidth,nDBHeight)
oDBModel = CreateUnoService(oModelService(CurControlType))
- oDBModel.Name = ControlList(CurControlType)
- &apos; ToDo: Diese (recht allgemein benamte) Prozedur mit Hilfe von FS anpassen
- HandleNumerics(oDBModel)
+ oDBModel.Name = CurControlName
+ SetNumerics(oDBModel)
oShape = InsertControl(oDBModel, aPoint, aSize)
Set oDBShapeList(i)= oShape
oDBForm.InsertByName(oDBModel.Name, oDBModel)
@@ -375,22 +377,26 @@ Dim n as Integer
Dim oColumn as Object
Dim aPoint as New com.sun.star.awt.Point
Dim aSize as New com.sun.star.awt.Size
-Dim ControlName as String
Dim nWidth as Long
If bControlsareCreated Then
- MakeControlsVisible(False)
+ ShapesToNirwana()
End If
oGridModel = CreateUnoService(oModelService(cGridControl))
+
nWidth = 0
For n = 0 to MaxIndex
CurType = FieldMetaValues(n,0)
CurControlType = FieldMetaValues(n,2)
- CurFieldName = FieldNames(n)
- ControlName = ControlList(CurControlType)
- oColumn = oGridModel.CreateColumn(ControlName)
- oColumn.Name = CalcUniqueContentName(oGridModel, ControlName)
-&apos; Todo: Put this in a separate function
- HandleNumerics(oColumn)
+ CurFieldName = FieldNames(n)
+ If CurControlType = cImageControl Then
+ CurControlName = &quot;TextField&quot;
+ oColumn.Hidden = True
+ Else
+ CurControlName = FieldMetaValues(n,3)
+ oColumn = oGridModel.CreateColumn(CurControlName)
+ End If
+ oColumn.Name = CalcUniqueContentName(oGridModel, CurControlName)
+ SetNumerics(oColumn)
oColumn.DataField = CurFieldName
oColumn.Label = CurFieldName &apos;+ nFieldPostfixes(n); Todo: Was hat das nFieldPostfix hier zu suchen?
oColumn.Width = 0 &apos;Spaltenbreite richtet sich nach dem Feldnamen
diff --git a/wizards/source/formwizard/tools.xba b/wizards/source/formwizard/tools.xba
index 9d42e86674ad..deda298cde8f 100644
--- a/wizards/source/formwizard/tools.xba
+++ b/wizards/source/formwizard/tools.xba
@@ -17,6 +17,7 @@ Dim aPeerSize as new com.sun.star.awt.Size
Dim nWidth as Integer
Dim oControl as Object
&apos; Todo: Wie geht das mit ImageControls
+&apos; kann nur fest verdrahtet werden
If Not IsMissing(LocText) Then
aPeerSize = GetPeerSize(oModel, oControl, LocText)
Else
@@ -102,57 +103,91 @@ End Function
Sub ImportStyles()
Dim CurIndex as Integer
Dim sImportPath as String
- oDocument.LockControllers
+&apos; oDocument.LockControllers
CurIndex = GetCurIndex(oDialogModel.lstStyles, Styles(), NumberofStyles,8)
sImportPath = Styles(8,CurIndex)
LoadNewStyles(oDocument, oDialogModel, CurIndex, sImportPath, Styles(), TexturePath)
- &apos; Todo: Diese Zeile wieder rein wenn Bug #83015 behoben ist
ControlCaptionsToStandardLayout()
- oDocument.UnlockControllers
+ ConfigurePageStyle()
+&apos; oDocument.UnlockControllers
End Sub
-&apos; Todo: Einbinden!!!
-Function SetMaxNumericValue(ByVal oLocObject as Object, nType as Long) as Object
- oLocObject.DecimalAccuracy = 0 &apos; keine Nachkommastellen
- oLocObject.ValueMin = 0 &apos; Minwerte sind 0
- select Case (nType)
- case cLong
- oLocObject.ValueMax = 2147483647 &apos; Maxwert
- case cInteger
- oLocObject.ValueMax = 32767 &apos; Maxwert
- case cShortInt
- oLocObject.ValueMax = 255 &apos; Maxwert
- case cDecimal
- oLocObject.DecimalAccuracy = FieldDecimalAccuracy%(n%) &apos; Nachkommastellen
+Function SetNumerics(ByVal oLocObject as Object) as Object
+ &apos; Todo: FS fragen, ob dies alles richtig ist
+ &apos; Todo: Es sollte in der Hilfe darauf hingewiesen werden, dass der untere Wertbereich negativ ist.
+ Select Case CurFieldType
+ Case com.sun.star.sdbc.DataType.BIGINT
+ oLocObject.ValueMax = 2147483647 * 2147483647
+ oLocObject.ValueMin = -(-2147483648 * -2147483648)
+ Case com.sun.star.sdbc.DataType.INTEGER
+ oLocObject.ValueMax = 2147483647
+ oLocObject.ValueMin = -2147483648
+ Case com.sun.star.sdbc.DataType.SMALLINT
+ oLocObject.ValueMax = 32767
+ oLocObject.ValueMin = -32768
+ Case com.sun.star.sdbc.DataType.TINYINT
+ oLocObject.ValueMax = 127
+ oLocObject.ValueMin = -128
+ Case com.sun.star.sdbc.DataType.FLOAT, com.sun.star.sdbc.DataType.REAL, com.sun.star.sdbc.DataType.DOUBLE, com.sun.star.sdbc.DataType.DECIMAL, com.sun.star.sdbc.DataType.NUMERIC
+ &apos; Todo: Hier sollte der Numberformatter angeworfen werden um die Nachkommastellen
+ &apos; festzulegen
+&apos; oLocObject.DecimalAccuracy = FieldDecimalAccuracy%(n%) &apos; Nachkommastellen
End Select
SetMaxColumnValue = oLocObject
End Function
-Sub MakeControlsVisible(bIsVisible as Boolean)
+&apos; Destroy all Shapes in Nirwana
+Sub RemoveShapes()
Dim n as Integer
Dim oControl as Object
- For n = 0 To MaxIndex
- oControl = oController.GetControl(oDBShapeList(n).GetControl)
- oControl.SetVisible(bIsVisible)
- oControl = oController.GetControl(oTCShapeList(n).GetControl)
- oControl.SetVisible(bIsVisible)
+ For n = oDrawPage.Count-1 To 0 Step -1
+ oShape = oDrawPage(n)
+ If oShape.Position.Y &gt; -2000 Then
+ oDrawPage.Remove(oShape)
+ End If
Next n
End Sub
-
-&apos; Todo: Hier werden allgemeine Einstellungen für numerische Werte vorgenommen
-&apos; Was wird mit den Währungen gemacht?; für Dezimalfelder muss die Anzahl der
-&apos; Nachkommastellen, Tausenderstellen, festgelegt werden. Stichwort &quot;Formatüberprüfungen&quot;
-&apos; im Propertybrowser des Controls
-Sub HandleNumerics(oObject)
- Select Case CurControlType
- Case cNumericBox
- oLocObject = SetMaxNumericValue(oLocObject, CurFieldType)
- Case cCurrencyBox
- oLocObject.CurrencySymbol = s_aCurrencySymbol
- oLocObject.PrependCurrencySymbol = s_aPrependCurrencySymbol
- End Select
+&apos; Note as Shapes cannot be removed from the DrawPage without destroying
+&apos; the object we have to park them somewhere in Nirwana
+Sub ShapesToNirwana()
+Dim n as Integer
+Dim oControl as Object
+ For n = 0 To oDrawPage.Count-1
+ oDrawPage(n).Position = GetPoint(-20, -10000)
+ Next n
End Sub
-</script:module> \ No newline at end of file
+
+
+Function CalcUniqueContentName(BYVAL oContainer as Object, sBaseName as String) as String
+Dim nPostfix as Integer
+Dim sReturn as String
+ nPostfix = 2
+ sReturn = sBaseName
+
+ while (oContainer.hasByName(sReturn))
+ sReturn = sBaseName &amp; nPostfix
+ nPostfix = nPostfix + 1
+ Wend
+ CalcUniqueContentName = sReturn
+End Function
+
+
+
+Function AddListtoList(FirstArray(), SecondArray(), Optional StarIndex)
+Dim n as Integer
+Dim m as Integer
+Dim MaxIndex as Integer
+ MaxIndex = Ubound(FirstArray()) + Ubound(SecondArray()) + 1
+ Dim ResultArray(MaxIndex)
+ For m = 0 To Ubound(FirstArray())
+ ResultArray(m) = FirstArray(m)
+ Next m
+ For n = 0 To Ubound(SecondArray())
+ ResultArray(m) = SecondArray(n)
+ m = m + 1
+ Next n
+ AddListToList() = ResultArray()
+End Function</script:module> \ No newline at end of file
diff --git a/wizards/source/tools/ModuleControls.xba b/wizards/source/tools/ModuleControls.xba
index ab85b7438e88..0f728b1fb75c 100644
--- a/wizards/source/tools/ModuleControls.xba
+++ b/wizards/source/tools/ModuleControls.xba
@@ -142,21 +142,30 @@ Dim oCell as Object
End Function
-Function LoadDialog(Libname as String, DialogName as String, Optional oLibContainer)
+Function LoadDialog(Libname as String, DialogName as String)
Dim oLib as Object
-Dim oLibDialog as Object
-Dim oRuntimeDialog as Object
-
- If IsMissing( oLibContainer ) then
- oLibContainer = DialogLibraries
- End If
- oLibContainer.LoadLibrary(Libname)
- oLib = oLibContainer.GetByName(Libname)
- oLibDialog = oLib.GetByName(DialogName)
- oRuntimeDialog = CreateUnoDialog(oLibDialog)
- LoadDialog() = oRuntimeDialog
+Dim oDialog as Object
+ DialogLibraries.loadLibrary(Libname)
+ oLib = DialogLibraries.GetByName(Libname)
+ oDialog = CreateUnoDialog(oLib, DialogName)
+ LoadDialog() = oDialog
End Function
+&apos;Function LoadDialog(Libname as String, DialogName as String, Optional oLibContainer)
+&apos;Dim oLib as Object
+&apos;Dim oLibDialog as Object
+&apos;Dim oRuntimeDialog as Object
+
+&apos; If IsMissing( oLibContainer ) then
+&apos; oLibContainer = DialogLibraries
+&apos; End If
+&apos; oLibContainer.LoadLibrary(Libname)
+&apos; oLib = oLibContainer.GetByName(Libname)
+&apos; oLibDialog = oLib.GetByName(DialogName)
+&apos; oRuntimeDialog = CreateUnoDialog(oLibDialog)
+&apos; LoadDialog() = oRuntimeDialog
+&apos;End Function
+
Sub SwitchWizardDialogHeight(oDialog as Object)
Dim oDialogModel as Object