ASF Bugzilla – Attachment 23991 Details for
Bug 47517
[PATCH] Extractor does not support XLTX and DOTX files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Additional patch that adds more mime-types
macro.patch (text/plain), 3.78 KB, created by
Maxim Valyanskiy
on 2009-07-16 02:50:07 UTC
(
hide
)
Description:
Additional patch that adds more mime-types
Filename:
MIME Type:
Creator:
Maxim Valyanskiy
Created:
2009-07-16 02:50:07 UTC
Size:
3.78 KB
patch
obsolete
>diff --git a/src/ooxml/java/org/apache/poi/extractor/ExtractorFactory.java b/src/ooxml/java/org/apache/poi/extractor/ExtractorFactory.java >index 8a13158..1268ef7 100644 >--- a/src/ooxml/java/org/apache/poi/extractor/ExtractorFactory.java >+++ b/src/ooxml/java/org/apache/poi/extractor/ExtractorFactory.java >@@ -102,12 +102,21 @@ public class ExtractorFactory { > if(corePart.getContentType().equals(XSSFRelation.TEMPLATE_WORKBOOK.getContentType())) { > return new XSSFExcelExtractor(pkg); > } >+ if(corePart.getContentType().equals(XSSFRelation.MACRO_WORKBOOK.getContentType())) { >+ return new XSSFExcelExtractor(pkg); >+ } > if(corePart.getContentType().equals(XWPFRelation.DOCUMENT.getContentType())) { > return new XWPFWordExtractor(pkg); > } > if(corePart.getContentType().equals(XWPFRelation.TEMPLATE.getContentType())) { > return new XWPFWordExtractor(pkg); > } >+ if(corePart.getContentType().equals(XWPFRelation.MACRO_DOCUMENT.getContentType())) { >+ return new XWPFWordExtractor(pkg); >+ } >+ if(corePart.getContentType().equals(XWPFRelation.MACRO_TEMPLATE_DOCUMENT.getContentType())) { >+ return new XWPFWordExtractor(pkg); >+ } > if(corePart.getContentType().equals(XSLFSlideShow.MAIN_CONTENT_TYPE)) { > return new XSLFPowerPointExtractor(pkg); > } >diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRelation.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRelation.java >index eacb0f7..57a7680 100644 >--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRelation.java >+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRelation.java >@@ -72,6 +72,12 @@ public final class XSSFRelation extends POIXMLRelation { > "/xl/workbook.xml", > null > ); >+ public static final XSSFRelation MACRO_WORKBOOK = new XSSFRelation( >+ "application/vnd.ms-excel.sheet.macroEnabled.main+xml", >+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", >+ "/xl/workbook.xml", >+ null >+ ); > public static final XSSFRelation WORKSHEET = new XSSFRelation( > "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml", > "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet", >diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java >index 977e85d..c1b91bb 100755 >--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java >+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java >@@ -46,6 +46,18 @@ public final class XWPFRelation extends POIXMLRelation { > "/word/document.xml", > null > ); >+ public static final XWPFRelation MACRO_DOCUMENT = new XWPFRelation( >+ "application/vnd.ms-word.document.macroEnabled.main+xml", >+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", >+ "/word/document.xml", >+ null >+ ); >+ public static final XWPFRelation MACRO_TEMPLATE_DOCUMENT = new XWPFRelation( >+ "application/vnd.ms-word.template.macroEnabledTemplate.main+xml", >+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", >+ "/word/document.xml", >+ null >+ ); > public static final XWPFRelation FONT_TABLE = new XWPFRelation( > "application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml", > "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 47517
:
23964
|
23965
|
23966
| 23991 |
24002