[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - oox/source sw/ooxmlexport_setup.mk sw/qa

Miklos Vajna vmiklos at collabora.co.uk
Fri Mar 13 05:35:33 PDT 2015


 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 8106e522c4ea2ae4441ec571579a38eeb6d9af04
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Mar 2 08:40:20 2015 +0100

    tdf#89774 oox: TotalTime is in minutes
    
    (cherry picked from commit 302f413eec4da8c8572911d08e939186c5ac57cf)
    
    Conflicts:
    	sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
    
    Change-Id: Ie65a8adbd077997f4a13914dd8e0ba4d55afd7b7
    Reviewed-on: https://gerrit.libreoffice.org/14852
    Tested-by: Michael Stahl <mstahl at redhat.com>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index 4ca796f..2eb85c7 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -649,7 +649,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 6d9bfc7..733434e 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -700,6 +700,13 @@ DECLARE_OOXMLEXPORT_TEST(testFD083057, "fdo83057.docx")
     assertXPath(pXmlDoc, "//mc:AlternateContent//w:sdt", 0);
 }
 
+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: */


More information about the Libreoffice-commits mailing list