summaryrefslogtreecommitdiff
path: root/forms/source/component/Date.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'forms/source/component/Date.cxx')
-rw-r--r--forms/source/component/Date.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx
index 495c95deb8cf..cca3e06821d7 100644
--- a/forms/source/component/Date.cxx
+++ b/forms/source/component/Date.cxx
@@ -204,18 +204,18 @@ void ODateModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm )
{
OBoundControlModel::onConnectedDbColumn( _rxForm );
Reference<XPropertySet> xField = getField();
- if (xField.is())
+ if (!xField.is())
+ return;
+
+ m_bDateTimeField = false;
+ try
+ {
+ sal_Int32 nFieldType = 0;
+ xField->getPropertyValue(PROPERTY_FIELDTYPE) >>= nFieldType;
+ m_bDateTimeField = (nFieldType == DataType::TIMESTAMP);
+ }
+ catch(const Exception&)
{
- m_bDateTimeField = false;
- try
- {
- sal_Int32 nFieldType = 0;
- xField->getPropertyValue(PROPERTY_FIELDTYPE) >>= nFieldType;
- m_bDateTimeField = (nFieldType == DataType::TIMESTAMP);
- }
- catch(const Exception&)
- {
- }
}
}