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:
@@ -1474,10 +1474,10 @@ Dim oControlEvents As Object, sEventName As String
|
||||
Select Case VarType(ControlModel.DefaultDate)
|
||||
Case vbLong ' AOO and LO <= 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 ' LO >= 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
|
||||
|
||||
Reference in New Issue
Block a user