aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/sl
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2019-09-16 19:55:23 +0000
committerAndreas Beeker <kiwiwings@apache.org>2019-09-16 19:55:23 +0000
commit8e3286a64cf452dbc3eaf34147083d7f24f2b200 (patch)
tree3f0b6579b0be6b9768b9b7e2a013a2bb74e4b363 /src/java/org/apache/poi/sl
parent5245be1733b555f18a52162fd63cd38f064e725e (diff)
downloadpoi-8e3286a64cf452dbc3eaf34147083d7f24f2b200.tar.gz
poi-8e3286a64cf452dbc3eaf34147083d7f24f2b200.zip
Catch missing scratchpad state for EMF / WMF rendering
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1867025 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/sl')
-rw-r--r--src/java/org/apache/poi/sl/usermodel/SlideShowFactory.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/java/org/apache/poi/sl/usermodel/SlideShowFactory.java b/src/java/org/apache/poi/sl/usermodel/SlideShowFactory.java
index bda928cfce..76f08dabe8 100644
--- a/src/java/org/apache/poi/sl/usermodel/SlideShowFactory.java
+++ b/src/java/org/apache/poi/sl/usermodel/SlideShowFactory.java
@@ -295,8 +295,13 @@ public class SlideShowFactory {
S extends Shape<S,P>,
P extends TextParagraph<S,P,? extends TextRun>
> SlideShow<S,P> createSlideShow(String factoryClass, Object[] args) throws IOException, EncryptedDocumentException {
+ final Class<?> clazz;
+ try {
+ clazz = SlideShowFactory.class.getClassLoader().loadClass(factoryClass);
+ } catch (ClassNotFoundException e) {
+ throw new IOException(factoryClass+" not found - check if poi-scratchpad.jar is on the classpath.");
+ }
try {
- Class<?> clazz = SlideShowFactory.class.getClassLoader().loadClass(factoryClass);
Class<?>[] argsClz = new Class<?>[args.length];
int i=0;
for (Object o : args) {