#104285# Maxtextlen now adapted to datasource configuration

This commit is contained in:
Behrend Cornelius 2002-10-25 15:45:52 +00:00
parent 71b8621b73
commit dd38ed5afa

View file

@ -83,7 +83,11 @@ Dim NullValue
GetPeerSize() = oPeer.PreferredSize()
oControl.Time = NullValue
Else
oControl.Text = Mid(SBSIZETEXT,1,oControl.MaxTextLen)
If oControl.MaxTextLen > SBMAXTEXTSIZE Then
oControl.Text = Mid(SBSIZETEXT,1, SBMAXTEXTSIZE)
Else
oControl.Text = Mid(SBSIZETEXT,1, oControl.MaxTextLen)
End If
GetPeerSize() = oPeer.PreferredSize()
oControl.Text = ""
End If
@ -191,7 +195,7 @@ Function SetNumerics(ByVal oLocObject as Object, iLocFieldType as Integer) as Ob
'Todo: How do you set currencies?
End If
ElseIf CurControlType = cTextBox Then 'com.sun.star.sdbc.DataType.CHAR, com.sun.star.sdbc.DataType.VARCHAR, com.sun.star.sdbc.DataType.LONGVARCHAR
If oLocObject.MaxTextLen = 0 Or oLocObject.MaxTextLen > SBMAXTEXTSIZE Then
If CurFieldLength = 0 Then 'Or oLocObject.MaxTextLen > SBMAXTEXTSIZE
oLocObject.MaxTextLen = SBMAXTEXTSIZE
CurFieldLength = SBMAXTEXTSIZE
Else