mirror of
https://github.com/LibreOffice/core.git
synced 2025-08-15 20:47:46 +00:00
Simplify the condition
css::util::NumberFormat is a bitset; css::util::NumberFormat::DATE is 2, and css::util::NumberFormat::DATETIME is 6; so it doesn't make sense to check the latter after checking the former. Change-Id: I1fd968cae2678dc9244594faeb8f9164a714ef7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188090 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
@ -1319,8 +1319,7 @@ OUString OFieldDescControl::getControlDefault( const OFieldDescription* _pFieldD
|
||||
::comphelper::getNumberFormatProperty(xNumberFormatter,nFormatKey,u"Locale"_ustr) >>= aLocale;
|
||||
|
||||
sal_Int32 nNumberFormat = ::comphelper::getNumberFormatType(xNumberFormatter,nFormatKey);
|
||||
if( (nNumberFormat & css::util::NumberFormat::DATE) == css::util::NumberFormat::DATE
|
||||
|| (nNumberFormat & css::util::NumberFormat::DATETIME) == css::util::NumberFormat::DATETIME )
|
||||
if (nNumberFormat & css::util::NumberFormat::DATE)
|
||||
{
|
||||
nValue = DBTypeConversion::toNullDate(DBTypeConversion::getNULLDate(xNumberFormatter->getNumberFormatsSupplier()),nValue);
|
||||
}
|
||||
|
Reference in New Issue
Block a user