summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehrend Cornelius <bc@openoffice.org>2002-10-25 15:45:52 +0000
committerBehrend Cornelius <bc@openoffice.org>2002-10-25 15:45:52 +0000
commitdd38ed5afa3cd800ea928117103fe3f736e296e5 (patch)
treebb720418734daeff9c8d9e57bf0e637ab2a9586d
parent71b8621b739c12804e44f580155f78881447b0ba (diff)
#104285# Maxtextlen now adapted to datasource configuration
-rw-r--r--wizards/source/formwizard/tools.xba8
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 &gt; SBMAXTEXTSIZE Then
+ oControl.Text = Mid(SBSIZETEXT,1, SBMAXTEXTSIZE)
+ Else
+ oControl.Text = Mid(SBSIZETEXT,1, oControl.MaxTextLen)
+ End If
GetPeerSize() = oPeer.PreferredSize()
oControl.Text = &quot;&quot;
End If
@@ -191,7 +195,7 @@ Function SetNumerics(ByVal oLocObject as Object, iLocFieldType as Integer) as Ob
&apos;Todo: How do you set currencies?
End If
ElseIf CurControlType = cTextBox Then &apos;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 &gt; SBMAXTEXTSIZE Then
+ If CurFieldLength = 0 Then &apos;Or oLocObject.MaxTextLen &gt; SBMAXTEXTSIZE
oLocObject.MaxTextLen = SBMAXTEXTSIZE
CurFieldLength = SBMAXTEXTSIZE
Else