[Libreoffice-commits] core.git: oox/source sw/qa

Ravindra Vidhate ravindra.vidhate at synerzip.com
Wed Apr 16 08:54:10 PDT 2014


 oox/source/export/drawingml.cxx             |    4 ++--
 sw/qa/extras/ooxmlexport/data/fdo77476.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx    |   11 +++++++++++
 3 files changed, 13 insertions(+), 2 deletions(-)

New commits:
commit ccfc02f7691848284403d339ee17054169fbff1d
Author: Ravindra Vidhate <ravindra.vidhate at synerzip.com>
Date:   Tue Apr 15 15:24:40 2014 +0530

    fdo#77476:FILE_SAVE : 'TIF' is changed to 'TIFF' in RT
    
    1. Open the attached file in LO which has images [.TIF] format
    2. Save the document as DOCX
    3. Open the saved document in MS-Office or extract the content of the saved docx file.
     In [Content_Types].xml , .tif extension is changed to .tiff.
    
    Change-Id: I73baea9ad6cd991b04d47e23865b77432127a510
    Reviewed-on: https://gerrit.libreoffice.org/9010
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index f3aceee..fd60107 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -749,8 +749,8 @@ OUString DrawingML::WriteImage( const Graphic& rGraphic , bool bRelPathToMedia )
             pExtension = ".png";
             break;
         case GFX_LINK_TYPE_NATIVE_TIF:
-            sMediaType = "image/tiff";
-            pExtension = ".tiff";
+            sMediaType = "image/tif";
+            pExtension = ".tif";
             break;
         case GFX_LINK_TYPE_NATIVE_WMF:
             sMediaType = "image/x-wmf";
diff --git a/sw/qa/extras/ooxmlexport/data/fdo77476.docx b/sw/qa/extras/ooxmlexport/data/fdo77476.docx
new file mode 100644
index 0000000..08c38b0
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo77476.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index a3853cf..1e4067e 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -3130,6 +3130,17 @@ DECLARE_OOXMLEXPORT_TEST(testFDO76597, "fdo76597.docx")
     assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr/w:spacing", "before", "96");
     assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr/w:spacing", "after", "120");
 }
+
+DECLARE_OOXMLEXPORT_TEST(testContentTypeTIF, "fdo77476.docx")
+{
+    xmlDocPtr pXmlDoc = parseExport("[Content_Types].xml");
+
+    if (!pXmlDoc)
+       return;
+
+    assertXPath(pXmlDoc, "/ContentType:Types/ContentType:Override[@ContentType='image/tif']", "PartName", "/word/media/image1.tif");
+}
+
 #endif
 
 CPPUNIT_PLUGIN_IMPLEMENT();


More information about the Libreoffice-commits mailing list