diff options
Diffstat (limited to 'dbaccess/source/ui/control')
-rw-r--r-- | dbaccess/source/ui/control/FieldDescControl.cxx | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index 4f22d829ff10..5322308e5c83 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -1085,9 +1085,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) m_bAdded = true; } - TOTypeInfoSP pFieldType; - if( pFieldDescr ) - pFieldType = pFieldDescr->getTypeInfo(); + TOTypeInfoSP pFieldType(pFieldDescr->getTypeInfo()); ActivateAggregate( tpColumnName ); ActivateAggregate( tpType ); @@ -1237,19 +1235,17 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) } m_pPreviousType = pFieldType; } - if(pFieldDescr) + + if (pFieldDescr->IsPrimaryKey()) { - if(pFieldDescr->IsPrimaryKey()) - { - DeactivateAggregate( tpRequired ); - } - else if ( !pAutoIncrement && pFieldType.get() ) - { - if ( pFieldType->bNullable ) - ActivateAggregate( tpRequired ); - else - DeactivateAggregate( tpRequired ); - } + DeactivateAggregate(tpRequired); + } + else if (!pAutoIncrement && pFieldType.get()) + { + if (pFieldType->bNullable) + ActivateAggregate(tpRequired); + else + DeactivateAggregate(tpRequired); } // Initialize Controls if( pAutoIncrement ) |