From 0a3ac7d1e3da6990edc22bca36bbd8bd7c11d9dc Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Mon, 13 Sep 2010 11:45:34 +0000 Subject: [PATCH] More XSLFRelation entries for common .pptx file parts git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@996506 13f79535-47bb-0310-9956-ffa450edef68 --- src/documentation/content/xdocs/status.xml | 1 + .../poi/xslf/usermodel/XSLFRelation.java | 21 +++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/documentation/content/xdocs/status.xml b/src/documentation/content/xdocs/status.xml index 4dad7708df..b230d40b1e 100644 --- a/src/documentation/content/xdocs/status.xml +++ b/src/documentation/content/xdocs/status.xml @@ -34,6 +34,7 @@ + More XSLFRelation entries for common .pptx file parts 49872 - avoid exception in XSSFFormulaEvaluator.evaluateInCell when evaluating shared formulas 49895 - avoid corruption of XSSFWorkbook after removing all merged cells from sheet 49907 - fixed inconsistent behaviour between HSSF and XSSF when creating consecutive names diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFRelation.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFRelation.java index b3be77f54b..29cf65809e 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFRelation.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFRelation.java @@ -76,13 +76,16 @@ public class XSLFRelation extends POIXMLRelation { public static final XSLFRelation SLIDE = new XSLFRelation( "application/vnd.openxmlformats-officedocument.presentationml.slide+xml", - null, null, null + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide", + "/ppt/slides/slide#.xml", + null ); public static final XSLFRelation SLIDE_LAYOUT = new XSLFRelation( "application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml", "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout", - null, null + "/ppt/slideLayouts/slideLayout#.xml", + null ); public static final XSLFRelation COMMENTS = new XSLFRelation( @@ -91,6 +94,20 @@ public class XSLFRelation extends POIXMLRelation { null, null ); + public static final XSLFRelation THEME = new XSLFRelation( + "application/vnd.openxmlformats-officedocument.theme+xml", + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme", + "/ppt/theme/theme#.xml", + null + ); + + public static final XSLFRelation VML_DRAWING = new XSLFRelation( + "application/vnd.openxmlformats-officedocument.vmlDrawing", + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing", + "/ppt/drawings/vmlDrawing#.vml", + null + ); + private XSLFRelation(String type, String rel, String defaultName, Class cls) { super(type, rel, defaultName, cls); -- 2.39.5