summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wizards/source/formwizard/DlgFormDB.xdl54
-rw-r--r--wizards/source/formwizard/FormWizard.xba11
-rw-r--r--wizards/source/formwizard/Language.xba43
-rw-r--r--wizards/source/formwizard/Layouter.xba9
-rw-r--r--wizards/source/formwizard/develop.xba80
-rw-r--r--wizards/source/formwizard/tools.xba27
6 files changed, 140 insertions, 84 deletions
diff --git a/wizards/source/formwizard/DlgFormDB.xdl b/wizards/source/formwizard/DlgFormDB.xdl
index 614e7b2a20ea..f06653be4856 100644
--- a/wizards/source/formwizard/DlgFormDB.xdl
+++ b/wizards/source/formwizard/DlgFormDB.xdl
@@ -4,90 +4,90 @@
<dlg:bulletinboard>
<dlg:text dlg:id="lblSelFields" dlg:tab-index="0" dlg:left="154" dlg:top="70" dlg:width="110" dlg:height="8" dlg:page="1" dlg:value="lblSelFields"/>
<dlg:menulist dlg:id="lstDatabases" dlg:tab-index="1" dlg:left="6" dlg:top="51" dlg:width="110" dlg:height="12" dlg:page="1" dlg:help-url="HID:34410" dlg:spin="true">
- <script:event script:event-name="on-itemstatechange" script:macro-name="FormWizard.DBMeta.GetSelectedDBMetaData" script:language="StarBasic"/>
+ <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="FormWizard.DBMeta.GetSelectedDBMetaData" script:language="StarBasic"/>
</dlg:menulist>
<dlg:menulist dlg:id="lstTables" dlg:tab-index="2" dlg:left="122" dlg:top="51" dlg:width="110" dlg:height="12" dlg:page="1" dlg:help-url="HID:34411" dlg:spin="true">
- <script:event script:event-name="on-itemstatechange" script:macro-name="FormWizard.FormWizard.FormGetFields" script:language="StarBasic"/>
+ <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="FormWizard.FormWizard.FormGetFields" script:language="StarBasic"/>
</dlg:menulist>
<dlg:img dlg:id="imgTheme" dlg:tab-index="3" dlg:left="6" dlg:top="6" dlg:width="258" dlg:height="26"/>
<dlg:button dlg:id="cmdCancel" dlg:tab-index="4" dlg:left="6" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:34401" dlg:value="cmdCancel">
- <script:event script:event-name="on-performaction" script:macro-name="FormWizard.FormWizard.CancelFormWizard" script:language="StarBasic"/>
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="FormWizard.FormWizard.CancelFormWizard" script:language="StarBasic"/>
</dlg:button>
<dlg:button dlg:id="cmdHelp" dlg:tab-index="5" dlg:left="63" dlg:top="190" dlg:width="53" dlg:height="14" dlg:tag="34400" dlg:help-url="HiD:34400" dlg:value="cmdHelp">
- <script:event script:event-name="on-performaction" script:macro-name="Tools.Recursive.ShowHelperDialog" script:language="StarBasic"/>
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="Tools.Recursive.ShowHelperDialog" script:language="StarBasic"/>
</dlg:button>
<dlg:button dlg:id="cmdBack" dlg:tab-index="6" dlg:left="155" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:34401" dlg:value="cmdBack">
- <script:event script:event-name="on-performaction" script:macro-name="FormWizard.FormWizard.PreviousStep" script:language="StarBasic"/>
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="FormWizard.FormWizard.PreviousStep" script:language="StarBasic"/>
</dlg:button>
<dlg:button dlg:id="cmdGoOn" dlg:tab-index="7" dlg:left="211" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:34403" dlg:value="cmdGoOn">
- <script:event script:event-name="on-performaction" script:macro-name="FormWizard.FormWizard.NextStep" script:language="StarBasic"/>
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="FormWizard.FormWizard.NextStep" script:language="StarBasic"/>
</dlg:button>
<dlg:text 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:id="lblTables" dlg:tab-index="9" dlg:left="122" dlg:top="40" dlg:width="72" dlg:height="8" dlg:page="1" dlg:value="lblTables"/>
<dlg:text dlg:id="lblFields" dlg:tab-index="10" dlg:left="6" dlg:top="70" dlg:width="109" dlg:height="8" dlg:page="1" dlg:value="lblFields"/>
<dlg:button dlg:id="cmdMoveSelected" dlg:tab-index="11" dlg:left="122" dlg:top="84" dlg:width="25" dlg:height="14" dlg:page="1" dlg:help-url="HID:34422" dlg:value="-&gt;">
- <script:event script:event-name="on-performaction" script:macro-name="Tools.Listbox.FormMoveSelected" script:language="StarBasic"/>
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="Tools.Listbox.FormMoveSelected" script:language="StarBasic"/>
</dlg:button>
<dlg:button dlg:id="cmdMoveAll" dlg:tab-index="12" dlg:left="122" dlg:top="101" dlg:width="25" dlg:height="14" dlg:page="1" dlg:help-url="HID:34423" dlg:value="=&gt;&gt;">
- <script:event script:event-name="on-performaction" script:macro-name="Tools.Listbox.FormMoveAll" script:language="StarBasic"/>
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="Tools.Listbox.FormMoveAll" script:language="StarBasic"/>
</dlg:button>
<dlg:button dlg:id="cmdRemoveSelected" dlg:tab-index="13" dlg:left="122" dlg:top="118" dlg:width="25" dlg:height="14" dlg:page="1" dlg:help-url="HID:34424" dlg:value="&lt;-">
- <script:event script:event-name="on-performaction" script:macro-name="Tools.Listbox.FormRemoveSelected" script:language="StarBasic"/>
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="Tools.Listbox.FormRemoveSelected" script:language="StarBasic"/>
</dlg:button>
<dlg:button dlg:id="cmdRemoveAll" dlg:tab-index="14" dlg:left="122" dlg:top="135" dlg:width="25" dlg:height="14" dlg:page="1" dlg:help-url="HID:34425" dlg:value="&lt;&lt;=">
- <script:event script:event-name="on-performaction" script:macro-name="Tools.Listbox.FormRemoveAll" script:language="StarBasic"/>
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="Tools.Listbox.FormRemoveAll" script:language="StarBasic"/>
</dlg:button>
<dlg:radiogroup>
<dlg:radio dlg:id="optIgnoreBinaries" dlg:tab-index="15" dlg:left="122" dlg:top="169" dlg:width="104" dlg:height="10" dlg:page="1" dlg:help-url="HID:34427" dlg:value="optIgnoreBinaries">
- <script:event script:event-name="on-performaction" script:macro-name="FormWizard.DBMeta.RemoveBinaryFieldsFromWidthList" script:language="StarBasic"/>
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="FormWizard.DBMeta.RemoveBinaryFieldsFromWidthList" script:language="StarBasic"/>
</dlg:radio>
<dlg:radio dlg:id="optBinariesasGraphics" dlg:tab-index="16" dlg:left="12" dlg:top="169" dlg:width="104" dlg:height="10" dlg:page="1" dlg:help-url="HID:34426" dlg:value="optBinariesasGraphics">
- <script:event script:event-name="on-performaction" script:macro-name="FormWizard.DBMeta.AddBinaryFieldsToWidthList" script:language="StarBasic"/>
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="FormWizard.DBMeta.AddBinaryFieldsToWidthList" script:language="StarBasic"/>
</dlg:radio>
</dlg:radiogroup>
<dlg:menulist dlg:id="lstFields" dlg:tab-index="17" dlg:left="6" dlg:top="81" dlg:width="110" dlg:height="70" dlg:page="1" dlg:help-url="HID:34420" dlg:multiselection="true">
- <script:event script:event-name="on-itemstatechange" script:macro-name="Tools.Listbox.FormSetMoveRights" script:language="StarBasic"/>
+ <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="Tools.Listbox.FormSetMoveRights" script:language="StarBasic"/>
</dlg:menulist>
<dlg:menulist dlg:id="lstSelFields" dlg:tab-index="18" dlg:left="154" dlg:top="81" dlg:width="110" dlg:height="70" dlg:page="1" dlg:help-url="HID:34421" dlg:multiselection="true">
- <script:event script:event-name="on-itemstatechange" script:macro-name="Tools.Listbox.FormSetMoveRights" script:language="StarBasic"/>
+ <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="Tools.Listbox.FormSetMoveRights" script:language="StarBasic"/>
</dlg:menulist>
<dlg:text dlg:id="lblStyles" dlg:tab-index="19" dlg:left="150" dlg:top="39" dlg:width="114" dlg:height="8" dlg:page="2" dlg:value="lblStyles"/>
<dlg:button dlg:id="cmdArrange1" dlg:tab-index="20" dlg:left="12" dlg:top="50" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="1" dlg:help-url="HID:34431">
- <script:event script:event-name="on-performaction" script:macro-name="FormWizard.Layouter.ChangeArrangemode" script:language="StarBasic"/>
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="FormWizard.Layouter.ChangeArrangemode" script:language="StarBasic"/>
</dlg:button>
<dlg:button dlg:id="cmdArrange2" dlg:tab-index="21" dlg:left="39" dlg:top="50" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="2" dlg:help-url="HID:34432">
- <script:event script:event-name="on-performaction" script:macro-name="FormWizard.Layouter.ChangeArrangemode" script:language="StarBasic"/>
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="FormWizard.Layouter.ChangeArrangemode" script:language="StarBasic"/>
</dlg:button>
<dlg:button dlg:id="cmdArrange3" dlg:tab-index="22" dlg:left="66" dlg:top="50" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="3" dlg:help-url="HID:34433">
- <script:event script:event-name="on-performaction" script:macro-name="FormWizard.Layouter.ChangeArrangemode" script:language="StarBasic"/>
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="FormWizard.Layouter.ChangeArrangemode" script:language="StarBasic"/>
</dlg:button>
<dlg:button dlg:id="cmdArrange4" dlg:tab-index="23" dlg:left="93" dlg:top="50" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="4" dlg:help-url="HID:34434">
- <script:event script:event-name="on-performaction" script:macro-name="FormWizard.Layouter.ChangeArrangemode" script:language="StarBasic"/>
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="FormWizard.Layouter.ChangeArrangemode" script:language="StarBasic"/>
</dlg:button>
<dlg:button dlg:id="cmdArrange5" dlg:tab-index="24" dlg:left="120" dlg:top="50" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="5" dlg:help-url="HID:34435">
- <script:event script:event-name="on-performaction" script:macro-name="FormWizard.Layouter.ChangeArrangemode" script:language="StarBasic"/>
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="FormWizard.Layouter.ChangeArrangemode" script:language="StarBasic"/>
</dlg:button>
<dlg:menulist dlg:id="lstStyles" dlg:tab-index="25" dlg:left="150" dlg:top="50" dlg:width="114" dlg:height="86" dlg:page="2" dlg:help-url="HID:34443">
- <script:event script:event-name="on-itemstatechange" script:macro-name="FormWizard.tools.ImportStyles" script:language="StarBasic"/>
+ <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="FormWizard.tools.ImportStyles" script:language="StarBasic"/>
</dlg:menulist>
<dlg:radiogroup>
<dlg:radio dlg:id="optBorder0" dlg:tab-index="26" dlg:left="11" dlg:top="95" dlg:width="131" dlg:height="10" dlg:page="2" dlg:help-url="HID:34438" dlg:value="optBorder0">
- <script:event script:event-name="on-performaction" script:macro-name="FormWizard.Layouter.ChangeBorderLayouts" script:language="StarBasic"/>
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="FormWizard.Layouter.ChangeBorderLayouts" script:language="StarBasic"/>
</dlg:radio>
<dlg:radio dlg:id="optBorder1" dlg:tab-index="27" dlg:left="11" dlg:top="109" dlg:width="131" dlg:height="10" dlg:page="2" dlg:help-url="HID:34439" dlg:value="optBorder1">
- <script:event script:event-name="on-performaction" script:macro-name="FormWizard.Layouter.ChangeBorderLayouts" script:language="StarBasic"/>
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="FormWizard.Layouter.ChangeBorderLayouts" script:language="StarBasic"/>
</dlg:radio>
<dlg:radio dlg:id="optBorder2" dlg:tab-index="28" dlg:left="11" dlg:top="123" dlg:width="131" dlg:height="10" dlg:page="2" dlg:help-url="HID:34440" dlg:value="optBorder2">
- <script:event script:event-name="on-performaction" script:macro-name="FormWizard.Layouter.ChangeBorderLayouts" script:language="StarBasic"/>
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="FormWizard.Layouter.ChangeBorderLayouts" script:language="StarBasic"/>
</dlg:radio>
</dlg:radiogroup>
<dlg:fixedline dlg:id="hlnBinaries" dlg:tab-index="29" dlg:left="6" dlg:top="158" dlg:width="258" dlg:height="8" dlg:page="1" dlg:value="hlnBinaries"/>
<dlg:radiogroup>
<dlg:radio dlg:id="optTiled" dlg:tab-index="30" dlg:left="156" dlg:top="154" dlg:width="81" dlg:height="10" dlg:page="2" dlg:tag="11" dlg:help-url="HID:34444" dlg:value="optTiled">
- <script:event script:event-name="on-mouseup" script:macro-name="WebWizard.Common.SetBackGraphicStyle" script:language="StarBasic"/>
+ <script:event script:event-name="on-mouseup" script:location="application" script:macro-name="WebWizard.Common.SetBackGraphicStyle" script:language="StarBasic"/>
</dlg:radio>
<dlg:radio dlg:id="optArea" dlg:tab-index="31" dlg:left="156" dlg:top="168" dlg:width="81" dlg:height="10" dlg:page="2" dlg:tag="10" dlg:help-url="HID:34443" dlg:value="optArea">
- <script:event script:event-name="on-mouseup" script:macro-name="WebWizard.Common.SetBackGraphicStyle" script:language="StarBasic"/>
+ <script:event script:event-name="on-mouseup" script:location="application" script:macro-name="WebWizard.Common.SetBackGraphicStyle" script:language="StarBasic"/>
</dlg:radio>
</dlg:radiogroup>
<dlg:fixedline dlg:id="hlnBackground" dlg:tab-index="32" dlg:left="150" dlg:top="143" dlg:width="114" dlg:height="8" dlg:page="2" dlg:value="hlnBackground"/>
@@ -97,10 +97,10 @@
<dlg:button dlg:id="CommandButton1" dlg:tab-index="36" dlg:left="15" dlg:top="128" dlg:width="0" dlg:height="2" dlg:page="2" dlg:tag="1" dlg:value="CommandButton1"/>
<dlg:radiogroup>
<dlg:radio dlg:id="optAlign0" dlg:tab-index="37" dlg:left="12" dlg:top="154" dlg:width="131" dlg:height="10" dlg:page="2" dlg:help-url="HID:34441" dlg:value="optAlign0">
- <script:event script:event-name="on-performaction" script:macro-name="FormWizard.Layouter.ChangeLabelAlignments" script:language="StarBasic"/>
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="FormWizard.Layouter.ChangeLabelAlignments" script:language="StarBasic"/>
</dlg:radio>
<dlg:radio dlg:id="optAlign2" dlg:tab-index="38" dlg:left="12" dlg:top="168" dlg:width="131" dlg:height="10" dlg:page="2" dlg:help-url="HID:34442" dlg:value="optAlign2">
- <script:event script:event-name="on-performaction" script:macro-name="FormWizard.Layouter.ChangeLabelAlignments" script:language="StarBasic"/>
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="FormWizard.Layouter.ChangeLabelAlignments" script:language="StarBasic"/>
</dlg:radio>
</dlg:radiogroup>
<dlg:fixedline dlg:id="FixedLine1" dlg:tab-index="39" dlg:left="6" dlg:top="180" dlg:width="258" dlg:height="6"/>
diff --git a/wizards/source/formwizard/FormWizard.xba b/wizards/source/formwizard/FormWizard.xba
index 34fcdfa06657..59fbfbe63990 100644
--- a/wizards/source/formwizard/FormWizard.xba
+++ b/wizards/source/formwizard/FormWizard.xba
@@ -244,7 +244,7 @@ Sub InitializeLayoutSettings()
ToggleAlignGroup(bControlsAreCreated)
ArrangeControls()
If OldAlignMode &lt;&gt; 0 Then
- DlgFormDB.GetControl(&quot;cmdAlign&quot; &amp; OldAlignmode).Model.State = 0
+ DlgFormDB.GetControl(&quot;optAlign2&quot;).Model.State = 0
End If
End Sub
@@ -276,11 +276,4 @@ Dim oFilters() as Object
If bDocIsStored Then
DlgFormDB.EndExecute()
End If
-End Sub
-
-
-Sub HelperDialog()
-&apos;Todo: The String &quot;start&quot; can be replaced by a HelpIndex
- StarDesktop.LoadComponentfromUrl(&quot;vnd.sun.star.help://&quot; &amp; sDocType &amp; &quot;/start&quot;, &quot;_OFFICE_HELP&quot;, 64, NoArgs())
-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/formwizard/Language.xba b/wizards/source/formwizard/Language.xba
index e395954d77d8..3cfdda968826 100644
--- a/wizards/source/formwizard/Language.xba
+++ b/wizards/source/formwizard/Language.xba
@@ -38,6 +38,9 @@ Public sReady as String
Public sMsgNoConnection as String
Public sWriterFilterName as String
Public sWriterTemplateFiltername as String
+Public XPixelFactor as Long
+Public YPixelFactor as Long
+
Sub LoadLanguage ()
@@ -76,6 +79,8 @@ Sub SetDialogLanguage ()
.cmdGoOn.Label = sGoOn
.lblDatabases.Label = GetResText(RID_FORM + 11)
.lblTables.Label = GetResText(RID_FORM + 6)
+ XPixelFactor = 100000/DlgFormDB.GetControl(&quot;lstDatabases&quot;).Peer.GetInfo.PixelPerMeterX
+ YPixelFactor = 100000/DlgFormDB.GetControl(&quot;lstDatabases&quot;).Peer.GetInfo.PixelPerMeterY
.lblFields.Label = GetResText(RID_FORM + 12)
.lblSelFields.Label = GetResText(RID_FORM + 13)
@@ -135,93 +140,100 @@ Sub InitializeWidthList()
&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.
+
+ &apos; Todo: Bugfix to Bug #88329
+ If Ubound(WidthList(),1) &gt; 15 Then
+ ReDim WidthList(15,4)
+ End If
+
WidthList(0,0) = com.sun.star.sdbc.DataType.BIT &apos; = -7;
- WidthList(0,1) = 5
+ WidthList(0,1) = 8
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,1) = 20
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,1) = 20
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,1) = 30
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,1) = 30
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,1) = 40
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 &apos;Property &apos;Scale&apos;, keine maximalwerte
+ WidthList(6,1) = 40 &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 &apos; dynamisch erstellen
+ WidthList(7,1) = 40&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,1) = 40
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; (mit Nachkommastellen)
- WidthList(9,1) = 10 &apos; ToDo: Dies muss in einer Routine errechnet werden
+ WidthList(9,1) = 40 &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,1) = 30
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,1) = 30
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,1) = 50
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,1) = 20
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,1) = 20
WidthList(14,2) = cTimeBox
WidthList(14,3) = False
WidthList(14,4) = &quot;TimeField&quot;
@@ -233,7 +245,6 @@ Sub InitializeWidthList()
WidthList(15,3) = False
WidthList(15,4) = &quot;DateField&quot;
-
ImgWidthList(0,0) = com.sun.star.sdbc.DataType.BINARY &apos; = -2;
ImgWidthList(0,1) = 1000
ImgWidthList(0,2) = cImageControl
diff --git a/wizards/source/formwizard/Layouter.xba b/wizards/source/formwizard/Layouter.xba
index 36fe0e4d1852..ee991a18eee3 100644
--- a/wizards/source/formwizard/Layouter.xba
+++ b/wizards/source/formwizard/Layouter.xba
@@ -20,6 +20,7 @@ Public nMaxColRightX as Long
Public nMaxTCWidth as Long
Public nMaxRowRightX as Long
Public nMaxRowY as Long
+Public nSecMaxRowY as Long
Public MaxIndex as Integer
Public Const cVertDistance = 200
Public Const cHoriDistance = 300
@@ -225,10 +226,16 @@ Dim oModel as Object
ToggleAlignGroup(False)
Case Else &apos; cColumnarTop,cLeftJustified, cTopJustified
ToggleAlignGroup(CurArrangement = cColumnarLeft)
+ If CurArrangement = cColumnarTop Then
+ If CurAlignMode = com.sun.star.awt.TextAlign.RIGHT Then
+ oDialogModel.optAlign0.State = 1
+ CurAlignMode = com.sun.star.awt.TextAlign.LEFT
+ OldAlignMode = com.sun.star.awt.TextAlign.RIGHT
+ End If
+ End If
ControlCaptionstoStandardLayout()
oDBForm.Load
End Select
-
End If
End Sub
diff --git a/wizards/source/formwizard/develop.xba b/wizards/source/formwizard/develop.xba
index 125eaccbb005..dd0950668567 100644
--- a/wizards/source/formwizard/develop.xba
+++ b/wizards/source/formwizard/develop.xba
@@ -15,8 +15,8 @@ Public bIsVeryFirstValueField as Boolean
&apos; This boolean variable refers to the following Controltypes: cTextBox, cCheckBox, cDateBox, cTimeBox, cNumericBox, cCurrencyBox
Public bControlsareCreated as Boolean
-Public nDBRefWidth as Integer
-Public nDBRefHeight as Integer
+Public nDBRefWidth as Long
+Public nDBRefHeight as Long
Public nXTCPos&amp;, nYTCPos&amp;, nXDBPos&amp;, nYDBPos&amp;, nTCHeight&amp;, nTCWidth&amp;, nDBHeight&amp;, nDBWidth&amp;
Public CurControlType as Integer
Public CurFieldlength as Double
@@ -35,6 +35,8 @@ Dim i as Integer
bIsVeryFirstValueField = True
a = 0
StartA = 0
+ nMaxRowY = 0
+ nSecMaxRowY = 0
For i = 0 To MaxIndex
CurFieldType = FieldMetaValues(i,0)
CurFieldLength = CDbl(FieldMetaValues(i,1))
@@ -118,7 +120,7 @@ Dim oLocDBShape as Object
nDBHeight = oLocDBShape.Size.Height
aPoint = GetPoint(nXDBPos,nYDBPos)
oLocDBShape.SetPosition(aPoint)
- CheckOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight)
+ CheckOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight, True)
&apos; GroupShapes(oDrawPage, oLocTextShape, oLocDBShape)
Next i
End Sub
@@ -154,8 +156,12 @@ Dim aSize As New com.sun.star.awt.Size
nTCWidth = oShape.Size.Width
nTCHeight = oShape.Size.Height
oShape.Position = GetPoint(nXTCPos, nYTCPos)
+ If CurArrangement = cColumnarTop Then
+ oModel.Align = com.sun.star.awt.TextAlign.LEFT
+ End If
Else
oModel = CreateUnoService(oModelService(cLabel))
+
&apos; oModel.Label = CurFieldName &apos; + nFieldPostfixes(i) (Todo: Was ist ein fieldPostfix?)
&apos; Todo: According to FS this handling should be verified. I should not rely on the shape to create a model on its
&apos; own. therefor the model should be inserted before the shape
@@ -181,7 +187,7 @@ Dim aSize As New com.sun.star.awt.Size
nMaxTCWidth = nTCWidth
End If
End If
- CheckOuterPoints(oShape.Position.X, nTCWidth, nYTCPos, nTCHeight)
+ CheckOuterPoints(oShape.Position.X, nTCWidth, nYTCPos, nTCHeight, False)
Select Case CurArrangement
Case cLeftJustified
nXDBPos = nMaxColRightX
@@ -205,7 +211,7 @@ Dim oControl as Object
Dim iColRightX as Long
If Not bIsVeryFirstValueField Then
- nDBWidth = CInt(CurFieldLength/2 * nDBRefWidth)
+ nDBWidth = Clng(CurFieldLength/2 * nDBRefWidth)
Else
nDBWidth = 1
End If
@@ -234,7 +240,7 @@ Dim iColRightX as Long
nDBWidth = 2000
nDBHeight = 2000
Else
- If bIsVeryFirstValueField Then
+ If bIsVeryFirstValueField Then
nDBRefWidth = GetPreferredWidth(oDBModel,True)
&apos; Todo: Hier wird vereinfachend davon ausgegangen, dass es sich bei DB-Feldern immer um Textfelder handelt!
nDBRefHeight = GetPreferredHeight(oDBModel)
@@ -251,7 +257,7 @@ Dim iColRightX as Long
End If
aSize = GetSize(nDBWidth,nDBHeight)
oShape.SetSize(aSize)
- CheckOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight)
+ CheckOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight, True)
oDBModel.DataField = CurFieldName
End Sub
@@ -266,7 +272,7 @@ Dim nBaseWidth as Long
nLeftDist = nMaxColRightX - nBaseWidth
nRightDist = nBaseWidth - nXTCPos + cHoriDistance
If nLeftDist &lt; 0.5 * nRightDist and iReduceWidth &gt; 2 Then
- &apos; Können die Felder in der Reihe gestaucht werden?
+ &apos; Fieldwidths in the line can be made smaller
AdjustLineWidth(StartA, a, nLeftDist, - 1)
If CurArrangement = cLeftjustified Then
nYDBPos = nMaxRowY + cVertDistance
@@ -283,8 +289,13 @@ Dim nBaseWidth as Long
Else
Set oLocDBShape = oDBShapeList(a)
Set oLocTextShape = oTCShapeList(a)
- nYTCPos = nMaxRowY + cVertDistance
If CurArrangement = cLeftJustified Then
+ If nYDBPos + nDBHeight = nMaxRowY Then
+ &apos; The last Control was the highes in the row
+ nYTCPos = nSecMaxRowY + cVertDistance
+ Else
+ nYTCPos = nMaxRowY + cVertDistance
+ End If
nYDBPos = nYTCPos
nXDBPos = cXOffset + nTCWidth
oLocTextShape.Position = GetPoint(cXOffset, nYTCPos)
@@ -292,9 +303,15 @@ Dim nBaseWidth as Long
&apos; PosSizes for the next two Controls
nXTCPos = oLocDBShape.Position.X + oLocDBShape.Size.Width + cHoriDistance
bIsFirstRun = True
- CheckOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight)
+ CheckOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight, True)
nXDBPos = nMaxColRightX + cHoriDistance
- Else
+ Else &apos; cTopJustified
+ If nYDBPos + nDBHeight = nMaxRowY Then
+ &apos; The last Control was the highest in the row
+ nYTCPos = nSecMaxRowY + cVertDistance
+ Else
+ nYTCPos = nMaxRowY + cVertDistance
+ End If
nYDBPos = nYTCPOS + nTCHeight
nXDBPos = cXOffset
nXTCPos = cXOffset
@@ -302,9 +319,9 @@ Dim nBaseWidth as Long
oLocDBShape.Position = GetPoint(cXOffset, nYDBPos)
bIsFirstRun = True
If nDBWidth &gt; nTCWidth Then
- CheckOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight)
+ CheckOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight, True)
Else
- CheckOuterPoints(nXDBPos, nTCWidth, nYDBPos, nDBHeight)
+ CheckOuterPoints(nXDBPos, nTCWidth, nYDBPos, nDBHeight, True)
End If
nXTCPos = nMaxColRightX + cHoriDistance
nXDBPos = nXTCPos
@@ -363,18 +380,26 @@ Dim ShapeCount as Integer
End Sub
-Sub CheckOuterPoints(nXPos, nWidth, nYPos, nHeight)
-Dim nColRightX
-Dim nRowY
+Sub CheckOuterPoints(nXPos, nWidth, nYPos, nHeight, bIsDBField as Boolean)
+Dim nColRightX as Long
+Dim nRowY as Long
+Dim nOldMaxRowY as Long
+
If CurArrangement = cLeftJustified Or CurArrangement = cTopJustified Then
- If bIsFirstRun Then
- nMaxRowY = nYPos + nHeight
- Else
- nRowY = nYPos + nHeight
- If nRowY &gt; nMaxRowY Then
- nMaxRowY = nRowY
+ If bIsDBField Then
+ &apos; Only at DBControls you can measure the Value of nMaxRowY
+ If bIsFirstRun Then
+ nMaxRowY = nYPos + nHeight
+ nSecMaxRowY = nMaxRowY
+ Else
+ nRowY = nYPos + nHeight
+ If nRowY &gt;= nMaxRowY Then
+ nOldMaxRowY = nMaxRowY
+ nSecMaxRowY = nOldMaxRowY
+ nMaxRowY = nRowY
+ End If
End If
- End If
+ End If
End If
&apos; Find the outer right point
If bIsFirstRun Then
@@ -406,16 +431,19 @@ Dim nWidth as Long
nWidth = 0
For n = 0 to MaxIndex
CurFieldType = FieldMetaValues(n,0)
-&apos; CurControlType = FieldMetaValues(n,2)
+ CurControlType = FieldMetaValues(n,2)
CurFieldName = FieldNames(n)
If CurControlType = cImageControl Then
+&apos;Todo: Hier muss in der Hilfe vermittelt werden, dass Image Controls nicht dargestellt werden können
CurControlName = &quot;TextField&quot;
+ oColumn = oGridModel.CreateColumn(CurControlName)
+ oColumn.Name = CalcUniqueContentName(oGridModel, CurControlName)
oColumn.Hidden = True
Else
CurControlName = FieldMetaValues(n,3)
- oColumn = oGridModel.CreateColumn(CurControlName)
- End If
+ oColumn = oGridModel.CreateColumn(CurControlName)
oColumn.Name = CalcUniqueContentName(oGridModel, CurControlName)
+ End If
SetNumerics(oColumn)
oColumn.DataField = CurFieldName
oColumn.Label = CurFieldName &apos;+ nFieldPostfixes(n); Todo: Was hat das nFieldPostfix hier zu suchen?
diff --git a/wizards/source/formwizard/tools.xba b/wizards/source/formwizard/tools.xba
index 571477166a7f..68267738f861 100644
--- a/wizards/source/formwizard/tools.xba
+++ b/wizards/source/formwizard/tools.xba
@@ -21,10 +21,10 @@ Dim oControl as Object
If Not IsMissing(LocText) Then
aPeerSize = GetPeerSize(oModel, oControl, LocText)
Else
- aPeerSize = GetPeerSize(oModel, oControl
+ aPeerSize = GetPeerSize(oModel, oControl)
End If
nWidth = aPeerSize.Width
- GetPreferredWidth = PixelTo100thmm(nWidth)
+ GetPreferredWidth = nWidth * XPixelFactor &apos; PixelTo100thmm(nWidth)
End Function
@@ -39,17 +39,21 @@ Dim oControl as Object
aPeerSize = GetPeerSize(oModel, oControl)
End If
nHeight = aPeerSize.Height
- GetPreferredHeight = PixelTo100thmm(nHeight)
+ GetPreferredHeight = nHeight * YPixelFactor &apos; PixelTo100thmm(nHeight)
End Function
+
Function GetPeerSize(oModel as Object, oControl as Object, Optional LocText)
Dim oPeer as Object
Dim aPeerSize as new com.sun.star.awt.Size
oControl = oController.GetControl(oModel)
oPeer = oControl.GetPeer()
+
If oControl.Model.PropertySetInfo.HasPropertybyName(&quot;EffectiveMax&quot;) Then
&apos; Todo: Remove this Hack due to Bug #88391
+Dim Blubber
+ blubber = oControl.Model.EffectiveMax
oControl.Model.EffectiveValue = oControl.Model.EffectiveMax
aPeerSize = oPeer.PreferredSize()
ElseIf Not IsMissing(LocText) Then
@@ -79,8 +83,19 @@ Function TwipToPixel(BYVAL nValue as long) as long &apos; nur ungefaehre Berechn
End function
-Function PixelTo100thMM(BYVAL nValue as long) as long
- PixelTo100thMM = nValue * 28 &apos; nur ungefähre Berechnung
+Function PixelTo100thMMX(oControl as Object) as long
+ oPeer = oControl.GetPeer()
+ PixelTo100mmX = Clng(Peer.GetInfo.PixelPerMeterX/100000)
+
+&apos; PixelTo100thMM = nValue * 28 &apos; nur ungefähre Berechnung
+End function
+
+
+Function PixelTo100thMMY(oControl as Object) as long
+ oPeer = oControl.GetPeer()
+ PixelTo100mmX = Clng(Peer.GetInfo.PixelPerMeterY/100000)
+
+&apos; PixelTo100thMM = nValue * 28 &apos; nur ungefähre Berechnung
End function
@@ -104,6 +119,7 @@ Sub ImportStyles()
Dim CurIndex as Integer
Dim sImportPath as String
Dim bWithBackGraphic as Boolean
+ ToggleLayoutPage(False)
oDocument.LockControllers
CurIndex = GetCurIndex(oDialogModel.lstStyles, Styles(), NumberofStyles,8)
sImportPath = Styles(8,CurIndex)
@@ -112,6 +128,7 @@ Dim bWithBackGraphic as Boolean
ToggleOptionButtons(oDialogModel, bWithBackGraphic)
ConfigurePageStyle()
oDocument.UnlockControllers
+ ToggleLayoutPage(True)
End Sub