oox/source/core/xmlfilterbase.cxx           |    3 ++-
 sw/ooxmlexport_setup.mk                     |    3 +++
 sw/qa/extras/ooxmlexport/data/tdf89774.fodt |   11 +++++++++++
 sw/qa/extras/ooxmlexport/ooxmlexport5.cxx   |    7 +++++++
 4 files changed, 23 insertions(+), 1 deletion(-)

New commits:
commit 302f413eec4da8c8572911d08e939186c5ac57cf
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Mon Mar 2 08:40:20 2015 +0100

    tdf#89774 oox: TotalTime is in minutes
    
    Change-Id: Ie65a8adbd077997f4a13914dd8e0ba4d55afd7b7

diff --git a/oox/source/core/xmlfilterbase.cxx 
b/oox/source/core/xmlfilterbase.cxx
index c6493ad..aeb013f 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -647,7 +647,8 @@ writeAppProperties( XmlFilterBase& rSelf, Reference< 
XDocumentProperties > xProp
     writeElement( pAppProps, XML_Slides,                "slides" );
     writeElement( pAppProps, XML_Notes,                 "notes" );
 #endif  /* def OOXTODO */
-    writeElement( pAppProps, XML_TotalTime,             
xProperties->getEditingDuration() );
+    // EditingDuration is in seconds, TotalTime is in minutes.
+    writeElement( pAppProps, XML_TotalTime,             
xProperties->getEditingDuration() / 60 );
 #ifdef OOXTODO
     writeElement( pAppProps, XML_HiddenSlides,          "hidden slides" );
     writeElement( pAppProps, XML_MMClips,               "mm clips" );
diff --git a/sw/ooxmlexport_setup.mk b/sw/ooxmlexport_setup.mk
index 5eeccad..5a0cc3b 100644
--- a/sw/ooxmlexport_setup.mk
+++ b/sw/ooxmlexport_setup.mk
@@ -33,6 +33,9 @@ define sw_ooxmlexport_components
        drawinglayer/drawinglayer \
        embeddedobj/util/embobj \
        filter/source/config/cache/filterconfig1 \
+       filter/source/odfflatxml/odfflatxml \
+       filter/source/xmlfilterdetect/xmlfd \
+       filter/source/xmlfilteradaptor/xmlfa \
        forms/util/frm \
        framework/util/fwk \
        i18npool/util/i18npool \
diff --git a/sw/qa/extras/ooxmlexport/data/tdf89774.fodt 
b/sw/qa/extras/ooxmlexport/data/tdf89774.fodt
new file mode 100644
index 0000000..18e1e7a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf89774.fodt
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document 
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oas
 is:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:officeooo="http://openoffice.org/2009/office"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:formx="urn:openoffice:names:
 experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.text">
+  <office:meta>
+    <meta:editing-duration>PT1M5S</meta:editing-duration>
+  </office:meta>
+ <office:body>
+  <office:text>
+   <text:p>hello</text:p>
+  </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index c65e546..dd3e7cf 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -734,6 +734,13 @@ DECLARE_OOXMLEXPORT_TEST(testImageNoborder, 
"image-noborder.docx")
     CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(0), 
getProperty<table::BorderLine2>(getShape(1), "TopBorder").LineWidth);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf89774, "tdf89774.fodt")
+{
+    if (xmlDocPtr pXmlDoc = parseExport("docProps/app.xml"))
+        // This was 65, as unit was seconds instead of minutes.
+        assertXPathContent(pXmlDoc, 
"/extended-properties:Properties/extended-properties:TotalTime", "1");
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to