Use DateTime(css::util::DateTime&) ctor
Individual fragments set in the given order even raised SAL_WARN about non-existing year 0 ... Change-Id: Iadfc648423b9fc7ec1a9ebfbc05a1ea814078ac2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132742 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
This commit is contained in:
@@ -213,14 +213,7 @@ bool SwDateTimeField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
|
||||
util::DateTime aDateTimeValue;
|
||||
if(!(rVal >>= aDateTimeValue))
|
||||
return false;
|
||||
DateTime aDateTime( DateTime::EMPTY );
|
||||
aDateTime.SetNanoSec(aDateTimeValue.NanoSeconds);
|
||||
aDateTime.SetSec(aDateTimeValue.Seconds);
|
||||
aDateTime.SetMin(aDateTimeValue.Minutes);
|
||||
aDateTime.SetHour(aDateTimeValue.Hours);
|
||||
aDateTime.SetDay(aDateTimeValue.Day);
|
||||
aDateTime.SetMonth(aDateTimeValue.Month);
|
||||
aDateTime.SetYear(aDateTimeValue.Year);
|
||||
DateTime aDateTime(aDateTimeValue);
|
||||
SetDateTime(aDateTime);
|
||||
}
|
||||
break;
|
||||
|
Reference in New Issue
Block a user