summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-08-09 16:46:25 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-08-09 16:46:42 +0100
commitc6043980bbc36d58e1ce63b7a97c66774cd6de06 (patch)
tree749ab0f3dc0205ebaadcc2afb3d925c6d2eef215
parent46fb06b64d90becdf3090231061032e26c7d4dcb (diff)
annoyingly MSWord2010 will apparently deem a doc using VT_DATE as invalid
-rw-r--r--sfx2/source/doc/oleprops.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index 3168c12db344..08fe42db1b07 100644
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -927,10 +927,15 @@ void SfxOleSection::SetFileTimeValue( sal_Int32 nPropId, const util::DateTime& r
void SfxOleSection::SetDateValue( sal_Int32 nPropId, const util::Date& rValue )
{
+ //Annoyingly MS2010 considers VT_DATE apparently as an invalid possibility, so here we use VT_FILETIME
+ //instead :-(
if ( rValue.Year == 0 || rValue.Month == 0 || rValue.Day == 0 )
- SetProperty( SfxOlePropertyRef( new SfxOleDateProperty( nPropId, TIMESTAMP_INVALID_UTILDATE ) ) );
+ SetProperty( SfxOlePropertyRef( new SfxOleFileTimeProperty( nPropId, TIMESTAMP_INVALID_UTILDATETIME ) ) );
else
- SetProperty( SfxOlePropertyRef( new SfxOleDateProperty( nPropId, rValue ) ) );
+ {
+ const util::DateTime aValue(0, 0, 0, 0, rValue.Day, rValue.Month, rValue.Year );
+ SetProperty( SfxOlePropertyRef( new SfxOleFileTimeProperty( nPropId, aValue ) ) );
+ }
}
void SfxOleSection::SetThumbnailValue( sal_Int32 nPropId,