Access2Base - (Control.xba) FIX Get DefaultValue for DateField controls

The DefaultDate was read correctly but not returned to the calling program

Change-Id: Ie15a48a6366c1575f4914a2b60c836890fe53a43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109921
Tested-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
This commit is contained in:
Jean-Pierre Ledure
2021-01-26 11:45:48 +01:00
parent 807a63d660
commit 0bf25edae9
+2 -2
View File
@@ -1474,10 +1474,10 @@ Dim oControlEvents As Object, sEventName As String
Select Case VarType(ControlModel.DefaultDate)
Case vbLong &apos; AOO and LO &lt;= 4.1
vDefaultValue = ControlModel.DefaultDate
vGet = DateSerial(Left(vDefaultValue, 4), Mid(vDefaultValue, 5, 2), Right(vDefaultValue, 2))
_PropertyGet = DateSerial(Left(vDefaultValue, 4), Mid(vDefaultValue, 5, 2), Right(vDefaultValue, 2))
Case vbObject &apos; LO &gt;= 4.2 com.sun.star.Util.Date
Set oDefaultValue = ControlModel.DefaultDate
vGet = DateSerial(oDefaultValue.Year,oDefaultValue.Month, oDefaultValue.Day)
_PropertyGet = DateSerial(oDefaultValue.Year,oDefaultValue.Month, oDefaultValue.Day)
Case vbEmpty
End Select
End If