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

Miklos Vajna vmiklos at collabora.co.uk
Fri Mar 7 09:08:18 PST 2014


 sw/qa/extras/ooxmlimport/data/strict.docx |binary
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx  |    3 +++
 writerfilter/source/ooxml/model.xml       |    2 ++
 3 files changed, 5 insertions(+)

New commits:
commit aaef39de32442203d631a65aecf23eeb27dfbb12
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Mar 7 17:58:59 2014 +0100

    DOCX strict import: fix pictures as well
    
    Change-Id: I29f12eb1e5bfc39dc7d76efcff50dced061f7969

diff --git a/sw/qa/extras/ooxmlimport/data/strict.docx b/sw/qa/extras/ooxmlimport/data/strict.docx
index 57d671f..b48b708 100644
Binary files a/sw/qa/extras/ooxmlimport/data/strict.docx and b/sw/qa/extras/ooxmlimport/data/strict.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index d0c0b4a..8428f3f 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1917,6 +1917,9 @@ DECLARE_OOXMLIMPORT_TEST(testStrict, "strict.docx")
     // Header in the document caused a crash on import.
     uno::Reference<text::XText> xHeaderText(xPageStyle->getPropertyValue("HeaderText"), uno::UNO_QUERY);
     getParagraphOfText(1, xHeaderText, "This is a header.");
+
+    // Picture was missing, this resulted in a lang::IndexOutOfBoundsException.
+    getShape(1);
 }
 
 #endif
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index c31bbef..2933d54 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -23,10 +23,12 @@
   <namespace-alias name="urn:schemas-microsoft-com:office:office" alias="office" id="vmlOffice"/>
   <namespace-alias name="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" alias="theme" id="officeRelTheme"/>
   <namespace-alias name="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" alias="wordprocessingDrawing" id="dmlWordDr"/>
+  <namespace-alias name="http://purl.oclc.org/ooxml/drawingml/wordprocessingDrawing" alias="wordprocessingDrawing" id="dmlWordDr"/>
   <namespace-alias name="http://schemas.openxmlformats.org/drawingml/2006/main" alias="drawingml" id="dml"/>
   <namespace-alias name="http://purl.oclc.org/ooxml/drawingml/main" alias="drawingml" id="dml"/>
   <namespace-alias name="urn:schemas-microsoft-com:vml" alias="vml" id="vml"/>
   <namespace-alias name="http://schemas.openxmlformats.org/drawingml/2006/picture" alias="picture" id="dmlPicture"/>
+  <namespace-alias name="http://purl.oclc.org/ooxml/drawingml/picture" alias="picture" id="dmlPicture"/>
   <namespace-alias name="http://schemas.openxmlformats.org/drawingml/2006/diagram" alias="diagram" id="dmlDiagram"/>
   <namespace-alias name="http://schemas.openxmlformats.org/drawingml/2006/lockedCanvas" alias="lockedCanvas" id="dmlLockedCanvas"/>
   <namespace-alias name="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" alias="wps" id="wps"/>


More information about the Libreoffice-commits mailing list