summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorBehrend Cornelius <bc@openoffice.org>2001-06-18 12:18:28 +0000
committerBehrend Cornelius <bc@openoffice.org>2001-06-18 12:18:28 +0000
commitaa1ad31f15769c121922028335979f570cdc434e (patch)
treeca32c2c0108d387a768e1c69007a9f7ea595f33f /wizards
parent56dfa18fd302c8920140c19d82ae89b686e499b0 (diff)
#87606# Numericfields by FormattedFields replaced
Diffstat (limited to 'wizards')
-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()) &gt; -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(&quot;com.sun.star.sdb.InteractionHandler&quot;)
oDataSource = oDBContext.GetByName(sDBName)
-&apos; 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
&apos;On Local Error Goto GlobalError
BasicLibraries.LoadLibrary(&quot;Tools&quot;)
BasicLibraries.LoadLibrary(&quot;WebWizard&quot;)
+&apos; Todo: Variable is initialized due to Bug#88329
+ CurArrangement = 0
bControlsareCreated = False
MaxIndex = -1
If Not InitResources(&quot;Formwizard&quot;,&quot;dbw&quot;) Then
@@ -97,7 +99,8 @@ Dim i as Integer
ImportStyles()
ToggleWindow(True)
oDialogModel.imgTheme.ImageURL = FormPath &amp; &quot;FormWizard_1.bmp&quot;
- DlgFormDB.Execute()
+&apos; 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(&quot;Writer 6.0&quot;)
oFileDialog.Initialize(ListAny())
oFileDialog.SetDisplayDirectory(WorkPath)
-&apos; Todo: Vorschlag für Namen: &quot;Form_DatasourceName.ContentName
+ oFileDialog.SetDefaultName(&quot;Form_&quot; &amp; sDBName &amp; &quot;.&quot; &amp; TableName
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
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) = &quot;com.sun.star.form.component.CheckBox&quot;
oModelService(cDateBox) = &quot;com.sun.star.form.component.DateField&quot;
oModelService(cTimeBox) = &quot;com.sun.star.form.component.TimeField&quot;
- oModelService(cNumericBox) = &quot;com.sun.star.form.component.NumericField&quot;
- oModelService(cCurrencyBox) = &quot;com.sun.star.form.component.CurrencyField&quot;
+ oModelService(cNumericBox) = &quot;com.sun.star.form.component.FormattedField&quot;
oModelService(cGridControl) = &quot;com.sun.star.form.component.GridControl&quot;
oModelService(cImageControl) = &quot;com.sun.star.form.component.DatabaseImageControl&quot;
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