diff options
Diffstat (limited to 'dbaccess/source/ui/tabledesign/FieldDescriptions.cxx')
-rw-r--r-- | dbaccess/source/ui/tabledesign/FieldDescriptions.cxx | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx index ba04bfa22cb0..4a4a499380a9 100644 --- a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx +++ b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx @@ -18,7 +18,7 @@ */ #include <FieldDescriptions.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> #include <strings.hxx> #include <com/sun/star/sdbc/ColumnValue.hpp> #include <comphelper/types.hxx> @@ -38,8 +38,7 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::util; OFieldDescription::OFieldDescription() - :m_pType() - ,m_nType(DataType::VARCHAR) + :m_nType(DataType::VARCHAR) ,m_nPrecision(0) ,m_nScale(0) ,m_nIsNullable(ColumnValue::NULLABLE) @@ -81,8 +80,7 @@ OFieldDescription::~OFieldDescription() } OFieldDescription::OFieldDescription(const Reference< XPropertySet >& xAffectedCol,bool _bUseAsDest) - :m_pType() - ,m_nType(DataType::VARCHAR) + :m_nType(DataType::VARCHAR) ,m_nPrecision(0) ,m_nScale(0) ,m_nIsNullable(ColumnValue::NULLABLE) @@ -189,7 +187,10 @@ void OFieldDescription::FillFromTypeInfo(const TOTypeInfoSP& _pType,bool _bForce SetPrecision(std::min<sal_Int32>(nPrec,_pType->nPrecision)); } break; + case DataType::TIME: + case DataType::TIME_WITH_TIMEZONE: case DataType::TIMESTAMP: + case DataType::TIMESTAMP_WITH_TIMEZONE: if ( bForce && _pType->nMaximumScale) { SetScale(std::min<sal_Int32>(GetScale() ? GetScale() : DEFAULT_NUMERIC_SCALE,_pType->nMaximumScale)); @@ -237,7 +238,7 @@ void OFieldDescription::SetName(const OUString& _rName) try { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_NAME) ) - m_xDest->setPropertyValue(PROPERTY_NAME,makeAny(_rName)); + m_xDest->setPropertyValue(PROPERTY_NAME,Any(_rName)); else m_sName = _rName; } @@ -252,7 +253,7 @@ void OFieldDescription::SetHelpText(const OUString& _sHelpText) try { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_HELPTEXT) ) - m_xDest->setPropertyValue(PROPERTY_HELPTEXT,makeAny(_sHelpText)); + m_xDest->setPropertyValue(PROPERTY_HELPTEXT,Any(_sHelpText)); else m_sHelpText = _sHelpText; } @@ -267,7 +268,7 @@ void OFieldDescription::SetDescription(const OUString& _rDescription) try { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_DESCRIPTION) ) - m_xDest->setPropertyValue(PROPERTY_DESCRIPTION,makeAny(_rDescription)); + m_xDest->setPropertyValue(PROPERTY_DESCRIPTION,Any(_rDescription)); else m_sDescription = _rDescription; } @@ -310,7 +311,7 @@ void OFieldDescription::SetAutoIncrementValue(const OUString& _sAutoIncValue) try { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_AUTOINCREMENTCREATION) ) - m_xDest->setPropertyValue(PROPERTY_AUTOINCREMENTCREATION,makeAny(_sAutoIncValue)); + m_xDest->setPropertyValue(PROPERTY_AUTOINCREMENTCREATION,Any(_sAutoIncValue)); else m_sAutoIncrementValue = _sAutoIncValue; } @@ -329,7 +330,7 @@ void OFieldDescription::SetType(const TOTypeInfoSP& _pType) try { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_TYPE) ) - m_xDest->setPropertyValue(PROPERTY_TYPE,makeAny(m_pType->nType)); + m_xDest->setPropertyValue(PROPERTY_TYPE,Any(m_pType->nType)); else m_nType = m_pType->nType; } @@ -344,7 +345,7 @@ void OFieldDescription::SetTypeValue(sal_Int32 _nType) try { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_TYPE) ) - m_xDest->setPropertyValue(PROPERTY_TYPE,makeAny(_nType)); + m_xDest->setPropertyValue(PROPERTY_TYPE,Any(_nType)); else { m_nType = _nType; @@ -362,7 +363,7 @@ void OFieldDescription::SetPrecision(sal_Int32 _rPrecision) try { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_PRECISION) ) - m_xDest->setPropertyValue(PROPERTY_PRECISION,makeAny(_rPrecision)); + m_xDest->setPropertyValue(PROPERTY_PRECISION,Any(_rPrecision)); else m_nPrecision = _rPrecision; } @@ -377,7 +378,7 @@ void OFieldDescription::SetScale(sal_Int32 _rScale) try { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_SCALE) ) - m_xDest->setPropertyValue(PROPERTY_SCALE,makeAny(_rScale)); + m_xDest->setPropertyValue(PROPERTY_SCALE,Any(_rScale)); else m_nScale = _rScale; } @@ -392,7 +393,7 @@ void OFieldDescription::SetIsNullable(sal_Int32 _rIsNullable) try { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_ISNULLABLE) ) - m_xDest->setPropertyValue(PROPERTY_ISNULLABLE,makeAny(_rIsNullable)); + m_xDest->setPropertyValue(PROPERTY_ISNULLABLE,Any(_rIsNullable)); else m_nIsNullable = _rIsNullable; } @@ -407,7 +408,7 @@ void OFieldDescription::SetFormatKey(sal_Int32 _rFormatKey) try { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_FORMATKEY) ) - m_xDest->setPropertyValue(PROPERTY_FORMATKEY,makeAny(_rFormatKey)); + m_xDest->setPropertyValue(PROPERTY_FORMATKEY,Any(_rFormatKey)); else m_nFormatKey = _rFormatKey; } @@ -422,7 +423,7 @@ void OFieldDescription::SetHorJustify(const SvxCellHorJustify& _rHorJustify) try { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_ALIGN) ) - m_xDest->setPropertyValue(PROPERTY_ALIGN,makeAny( dbaui::mapTextAllign(_rHorJustify))); + m_xDest->setPropertyValue(PROPERTY_ALIGN,Any( dbaui::mapTextAlign(_rHorJustify))); else m_eHorJustify = _rHorJustify; } @@ -437,7 +438,7 @@ void OFieldDescription::SetAutoIncrement(bool _bAuto) try { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_ISAUTOINCREMENT) ) - m_xDest->setPropertyValue(PROPERTY_ISAUTOINCREMENT,makeAny(_bAuto)); + m_xDest->setPropertyValue(PROPERTY_ISAUTOINCREMENT,Any(_bAuto)); else m_bIsAutoIncrement = _bAuto; } @@ -604,7 +605,7 @@ void OFieldDescription::SetTypeName(const OUString& _sTypeName) try { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_TYPENAME) ) - m_xDest->setPropertyValue(PROPERTY_TYPENAME,makeAny(_sTypeName)); + m_xDest->setPropertyValue(PROPERTY_TYPENAME,Any(_sTypeName)); else m_sTypeName = _sTypeName; } @@ -622,11 +623,11 @@ void OFieldDescription::copyColumnSettingsTo(const Reference< XPropertySet >& _r Reference<XPropertySetInfo> xInfo = _rxColumn->getPropertySetInfo(); if ( GetFormatKey() != NumberFormat::ALL && xInfo->hasPropertyByName(PROPERTY_FORMATKEY) ) - _rxColumn->setPropertyValue(PROPERTY_FORMATKEY,makeAny(GetFormatKey())); + _rxColumn->setPropertyValue(PROPERTY_FORMATKEY,Any(GetFormatKey())); if ( GetHorJustify() != SvxCellHorJustify::Standard && xInfo->hasPropertyByName(PROPERTY_ALIGN) ) - _rxColumn->setPropertyValue(PROPERTY_ALIGN,makeAny(dbaui::mapTextAllign(GetHorJustify()))); + _rxColumn->setPropertyValue(PROPERTY_ALIGN,Any(dbaui::mapTextAlign(GetHorJustify()))); if ( !GetHelpText().isEmpty() && xInfo->hasPropertyByName(PROPERTY_HELPTEXT) ) - _rxColumn->setPropertyValue(PROPERTY_HELPTEXT,makeAny(GetHelpText())); + _rxColumn->setPropertyValue(PROPERTY_HELPTEXT,Any(GetHelpText())); if ( GetControlDefault().hasValue() && xInfo->hasPropertyByName(PROPERTY_CONTROLDEFAULT) ) _rxColumn->setPropertyValue(PROPERTY_CONTROLDEFAULT,GetControlDefault()); @@ -635,7 +636,7 @@ void OFieldDescription::copyColumnSettingsTo(const Reference< XPropertySet >& _r if(xInfo->hasPropertyByName(PROPERTY_WIDTH)) _rxColumn->setPropertyValue(PROPERTY_WIDTH,m_aWidth); if(xInfo->hasPropertyByName(PROPERTY_HIDDEN)) - _rxColumn->setPropertyValue(PROPERTY_HIDDEN,makeAny(m_bHidden)); + _rxColumn->setPropertyValue(PROPERTY_HIDDEN,Any(m_bHidden)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |