From 7113db27f07ca03a468c94f1163a7aacd1e051e3 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 19 Jun 2014 14:57:48 +0200 Subject: GetFileTimeValue can produce a "null" DateTime Change-Id: I96bf1aa2d889c4d0925d073d1d7b4be47c23b3ac --- sfx2/source/doc/docinf.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sfx2/source/doc/docinf.cxx') diff --git a/sfx2/source/doc/docinf.cxx b/sfx2/source/doc/docinf.cxx index c540545a305b..5e494372ed85 100644 --- a/sfx2/source/doc/docinf.cxx +++ b/sfx2/source/doc/docinf.cxx @@ -108,7 +108,11 @@ sal_uInt32 SFX2_DLLPUBLIC LoadOlePropertySet( i_xDocProps->setEditingCycles( nRevision ); } - if( xGlobSect->GetFileTimeValue( aDateTime, PROPID_EDITTIME ) ) + if( xGlobSect->GetFileTimeValue( aDateTime, PROPID_EDITTIME ) + && !(aDateTime.NanoSeconds == 0 && aDateTime.Seconds == 0 + && aDateTime.Minutes == 0 && aDateTime.Hours == 0 + && aDateTime.Day == 0 && aDateTime.Month == 0 + && aDateTime.Year == 0) ) { // subtract offset 1601-01-01 aDateTime.Year -= 1601; -- cgit