From dd38ed5afa3cd800ea928117103fe3f736e296e5 Mon Sep 17 00:00:00 2001 From: Behrend Cornelius Date: Fri, 25 Oct 2002 15:45:52 +0000 Subject: #104285# Maxtextlen now adapted to datasource configuration --- wizards/source/formwizard/tools.xba | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'wizards') 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 -- cgit v1.2.3