summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wizards/source/formwizard/DBMeta.xba7
-rw-r--r--wizards/source/formwizard/FormWizard.xba10
-rw-r--r--wizards/source/formwizard/Language.xba3
-rw-r--r--wizards/source/formwizard/develop.xba8
-rw-r--r--wizards/source/formwizard/tools.xba26
5 files changed, 28 insertions, 26 deletions
diff --git a/wizards/source/formwizard/DBMeta.xba b/wizards/source/formwizard/DBMeta.xba
index b32f9dda85cc..72766c021745 100644
--- a/wizards/source/formwizard/DBMeta.xba
+++ b/wizards/source/formwizard/DBMeta.xba
@@ -18,7 +18,8 @@ Dim bGetMetaData as Boolean
If Ubound(oDialogModel.lstDatabases.SelectedItems()) > -1 Then
ToggleDatabasePage(False)
DBIndex = oDialogModel.lstDatabases.SelectedItems(0)
- If GetConnection(sDatabaseList(DBIndex)) Then
+ sDBName = sDatabaseList(DBIndex)
+ If GetConnection(sDBName) Then
bGetMetaData = GetDBMetaData()
End If
If bGetMetaData Then
@@ -49,7 +50,7 @@ Dim iMsg as Integer
Else
oInteractionHandler = createUnoService("com.sun.star.sdb.InteractionHandler")
oDataSource = oDBContext.GetByName(sDBName)
-' On Local Error Goto NOCONNECTION
+ On Local Error Goto NOCONNECTION
Do
bExitLoop = True
oDBConnection = oDataSource.ConnectWithCompletion(oInteractionHandler)
@@ -61,8 +62,8 @@ Dim iMsg as Integer
End If
On Local Error Goto 0
Loop Until bExitLoop
+ GetConnection() = bGetConnection
End If
- GetConnection() = bGetConnection
End Function
diff --git a/wizards/source/formwizard/FormWizard.xba b/wizards/source/formwizard/FormWizard.xba
index e1888651e9b0..2287632c2a08 100644
--- a/wizards/source/formwizard/FormWizard.xba
+++ b/wizards/source/formwizard/FormWizard.xba
@@ -39,6 +39,8 @@ Sub MainWithDefault(Optional DatasourceName as String, Optional Contenttype as I
'On Local Error Goto GlobalError
BasicLibraries.LoadLibrary("Tools")
BasicLibraries.LoadLibrary("WebWizard")
+' Todo: Variable is initialized due to Bug#88329
+ CurArrangement = 0
bControlsareCreated = False
MaxIndex = -1
If Not InitResources("Formwizard","dbw") Then
@@ -97,7 +99,8 @@ Dim i as Integer
ImportStyles()
ToggleWindow(True)
oDialogModel.imgTheme.ImageURL = FormPath & "FormWizard_1.bmp"
- DlgFormDB.Execute()
+' DlgFormDB.Execute()
+ DlgFormDB.Visible = True
Exit Sub
GlobalError:
@@ -216,7 +219,7 @@ End Sub
Sub SwitchDialogHeight()
- SwitchWizardDialogHeight(DlgFormDB, sHeightenDialog, sReduceDialog)
+ SwitchWizardDialogHeight(DlgFormDB, FormPath)
End Sub
@@ -234,13 +237,12 @@ Dim ListAny(0)
oFileDialog.SetCurrentFilter("Writer 6.0")
oFileDialog.Initialize(ListAny())
oFileDialog.SetDisplayDirectory(WorkPath)
-' Todo: Vorschlag für Namen: "Form_DatasourceName.ContentName
+ oFileDialog.SetDefaultName("Form_" & sDBName & "." & TableName
iAccept = oFileDialog.Execute()
If iAccept = 1 Then
sPath = oFileDialog.Path(0)
oStoreProperties(0).Name = "FilterName"
oStoreProperties(0).Value = oFileDialog.GetCurrentFilter
- RemoveShapes()
oDocument.StoreAsUrl(sPath, oStoreProperties())
DlgFormDB.EndExecute()
End If
diff --git a/wizards/source/formwizard/Language.xba b/wizards/source/formwizard/Language.xba
index ae60dd6e8ffa..aaa0313c8e68 100644
--- a/wizards/source/formwizard/Language.xba
+++ b/wizards/source/formwizard/Language.xba
@@ -281,8 +281,7 @@ Sub InitializeWidthList()
oModelService(cCheckBox) = "com.sun.star.form.component.CheckBox"
oModelService(cDateBox) = "com.sun.star.form.component.DateField"
oModelService(cTimeBox) = "com.sun.star.form.component.TimeField"
- oModelService(cNumericBox) = "com.sun.star.form.component.NumericField"
- oModelService(cCurrencyBox) = "com.sun.star.form.component.CurrencyField"
+ oModelService(cNumericBox) = "com.sun.star.form.component.FormattedField"
oModelService(cGridControl) = "com.sun.star.form.component.GridControl"
oModelService(cImageControl) = "com.sun.star.form.component.DatabaseImageControl"
End Sub</script:module> \ No newline at end of file
diff --git a/wizards/source/formwizard/develop.xba b/wizards/source/formwizard/develop.xba
index 3a58507ed703..be83ef6767e1 100644
--- a/wizards/source/formwizard/develop.xba
+++ b/wizards/source/formwizard/develop.xba
@@ -43,7 +43,7 @@ Dim i as Integer
InsertDBControl(oDBModel, i)
bIsVeryFirstRun = False
&apos; Todo: Klären, wieso er bei der folgenden Zeile abstürzt
-&apos; oDBModel.LabelControl = oTCModel
+ oDBModel.LabelControl = oTCModel
ResetPosSizes(i)
oProgressbar.Value = i
Next i
@@ -209,7 +209,7 @@ Dim iColRightX as Long
Else
aSize = GetSize(nDBWidth,nDBHeight)
oDBModel = CreateUnoService(oModelService(CurControlType))
- oDBModel.Name = CurControlName
+&apos; oDBModel.Name = CurControlName
SetNumerics(oDBModel)
oShape = InsertControl(oDBModel, aPoint, aSize)
Set oDBShapeList(i)= oShape
@@ -385,8 +385,8 @@ Dim nWidth as Long
nWidth = 0
For n = 0 to MaxIndex
- CurType = FieldMetaValues(n,0)
- CurControlType = FieldMetaValues(n,2)
+ CurFieldType = FieldMetaValues(n,0)
+&apos; CurControlType = FieldMetaValues(n,2)
CurFieldName = FieldNames(n)
If CurControlType = cImageControl Then
CurControlName = &quot;TextField&quot;
diff --git a/wizards/source/formwizard/tools.xba b/wizards/source/formwizard/tools.xba
index deda298cde8f..6b2d8fd572a2 100644
--- a/wizards/source/formwizard/tools.xba
+++ b/wizards/source/formwizard/tools.xba
@@ -48,15 +48,16 @@ Dim oPeer as Object
Dim aPeerSize as new com.sun.star.awt.Size
oControl = oController.GetControl(oModel)
oPeer = oControl.GetPeer()
- If HasUnoInterfaces(oControl,&quot;com.sun.star.awt.XNumericField&quot;) Then
- oControl.Value = oControl.Max
+ If oControl.Model.PropertySetInfo.HasPropertybyName(&quot;EffectiveMax&quot;) Then
+ oControl.Model.EffectiveDefault = oControl.Model.EffectiveMax
+&apos; Todo: Remove this Hack due to Bug #88391
+&apos; oControl.Model.EffectiveValue = oControl.Model.EffectiveMax
aPeerSize = oPeer.PreferredSize()
- oControl.Value = 0
ElseIf Not IsMissing(LocText) Then
oControl.Text = LocText
aPeerSize = oPeer.PreferredSize()
Else
- oControl.Text = &quot;WWWWWWWWWW&quot;
+ oControl.Text = &quot;2222222222&quot;
aPeerSize = oPeer.PreferredSize()
oControl.Text = &quot;&quot;
End If
@@ -118,23 +119,22 @@ Function SetNumerics(ByVal oLocObject as Object) as Object
&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)
+ oLocObOject.EffectiveMax = 2147483647 * 2147483647
+ oLocbject.EffectiveMin = -(-2147483648 * -2147483648)
Case com.sun.star.sdbc.DataType.INTEGER
- oLocObject.ValueMax = 2147483647
- oLocObject.ValueMin = -2147483648
+ oLocObject.EffectiveMax = 2147483647
+ oLocObject.EffectiveMin = -2147483648
Case com.sun.star.sdbc.DataType.SMALLINT
- oLocObject.ValueMax = 32767
- oLocObject.ValueMin = -32768
+ oLocObject.EffectiveMax = 32767
+ oLocObject.EffectiveMin = -32768
Case com.sun.star.sdbc.DataType.TINYINT
- oLocObject.ValueMax = 127
- oLocObject.ValueMin = -128
+ oLocObject.EffectiveMax = 127
+ oLocObject.EffectiveMin = -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