diff options
author | Behrend Cornelius <bc@openoffice.org> | 2002-10-25 15:45:52 +0000 |
---|---|---|
committer | Behrend Cornelius <bc@openoffice.org> | 2002-10-25 15:45:52 +0000 |
commit | dd38ed5afa3cd800ea928117103fe3f736e296e5 (patch) | |
tree | bb720418734daeff9c8d9e57bf0e637ab2a9586d /wizards/source | |
parent | 71b8621b739c12804e44f580155f78881447b0ba (diff) |
#104285# Maxtextlen now adapted to datasource configuration
Diffstat (limited to 'wizards/source')
-rw-r--r-- | wizards/source/formwizard/tools.xba | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/wizards/source/formwizard/tools.xba b/wizards/source/formwizard/tools.xba index 4932d6fda05d..7d457fb4aa79 100644 --- a/wizards/source/formwizard/tools.xba +++ b/wizards/source/formwizard/tools.xba @@ -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 |