diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-03-10 09:11:09 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-03-10 10:51:25 +0100 |
commit | 49c3aff8d8d3030b2acbffb6ff000b5d44445cc9 (patch) | |
tree | 9551d8fc2be89ae8d6eec54b0d5b91bccb9f77f5 | |
parent | b8183958e6b5367eeebd5d07fa5f26561fa1dc4a (diff) |
DOCX strict import: handle charts
Change-Id: I1933b3272ff735ae1ecb500fcd693e3ca99bf264
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/strict.docx | bin | 14570 -> 18110 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 9 | ||||
-rw-r--r-- | writerfilter/source/ooxml/model.xml | 1 |
3 files changed, 8 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/strict.docx b/sw/qa/extras/ooxmlimport/data/strict.docx Binary files differindex b48b70855b47..de71c3b6686b 100644 --- a/sw/qa/extras/ooxmlimport/data/strict.docx +++ b/sw/qa/extras/ooxmlimport/data/strict.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 8428f3f3665a..1b147a700f74 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1918,8 +1918,13 @@ DECLARE_OOXMLIMPORT_TEST(testStrict, "strict.docx") 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); + // Picture was missing. + uno::Reference<lang::XServiceInfo> xServiceInfo(getShape(1), uno::UNO_QUERY); + CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.TextGraphicObject")); + + // Chart was missing. + xServiceInfo.set(getShape(2), uno::UNO_QUERY); + CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.TextEmbeddedObject")); } #endif diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml index 34eb59d5d251..513902b78ff8 100644 --- a/writerfilter/source/ooxml/model.xml +++ b/writerfilter/source/ooxml/model.xml @@ -34,6 +34,7 @@ <namespace-alias name="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" alias="wps" id="wps"/> <namespace-alias name="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" alias="wpg" id="wpg"/> <namespace-alias name="http://schemas.openxmlformats.org/drawingml/2006/chart" alias="chart" id="dmlChart"/> + <namespace-alias name="http://purl.oclc.org/ooxml/drawingml/chart" alias="chart" id="dmlChart"/> <namespace-alias name="urn:schemas-microsoft-com:office:word" alias="vml_wordprocessingDrawing" id="vmlWord"/> <namespace-alias name="http://schemas.openxmlformats.org/wordprocessingml/2006/main" alias="wordprocessingml" id="doc"/> <namespace-alias name="http://purl.oclc.org/ooxml/wordprocessingml/main" alias="wordprocessingml" id="doc"/> |