private ExtractorFactory() {
- ServiceLoader.load(ExtractorProvider.class).forEach(provider::add);
+ ClassLoader cl = ExtractorFactory.class.getClassLoader();
+ ServiceLoader.load(ExtractorProvider.class, cl).forEach(provider::add);
}
/**
/**
* Classes can implement this interfaces to support other formats, for
- * example, use Apache Batik to render WMF, PICT can be rendered using Apple QuickTime API for Java:
+ * example, use Apache Batik to render WMF (since POI 4.0, there's an internal WMF/EMF/EMF+ renderer in POI),
+ * PICT can be rendered using Apple QuickTime API for Java:
*
* <pre>
* <code>
/**
* @param dim the dimension in pixels of the returned image
* @return the image as buffered image or null if image could not be loaded
- *
+ *
* @since POI 3.15-beta2
*/
BufferedImage getImage(Dimension2D dim);
-
+
/**
* Render picture data into the supplied graphics
*
private final List<SlideShowProvider<?,?>> provider = new ArrayList<>();
private SlideShowFactory() {
- ServiceLoader.load(SlideShowProvider.class).forEach(provider::add);
+ ClassLoader cl = SlideShowFactory.class.getClassLoader();
+ ServiceLoader.load(SlideShowProvider.class, cl).forEach(provider::add);
}
/**
private final List<WorkbookProvider> provider = new ArrayList<>();
private WorkbookFactory() {
- ServiceLoader.load(WorkbookProvider.class).forEach(provider::add);
+ ClassLoader cl = WorkbookFactory.class.getClassLoader();
+ ServiceLoader.load(WorkbookProvider.class, cl).forEach(provider::add);
}
provides org.apache.poi.extractor.ExtractorProvider with org.apache.poi.ooxml.extractor.POIXMLExtractorFactory;
provides org.apache.poi.ss.usermodel.WorkbookProvider with org.apache.poi.xssf.usermodel.XSSFWorkbookFactory;
provides org.apache.poi.sl.usermodel.SlideShowProvider with org.apache.poi.xslf.usermodel.XSLFSlideShowFactory;
+ provides org.apache.poi.sl.draw.ImageRenderer with org.apache.poi.xslf.draw.SVGImageRenderer;
exports org.apache.poi.xwpf.extractor;
exports org.apache.poi.xwpf.usermodel;
provides org.apache.poi.extractor.ExtractorProvider with org.apache.poi.ooxml.extractor.POIXMLExtractorFactory;
provides org.apache.poi.ss.usermodel.WorkbookProvider with org.apache.poi.xssf.usermodel.XSSFWorkbookFactory;
provides org.apache.poi.sl.usermodel.SlideShowProvider with org.apache.poi.xslf.usermodel.XSLFSlideShowFactory;
+ provides org.apache.poi.sl.draw.ImageRenderer with org.apache.poi.xslf.draw.SVGImageRenderer;
exports org.apache.poi.xwpf.extractor;
exports org.apache.poi.xwpf.usermodel;
/* needed for CleanerUtil */
requires jdk.unsupported;
+ /* for JPMS / OSGi interaction see https://blog.osgi.org/2013/02/javautilserviceloader-in-osgi.html */
uses org.apache.poi.extractor.ExtractorProvider;
uses org.apache.poi.ss.usermodel.WorkbookProvider;
uses org.apache.poi.sl.usermodel.SlideShowProvider;
+ uses org.apache.poi.sl.draw.ImageRenderer;
-
- provides org.apache.poi.ss.usermodel.WorkbookProvider with org.apache.poi.hssf.usermodel.HSSFWorkbookFactory;
provides org.apache.poi.extractor.ExtractorProvider with org.apache.poi.extractor.MainExtractorFactory;
-
+ provides org.apache.poi.ss.usermodel.WorkbookProvider with org.apache.poi.hssf.usermodel.HSSFWorkbookFactory;
+ provides org.apache.poi.sl.draw.ImageRenderer with org.apache.poi.sl.draw.BitmapImageRenderer;
exports org.apache.poi;
exports org.apache.poi.common;
/* needed for CleanerUtil */
requires jdk.unsupported;
+ /* for JPMS / OSGi interaction see https://blog.osgi.org/2013/02/javautilserviceloader-in-osgi.html */
uses org.apache.poi.extractor.ExtractorProvider;
uses org.apache.poi.ss.usermodel.WorkbookProvider;
uses org.apache.poi.sl.usermodel.SlideShowProvider;
+ uses org.apache.poi.sl.draw.ImageRenderer;
- provides org.apache.poi.ss.usermodel.WorkbookProvider with org.apache.poi.hssf.usermodel.HSSFWorkbookFactory;
provides org.apache.poi.extractor.ExtractorProvider with org.apache.poi.extractor.MainExtractorFactory;
+ provides org.apache.poi.ss.usermodel.WorkbookProvider with org.apache.poi.hssf.usermodel.HSSFWorkbookFactory;
+ provides org.apache.poi.sl.draw.ImageRenderer with org.apache.poi.sl.draw.BitmapImageRenderer;
exports org.apache.poi;
exports org.apache.poi.common;
provides org.apache.poi.extractor.ExtractorProvider with org.apache.poi.extractor.ole2.OLE2ScratchpadExtractorFactory;
provides org.apache.poi.sl.usermodel.SlideShowProvider with org.apache.poi.hslf.usermodel.HSLFSlideShowFactory;
+ provides org.apache.poi.sl.draw.ImageRenderer with org.apache.poi.hwmf.draw.HwmfImageRenderer, org.apache.poi.hemf.draw.HemfImageRenderer;
exports org.apache.poi.hmef;
exports org.apache.poi.hmef.dev;
provides org.apache.poi.extractor.ExtractorProvider with org.apache.poi.extractor.ole2.OLE2ScratchpadExtractorFactory;
provides org.apache.poi.sl.usermodel.SlideShowProvider with org.apache.poi.hslf.usermodel.HSLFSlideShowFactory;
+ provides org.apache.poi.sl.draw.ImageRenderer with org.apache.poi.hwmf.draw.HwmfImageRenderer, org.apache.poi.hemf.draw.HemfImageRenderer;
exports org.apache.poi.hmef;
exports org.apache.poi.hmef.dev;
#java.util.Hashtable\r
\r
@defaultMessage DatatypeConverter is not available in Java 9+ without adding add-opens - use java.util.Base64\r
-javax.xml.bind.DatatypeConverter
\ No newline at end of file
+javax.xml.bind.DatatypeConverter\r
+\r
+@defaultMessage don't rely on the threads ContextClassLoader - provide the classloader via load(Class, Classloader)\r
+java.util.ServiceLoader#load(java.lang.Class)
\ No newline at end of file
--- /dev/null
+# ====================================================================
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ====================================================================
+
+org.apache.poi.sl.draw.BitmapImageRenderer
\ No newline at end of file
--- /dev/null
+# ====================================================================
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ====================================================================
+
+org.apache.poi.xslf.draw.SVGImageRenderer
\ No newline at end of file
--- /dev/null
+# ====================================================================
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ====================================================================
+
+org.apache.poi.hwmf.draw.HwmfImageRenderer
+org.apache.poi.hemf.draw.HemfImageRenderer