DOCX strict import: handle charts

Change-Id: I1933b3272ff735ae1ecb500fcd693e3ca99bf264
This commit is contained in:
Miklos Vajna
2014-03-10 09:11:09 +01:00
parent b8183958e6
commit 49c3aff8d8
3 changed files with 8 additions and 2 deletions

View File

@@ -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

View File

@@ -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"/>