summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;