[Libreoffice-commits] .: sfx2/source
Caolán McNamara
caolan at kemper.freedesktop.org
Tue Aug 9 08:47:08 PDT 2011
sfx2/source/doc/oleprops.cxx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit c6043980bbc36d58e1ce63b7a97c66774cd6de06
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Aug 9 16:46:25 2011 +0100
annoyingly MSWord2010 will apparently deem a doc using VT_DATE as invalid
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index 3168c12..08fe42d 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,
More information about the Libreoffice-commits
mailing list