]> source.dussan.org Git - poi.git/commitdiff
Fix indent, and make the mime type matching more consistent
authorNick Burch <nick@apache.org>
Fri, 16 Jul 2010 16:01:13 +0000 (16:01 +0000)
committerNick Burch <nick@apache.org>
Fri, 16 Jul 2010 16:01:13 +0000 (16:01 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@964844 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/extractor/ExtractorFactory.java

index 2601f77aeae833baabd9e06ffb3089a736e75312..7ccb9f9297b354bf34f43dc8b5c8135564ae53cb 100644 (file)
@@ -181,24 +181,14 @@ public class ExtractorFactory {
                        return new XWPFWordExtractor(pkg);
                }
 
-               if(corePart.getContentType().equals(XSLFSlideShow.MAIN_CONTENT_TYPE)) {
+               if(corePart.getContentType().equals(XSLFSlideShow.MAIN_CONTENT_TYPE) ||
+                     corePart.getContentType().equals(XSLFSlideShow.MACRO_CONTENT_TYPE) ||
+            corePart.getContentType().equals(XSLFSlideShow.MACRO_TEMPLATE_CONTENT_TYPE) ||
+            corePart.getContentType().equals(XSLFSlideShow.PRESENTATIONML_CONTENT_TYPE) ||
+            corePart.getContentType().equals(XSLFSlideShow.PRESENTATIONML_TEMPLATE_CONTENT_TYPE) ||
+            corePart.getContentType().equals(XSLFSlideShow.PRESENTATION_MACRO_CONTENT_TYPE)) {
                        return new XSLFPowerPointExtractor(pkg);
                }
-                if(corePart.getContentType().equals(XSLFSlideShow.MACRO_CONTENT_TYPE)) {
-                        return new XSLFPowerPointExtractor(pkg);
-                }
-                if(corePart.getContentType().equals(XSLFSlideShow.MACRO_TEMPLATE_CONTENT_TYPE)) {
-                        return new XSLFPowerPointExtractor(pkg);
-                }
-                if(corePart.getContentType().equals(XSLFSlideShow.PRESENTATIONML_CONTENT_TYPE)) {
-                        return new XSLFPowerPointExtractor(pkg);
-                }
-                if(corePart.getContentType().equals(XSLFSlideShow.PRESENTATIONML_TEMPLATE_CONTENT_TYPE)) {
-                        return new XSLFPowerPointExtractor(pkg);
-                }
-                if(corePart.getContentType().equals(XSLFSlideShow.PRESENTATION_MACRO_CONTENT_TYPE)) {
-                        return new XSLFPowerPointExtractor(pkg);
-                }
 
                throw new IllegalArgumentException("No supported documents found in the OOXML package (found "+corePart.getContentType()+")");
        }