summaryrefslogtreecommitdiff
path: root/forms/source/component/Time.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'forms/source/component/Time.cxx')
-rw-r--r--forms/source/component/Time.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/forms/source/component/Time.cxx b/forms/source/component/Time.cxx
index 3a6dbfca3b32..8ab3e9a10390 100644
--- a/forms/source/component/Time.cxx
+++ b/forms/source/component/Time.cxx
@@ -196,18 +196,18 @@ void OTimeModel::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&)
- {
- }
}
}