From 465cf674e8118922029e7e117fdae91e887bcee0 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Mon, 28 Apr 2003 14:49:40 +0000 Subject: INTEGRATION: CWS apps61beta2 (1.11.2); FILE MERGED 2003/04/01 10:56:20 oj 1.11.2.1: #108512# correct precision handling --- dbaccess/source/ui/tabledesign/FieldDescriptions.cxx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx index 971d2a5e39c8..65ee24ef518f 100644 --- a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx +++ b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx @@ -2,9 +2,9 @@ * * $RCSfile: FieldDescriptions.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: hr $ $Date: 2003-03-19 17:53:02 $ + * last change: $Author: hr $ $Date: 2003-04-28 15:49:40 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -256,13 +256,10 @@ void OFieldDescription::FillFromTypeInfo(const TOTypeInfoSP& _pType,sal_Bool _bF sal_Int32 nPrec = DEFAULT_OTHER_PRECSION; if ( GetPrecision() ) nPrec = GetPrecision(); - if ( _pType->nPrecision && _pType->nMaximumScale ) - { - SetPrecision(nPrec ? nPrec : DEFAULT_NUMERIC_PRECSION); + if ( _pType->nPrecision ) + SetPrecision(::std::min(nPrec ? nPrec : DEFAULT_NUMERIC_PRECSION,_pType->nPrecision)); + if ( _pType->nMaximumScale ) SetScale(::std::min(GetScale() ? GetScale() : DEFAULT_NUMERIC_SCALE,_pType->nMaximumScale)); - } - else if ( _pType->nPrecision ) - SetPrecision(::std::min(nPrec,_pType->nPrecision)); } } if ( !_pType->aCreateParams.getLength() ) -- cgit v1.2.3