summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2003-04-28 14:49:40 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2003-04-28 14:49:40 +0000
commit465cf674e8118922029e7e117fdae91e887bcee0 (patch)
treec0b5f1e6af3a986b7567226271b73e1a6f361e4b
parent4c406623b2f241b046f0f274eb98b13a378d3bfe (diff)
INTEGRATION: CWS apps61beta2 (1.11.2); FILE MERGED
2003/04/01 10:56:20 oj 1.11.2.1: #108512# correct precision handling
-rw-r--r--dbaccess/source/ui/tabledesign/FieldDescriptions.cxx13
1 files 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<sal_Int32>(nPrec ? nPrec : DEFAULT_NUMERIC_PRECSION,_pType->nPrecision));
+ if ( _pType->nMaximumScale )
SetScale(::std::min<sal_Int32>(GetScale() ? GetScale() : DEFAULT_NUMERIC_SCALE,_pType->nMaximumScale));
- }
- else if ( _pType->nPrecision )
- SetPrecision(::std::min<sal_Int32>(nPrec,_pType->nPrecision));
}
}
if ( !_pType->aCreateParams.getLength() )