summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorRavindra_Vidhate <ravindra.vidhate@synerzip.com>2015-04-22 17:15:10 +0530
committerCaolán McNamara <caolanm@redhat.com>2015-04-30 12:19:47 +0000
commitfa38941a10832130ea8c8b86fac2468e79689585 (patch)
tree832af5442ce134657a0a0d06787441787c0b087e /oox
parent00836605a441b8b1d548d8c32f63535f3240ac61 (diff)
tdf#38693: Document property TotalTime misinterpreted as seconds
Problem Description : The xlsx file has the extended document property <TotalTime>#n</TotalTime> in /docProps/app.xml LibreOffice appears to read this as a a total editing time of in second_ but according to ECMA-376 2nd edition: 22.2.2.27 TotalTime (Total Edit Time Metadata Element) Total time that a document has been edited. The default time unit is minutes. (ECMA-376 1st edition has the same statement in 7.2.2.27) XML difference: None After RT : None Solution : As LO uses the TotalTime in seconds, while importing the TotalTime, the TotalTime mentioned in the app.xml [which is in minutes] converted it to seconds. TODO: Writing a UT seems to be tricky for this change. Need to analyze and will raise the UT in separate CL. Change-Id: Icbe998b9881ac241a9147628573bab6ef63582c4 Reviewed-on: https://gerrit.libreoffice.org/15479 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/docprop/docprophandler.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/oox/source/docprop/docprophandler.cxx b/oox/source/docprop/docprophandler.cxx
index 4d04f50f86b7..1a5000b03906 100644
--- a/oox/source/docprop/docprophandler.cxx
+++ b/oox/source/docprop/docprophandler.cxx
@@ -480,7 +480,8 @@ void SAL_CALL OOXMLDocPropHandler::characters( const OUString& aChars )
case EXTPR_TOKEN( TotalTime ):
try
{
- m_xDocProp->setEditingDuration( aChars.toInt32() );
+ // The TotalTime is in mins as per ECMA specification.
+ m_xDocProp->setEditingDuration( aChars.toInt32() * 60 );
}
catch (lang::IllegalArgumentException &)
{