Kaydet (Commit) 4fa553e4 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

fdo#62088: Fix regression introduced by the DateTime incompatible change.

It is not good to mess with the stream operators, more so when the size of the
data changes ;-)

Change-Id: Id02b83224496a28575f4e12196892de198793983
üst f5752e98
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <ucbhelper/content.hxx> #include <ucbhelper/content.hxx>
#include <rtl/ref.hxx> #include <rtl/ref.hxx>
#include <salhelper/simplereferenceobject.hxx> #include <salhelper/simplereferenceobject.hxx>
#include <tools/time.hxx>
#include <tools/urlobj.hxx> #include <tools/urlobj.hxx>
#include <tools/debug.hxx> #include <tools/debug.hxx>
#include <unotools/pathoptions.hxx> #include <unotools/pathoptions.hxx>
...@@ -57,7 +58,9 @@ namespace svt ...@@ -57,7 +58,9 @@ namespace svt
//--------------------------------------------------------------------- //---------------------------------------------------------------------
SvStream& operator << ( SvStream& _rStorage, const util::DateTime& _rDate ) SvStream& operator << ( SvStream& _rStorage, const util::DateTime& _rDate )
{ {
_rStorage << _rDate.NanoSeconds; sal_uInt16 hundredthSeconds = static_cast< sal_uInt16 >( _rDate.NanoSeconds / Time::nanoPerCenti );
_rStorage << hundredthSeconds;
_rStorage << _rDate.Seconds; _rStorage << _rDate.Seconds;
_rStorage << _rDate.Minutes; _rStorage << _rDate.Minutes;
_rStorage << _rDate.Hours; _rStorage << _rDate.Hours;
...@@ -71,7 +74,10 @@ namespace svt ...@@ -71,7 +74,10 @@ namespace svt
//--------------------------------------------------------------------- //---------------------------------------------------------------------
SvStream& operator >> ( SvStream& _rStorage, util::DateTime& _rDate ) SvStream& operator >> ( SvStream& _rStorage, util::DateTime& _rDate )
{ {
_rStorage >> _rDate.NanoSeconds; sal_uInt16 hundredthSeconds;
_rStorage >> hundredthSeconds;
_rDate.NanoSeconds = static_cast< sal_uInt32 >( hundredthSeconds ) * Time::nanoPerCenti;
_rStorage >> _rDate.Seconds; _rStorage >> _rDate.Seconds;
_rStorage >> _rDate.Minutes; _rStorage >> _rDate.Minutes;
_rStorage >> _rDate.Hours; _rStorage >> _rDate.Hours;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment