#104285# Maxtextlen now adapted to datasource configuration
This commit is contained in:
parent
71b8621b73
commit
dd38ed5afa
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue