diff options
3 files changed, 131 insertions, 1 deletions
diff --git a/poi-ooxml-full/build.gradle b/poi-ooxml-full/build.gradle index ee9edd81d5..01e5d47d91 100644 --- a/poi-ooxml-full/build.gradle +++ b/poi-ooxml-full/build.gradle @@ -75,7 +75,7 @@ task copy_xsds(type: Copy) { from ('src/main/xmlschema/org/apache/poi/xdgf') from ('src/main/xmlschema/org/apache/poi/schemas') { include 'XAdES*.xsd', '*.xsdconfig', 'xmldsig*.xsd', 'ooxmlSchemas.xsdconfig', 'markup-compatibility.xsd', - 'vmlDrawing.xsd', 'word12.xsd', 'xlThreaded*.xsd', 'dml-drawing.xsd' + 'vmlDrawing.xsd', 'word12.xsd', 'xlThreaded*.xsd', 'dml-drawing.xsd', 'drawing-chart2012.xsd' exclude '*.zip' } from ('src/main/xmlschema/org/apache/poi/poifs/crypt') { diff --git a/poi-ooxml-full/src/main/xmlschema/org/apache/poi/schemas/drawing-chart2012.xsd b/poi-ooxml-full/src/main/xmlschema/org/apache/poi/schemas/drawing-chart2012.xsd new file mode 100644 index 0000000000..6bcec5ae69 --- /dev/null +++ b/poi-ooxml-full/src/main/xmlschema/org/apache/poi/schemas/drawing-chart2012.xsd @@ -0,0 +1,129 @@ + <xsd:schema targetNamespace="http://schemas.microsoft.com/office/drawing/2012/chart" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns="http://schemas.microsoft.com/office/drawing/2012/chart" xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:xsd="http://www.w3.org/2001/XMLSchema" blockDefault="#all"> + <xsd:import namespace="http://schemas.openxmlformats.org/drawingml/2006/chart" schemaLocation="dml-chart.xsd"/> + <xsd:import namespace="http://schemas.openxmlformats.org/drawingml/2006/main" schemaLocation="dml-main.xsd"/> + <xsd:element name="pivotSource" type="c:CT_PivotSource"/> + <xsd:element name="numFmt" type="c:CT_NumFmt"/> + <xsd:element name="spPr" type="a:CT_ShapeProperties"/> + <xsd:element name="layout" type="c:CT_Layout"/> + <xsd:element name="fullRef" type="CT_FullRef"/> + <xsd:complexType name="CT_FullRef"> + <xsd:sequence> + <xsd:element name="sqref" type="xsd:string" minOccurs="1" maxOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="CT_LevelRef"> + <xsd:sequence> + <xsd:element name="sqref" type="xsd:string" minOccurs="1" maxOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + <xsd:element name="levelRef" type="CT_LevelRef"/> + <xsd:complexType name="CT_FormulaRef"> + <xsd:sequence> + <xsd:element name="sqref" type="xsd:string" minOccurs="1" maxOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + <xsd:element name="formulaRef" type="CT_FormulaRef"/> + <xsd:complexType name="CT_FilteredSeriesTitle"> + <xsd:sequence> + <xsd:element name="tx" type="c:CT_SerTx" minOccurs="1" maxOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + <xsd:element name="filteredSeriesTitle" type="CT_FilteredSeriesTitle"/> + <xsd:complexType name="CT_FilteredCategoryTitle"> + <xsd:sequence> + <xsd:element name="cat" type="c:CT_AxDataSource" minOccurs="1" maxOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + <xsd:element name="filteredCategoryTitle" type="CT_FilteredCategoryTitle"/> + <xsd:complexType name="CT_FilteredBarSer"> + <xsd:sequence> + <xsd:element name="ser" type="c:CT_BarSer" minOccurs="1" maxOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="CT_FilteredLineSer"> + <xsd:sequence> + <xsd:element name="ser" type="c:CT_LineSer" minOccurs="1" maxOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="CT_FilteredScatterSer"> + <xsd:sequence> + <xsd:element name="ser" type="c:CT_ScatterSer" minOccurs="1" maxOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="CT_FilteredAreaSer"> + <xsd:sequence> + <xsd:element name="ser" type="c:CT_AreaSer" minOccurs="1" maxOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="CT_FilteredPieSer"> + <xsd:sequence> + <xsd:element name="ser" type="c:CT_PieSer" minOccurs="1" maxOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="CT_FilteredBubbleSer"> + <xsd:sequence> + <xsd:element name="ser" type="c:CT_BubbleSer" minOccurs="1" maxOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="CT_FilteredRadarSer"> + <xsd:sequence> + <xsd:element name="ser" type="c:CT_RadarSer" minOccurs="1" maxOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="CT_FilteredSurfaceSer"> + <xsd:sequence> + <xsd:element name="ser" type="c:CT_SurfaceSer" minOccurs="1" maxOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + <xsd:element name="filteredAreaSeries" type="CT_FilteredAreaSer"/> + <xsd:element name="filteredBarSeries" type="CT_FilteredBarSer"/> + <xsd:element name="filteredBubbleSeries" type="CT_FilteredBubbleSer"/> + <xsd:element name="filteredLineSeries" type="CT_FilteredLineSer"/> + <xsd:element name="filteredPieSeries" type="CT_FilteredPieSer"/> + <xsd:element name="filteredRadarSeries" type="CT_FilteredRadarSer"/> + <xsd:element name="filteredScatterSeries" type="CT_FilteredScatterSer"/> + <xsd:element name="filteredSurfaceSeries" type="CT_FilteredSurfaceSer"/> + <xsd:complexType name="CT_SeriesDataLabelsRange"> + <xsd:sequence> + <xsd:element name="f" type="xsd:string" minOccurs="1" maxOccurs="1"/> + <xsd:element name="dlblRangeCache" type="c:CT_StrData" minOccurs="0" maxOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + <xsd:element name="datalabelsRange" type="CT_SeriesDataLabelsRange"/> + <xsd:complexType name="CT_CategoryFilterException"> + <xsd:sequence> + <xsd:element name="sqref" type="xsd:string" minOccurs="1" maxOccurs="1"/> + <xsd:element name="spPr" type="a:CT_ShapeProperties" minOccurs="0" maxOccurs="1"/> + <xsd:element name="explosion" type="c:CT_UnsignedInt" minOccurs="0" maxOccurs="1"/> + <xsd:element name="invertIfNegative" type="c:CT_Boolean" minOccurs="0" maxOccurs="1"/> + <xsd:element name="bubble3D" type="c:CT_Boolean" minOccurs="0" maxOccurs="1"/> + <xsd:element name="marker" type="c:CT_Marker" minOccurs="0" maxOccurs="1"/> + <xsd:element name="dLbl" type="c:CT_DLbl" minOccurs="0" maxOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="CT_CategoryFilterExceptions"> + <xsd:sequence> + <xsd:element name="categoryFilterException" type="CT_CategoryFilterException" minOccurs="1" maxOccurs="unbounded"/> + </xsd:sequence> + </xsd:complexType> + <xsd:element name="categoryFilterExceptions" type="CT_CategoryFilterExceptions"/> + <xsd:complexType name="CT_DataLabelFieldTableEntry"> + <xsd:sequence> + <xsd:element name="txfldGUID" type="xsd:string" minOccurs="1" maxOccurs="1"/> + <xsd:element name="f" type="xsd:string" minOccurs="1" maxOccurs="1"/> + <xsd:element name="dlblFieldTableCache" type="c:CT_StrData" minOccurs="0" maxOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="CT_DataLabelFieldTable"> + <xsd:sequence> + <xsd:element name="dlblFTEntry" type="CT_DataLabelFieldTableEntry" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + </xsd:complexType> + <xsd:element name="dlblFieldTable" type="CT_DataLabelFieldTable"/> + <xsd:element name="xForSave" type="c:CT_Boolean"/> + <xsd:element name="showDataLabelsRange" type="c:CT_Boolean"/> + <xsd:element name="tx" type="c:CT_Tx"/> + <xsd:element name="showLeaderLines" type="c:CT_Boolean"/> + <xsd:element name="leaderLines" type="c:CT_ChartLines"/> + <xsd:element name="autoCat" type="c:CT_Boolean"/> + </xsd:schema>
\ No newline at end of file diff --git a/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLTypeLoader.java b/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLTypeLoader.java index 243f1d7f18..cdcd757671 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLTypeLoader.java +++ b/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLTypeLoader.java @@ -68,6 +68,7 @@ public class POIXMLTypeLoader { map.put(MS_EXCEL_URN, "x"); map.put(MS_WORD_URN, "w10"); map.put(MS_VML_URN, "v"); + map.put("http://schemas.microsoft.com/office/drawing/2012/chart", "c15"); DEFAULT_XML_OPTIONS.setSaveSuggestedPrefixes(Collections.unmodifiableMap(map)); } } |