summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2013-04-25 13:56:00 +0200
committerJan Holesovsky <kendy@suse.cz>2013-04-25 14:00:07 +0200
commit4fa553e4071a0ba4981a690429903c4e68607864 (patch)
treec675e29f75279d9cf18cca17d70e6017b4c4b048 /svtools
parentf5752e9846453e6727b521994fd061f3fec884ff (diff)
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
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/misc/templatefoldercache.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx
index aa2bade43ffd..c0237203d63c 100644
--- a/svtools/source/misc/templatefoldercache.cxx
+++ b/svtools/source/misc/templatefoldercache.cxx
@@ -29,6 +29,7 @@
#include <ucbhelper/content.hxx>
#include <rtl/ref.hxx>
#include <salhelper/simplereferenceobject.hxx>
+#include <tools/time.hxx>
#include <tools/urlobj.hxx>
#include <tools/debug.hxx>
#include <unotools/pathoptions.hxx>
@@ -57,7 +58,9 @@ namespace svt
//---------------------------------------------------------------------
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.Minutes;
_rStorage << _rDate.Hours;
@@ -71,7 +74,10 @@ namespace svt
//---------------------------------------------------------------------
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.Minutes;
_rStorage >> _rDate.Hours;