From 9830fd36dbdb72c79703b0c61efc027fba793c5a Mon Sep 17 00:00:00 2001 From: Lionel Elie Mamane Date: Sun, 17 Mar 2013 08:36:26 +0100 Subject: date/time IDL datatypes incompatible change - nanosecond precision - signed (allowed negative) year Also: assorted improvements / bugfixes in date/time handling code. Some factorisation of copy/pasted code. Change-Id: I761a1b0b8731c82f19a0c37acbcf43d3c06d6cd6 --- editeng/source/items/flditem.cxx | 2 +- editeng/source/uno/unofield.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'editeng/source') diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx index 0f4e2aeab093..bc67903341eb 100644 --- a/editeng/source/items/flditem.cxx +++ b/editeng/source/items/flditem.cxx @@ -85,7 +85,7 @@ SvxFieldData* SvxFieldData::Create(const uno::Reference& xTe if (nFieldType != text::textfield::Type::TIME && nFieldType != text::textfield::Type::DATE) { util::DateTime aDateTime = xPropSet->getPropertyValue(UNO_TC_PROP_DATE_TIME).get(); - Time aTime(aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.HundredthSeconds); + Time aTime(aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.NanoSeconds); sal_Bool bIsFixed = false; xPropSet->getPropertyValue(UNO_TC_PROP_IS_FIXED) >>= bIsFixed; diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx index 9aa5b0b2b334..86a039b89f47 100644 --- a/editeng/source/uno/unofield.cxx +++ b/editeng/source/uno/unofield.cxx @@ -208,7 +208,7 @@ static util::DateTime getTime( long nTime ) Time aTempTime( nTime ); - aTime.HundredthSeconds = aTempTime.Get100Sec(); + aTime.NanoSeconds = aTempTime.GetNanoSec(); aTime.Seconds = aTempTime.GetSec(); aTime.Minutes = aTempTime.GetMin(); aTime.Hours = aTempTime.GetHour(); @@ -218,7 +218,7 @@ static util::DateTime getTime( long nTime ) inline Time setTime( util::DateTime& rDate ) { - return Time( rDate.Hours, rDate.Minutes, rDate.Seconds, rDate.HundredthSeconds ); + return Time( rDate.Hours, rDate.Minutes, rDate.Seconds, rDate.NanoSeconds ); } // ==================================================================== -- cgit