summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/tabledesign/FieldDescriptions.cxx')
-rw-r--r--dbaccess/source/ui/tabledesign/FieldDescriptions.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
index 699a2db8404b..6e90ebed7e88 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
@@ -239,8 +239,19 @@ void OFieldDescription::FillFromTypeInfo(const TOTypeInfoSP& _pType,sal_Bool _bF
if ( bForce )
{
sal_Int32 nPrec = DEFAULT_OTHER_PRECSION;
- if ( GetPrecision() )
- nPrec = GetPrecision();
+ switch ( _pType->nType )
+ {
+ case DataType::BIT:
+ case DataType::BLOB:
+ case DataType::CLOB:
+ nPrec = _pType->nPrecision;
+ break;
+ default:
+ if ( GetPrecision() )
+ nPrec = GetPrecision();
+ break;
+ }
+
if ( _pType->nPrecision )
SetPrecision(::std::min<sal_Int32>(nPrec ? nPrec : DEFAULT_NUMERIC_PRECSION,_pType->nPrecision));
if ( _pType->nMaximumScale )