summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2013-03-17 08:36:26 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2013-04-18 21:34:46 +0200
commit9830fd36dbdb72c79703b0c61efc027fba793c5a (patch)
tree2e9d698e6ca109dc6627adb5c84aa2b635bcfe92 /svtools
parent5aaaf0694b6e3213685563fc3bc90d19b10f5c75 (diff)
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
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/DocumentInfoPreview.cxx2
-rw-r--r--svtools/source/contnr/contentenumeration.cxx2
-rw-r--r--svtools/source/misc/templatefoldercache.cxx8
-rw-r--r--svtools/source/svhtml/parhtml.cxx2
-rw-r--r--svtools/source/table/cellvalueconversion.cxx4
5 files changed, 9 insertions, 9 deletions
diff --git a/svtools/source/contnr/DocumentInfoPreview.cxx b/svtools/source/contnr/DocumentInfoPreview.cxx
index 3380c14a43e5..2a546077986b 100644
--- a/svtools/source/contnr/DocumentInfoPreview.cxx
+++ b/svtools/source/contnr/DocumentInfoPreview.cxx
@@ -150,7 +150,7 @@ void ODocumentInfoPreview::insertDateTime(
DateTime aToolsDT(
Date(value.Day, value.Month, value.Year),
Time(
- value.Hours, value.Minutes, value.Seconds, value.HundredthSeconds));
+ value.Hours, value.Minutes, value.Seconds, value.NanoSeconds));
if (aToolsDT.IsValidAndGregorian()) {
const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
OUStringBuffer buf(rLocaleWrapper.getDate(aToolsDT));
diff --git a/svtools/source/contnr/contentenumeration.cxx b/svtools/source/contnr/contentenumeration.cxx
index 7e62273bf460..decda28f110d 100644
--- a/svtools/source/contnr/contentenumeration.cxx
+++ b/svtools/source/contnr/contentenumeration.cxx
@@ -57,7 +57,7 @@ namespace svt
#define CONVERT_DATETIME( aUnoDT, aToolsDT ) \
aToolsDT = ::DateTime( Date( aUnoDT.Day, aUnoDT.Month, aUnoDT.Year ), \
- Time( aUnoDT.Hours, aUnoDT.Minutes, aUnoDT.Seconds, aUnoDT.HundredthSeconds ) );
+ Time( aUnoDT.Hours, aUnoDT.Minutes, aUnoDT.Seconds, aUnoDT.NanoSeconds ) );
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx
index d8103cfcd050..aa2bade43ffd 100644
--- a/svtools/source/misc/templatefoldercache.cxx
+++ b/svtools/source/misc/templatefoldercache.cxx
@@ -57,7 +57,7 @@ namespace svt
//---------------------------------------------------------------------
SvStream& operator << ( SvStream& _rStorage, const util::DateTime& _rDate )
{
- _rStorage << _rDate.HundredthSeconds;
+ _rStorage << _rDate.NanoSeconds;
_rStorage << _rDate.Seconds;
_rStorage << _rDate.Minutes;
_rStorage << _rDate.Hours;
@@ -71,7 +71,7 @@ namespace svt
//---------------------------------------------------------------------
SvStream& operator >> ( SvStream& _rStorage, util::DateTime& _rDate )
{
- _rStorage >> _rDate.HundredthSeconds;
+ _rStorage >> _rDate.NanoSeconds;
_rStorage >> _rDate.Seconds;
_rStorage >> _rDate.Minutes;
_rStorage >> _rDate.Hours;
@@ -85,7 +85,7 @@ namespace svt
//---------------------------------------------------------------------
sal_Bool operator == ( const util::DateTime& _rLHS, const util::DateTime& _rRHS )
{
- return _rLHS.HundredthSeconds == _rRHS.HundredthSeconds
+ return _rLHS.NanoSeconds == _rRHS.NanoSeconds
&& _rLHS.Seconds == _rRHS.Seconds
&& _rLHS.Minutes == _rRHS.Minutes
&& _rLHS.Hours == _rRHS.Hours
@@ -123,7 +123,7 @@ namespace svt
private:
inline void implResetDate( )
{
- m_aLastModified.HundredthSeconds = m_aLastModified.Seconds = m_aLastModified.Minutes = m_aLastModified.Hours = 0;
+ m_aLastModified.NanoSeconds = m_aLastModified.Seconds = m_aLastModified.Minutes = m_aLastModified.Hours = 0;
m_aLastModified.Day = m_aLastModified.Month = m_aLastModified.Year = 0;
}
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index dd1b60d9658b..d8d5080fcf92 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -2170,7 +2170,7 @@ bool HTMLParser::ParseMetaOptionsImpl(
Date aDate( (sal_uLong)aContent.GetToken(0).ToInt32() );
Time aTime( (sal_uLong)aContent.GetToken(1).ToInt32() );
DateTime aDateTime( aDate, aTime );
- ::util::DateTime uDT(aDateTime.Get100Sec(),
+ ::util::DateTime uDT(aDateTime.GetNanoSec(),
aDateTime.GetSec(), aDateTime.GetMin(),
aDateTime.GetHour(), aDateTime.GetDay(),
aDateTime.GetMonth(), aDateTime.GetYear());
diff --git a/svtools/source/table/cellvalueconversion.cxx b/svtools/source/table/cellvalueconversion.cxx
index 0f26ab2811fb..d753b5293090 100644
--- a/svtools/source/table/cellvalueconversion.cxx
+++ b/svtools/source/table/cellvalueconversion.cxx
@@ -239,7 +239,7 @@ namespace svt
// time part
returnValue += lcl_convertTimeToDays(
- aDateTimeValue.Hours, aDateTimeValue.Minutes, aDateTimeValue.Seconds, aDateTimeValue.HundredthSeconds );
+ aDateTimeValue.Hours, aDateTimeValue.Minutes, aDateTimeValue.Seconds, aDateTimeValue.NanoSeconds );
// done
return returnValue;
@@ -300,7 +300,7 @@ namespace svt
// convert
returnValue += lcl_convertTimeToDays(
- aTimeValue.Hours, aTimeValue.Minutes, aTimeValue.Seconds, aTimeValue.HundredthSeconds );
+ aTimeValue.Hours, aTimeValue.Minutes, aTimeValue.Seconds, aTimeValue.NanoSeconds );
// done
return returnValue;