diff options
author | Eike Rathke <erack@redhat.com> | 2011-11-30 02:05:22 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2011-11-30 02:05:22 +0100 |
commit | dca69d5bb2d0e542de26624dd9f71fb87e1533f2 (patch) | |
tree | d3d6b62417885946113b6f13e10ca0f4fc45613c /sfx2 | |
parent | cb937da55c3ab3d238b97d6e0e709ea2a04d2c26 (diff) |
renamed Date::IsValid() to IsValidAndGregorian() to prevent misassumptions
Once smaller than 1582-10-15 decrementing a Date will not produce a valid date.
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/oleprops.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index ab3cbfc3c5e6..097eba93135e 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -2969,7 +2969,7 @@ void SfxMedium::SetExpired_Impl( const DateTime& rDateTime ) sal_Bool SfxMedium::IsExpired() const { - return pImp->aExpireTime.IsValid() && pImp->aExpireTime < DateTime(); + return pImp->aExpireTime.IsValidAndGregorian() && pImp->aExpireTime < DateTime(); } //---------------------------------------------------------------- diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx index b7d56b0f1061..f42ed879124a 100644 --- a/sfx2/source/doc/oleprops.cxx +++ b/sfx2/source/doc/oleprops.cxx @@ -634,7 +634,7 @@ void SfxOleFileTimeProperty::ImplSave( SvStream& rStrm ) // invalid time stamp is not converted to UTC // heuristic to detect editing durations (which we assume to be < 1 year): // check only the year, not the entire date - if( aDateTimeUtc.IsValid() + if( aDateTimeUtc.IsValidAndGregorian() && aDateTimeUtc.GetYear() != TIMESTAMP_INVALID_DATETIME.GetYear() ) { aDateTimeUtc.ConvertToUTC(); } |