[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - basic/source oox/source
Lionel Elie Mamane
lionel at mamane.lu
Fri Jul 5 03:42:01 PDT 2013
basic/source/runtime/methods.cxx | 2 +-
oox/source/docprop/docprophandler.cxx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit f8734b5fe4ca94ba0928b82b21faa0b54f363772
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Fri Jul 5 09:53:57 2013 +0200
fixup nanosecond precision
oox/source/docprop/docprophandler.cxx:
DateTime used to take centiseconds, now it is nanoseconds.
basic/source/runtime/methods.cxx:
This was broken before...
Time used to take centiseconds, so the nanoseconds should have been
*divided* by 10^7 for conversion.
Now Time takes straight nanoseconds, so no conversion necessary.
Change-Id: Ia33b811d56fe5ad5e7e844b3e1c1c25ece0b5396
Reviewed-on: https://gerrit.libreoffice.org/4734
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 2fd3eb5..4a94763 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -3094,7 +3094,7 @@ RTLFUNC(FileDateTime)
oslDateTime aDT;
osl_getDateTimeFromTimeValue( &aTimeVal, &aDT );
- aTime = Time( aDT.Hours, aDT.Minutes, aDT.Seconds, 10000000*aDT.NanoSeconds );
+ aTime = Time( aDT.Hours, aDT.Minutes, aDT.Seconds, aDT.NanoSeconds );
aDate = Date( aDT.Day, aDT.Month, aDT.Year );
}
diff --git a/oox/source/docprop/docprophandler.cxx b/oox/source/docprop/docprophandler.cxx
index 08cfda0..974e5ab 100644
--- a/oox/source/docprop/docprophandler.cxx
+++ b/oox/source/docprop/docprophandler.cxx
@@ -153,7 +153,7 @@ util::DateTime OOXMLDocPropHandler::GetDateTimeFromW3CDTF( const OUString& aChar
}
}
- return util::DateTime( (sal_uInt16)( aOslDTime.NanoSeconds / 1e7 ), aOslDTime.Seconds, aOslDTime.Minutes, aOslDTime.Hours, aOslDTime.Day, aOslDTime.Month, aOslDTime.Year );
+ return util::DateTime( aOslDTime.NanoSeconds, aOslDTime.Seconds, aOslDTime.Minutes, aOslDTime.Hours, aOslDTime.Day, aOslDTime.Month, aOslDTime.Year );
}
// ------------------------------------------------
More information about the Libreoffice-commits
mailing list