diff options
author | PJ Fanning <fanningpj@apache.org> | 2022-02-19 21:08:48 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2022-02-19 21:08:48 +0000 |
commit | 9563aa92dadcace917afed901438da2a0646d629 (patch) | |
tree | 8d006f5338809a2f46dd860b226396b915c5fc92 /poi-ooxml | |
parent | 189552425dae45c2ba89bb2532511c721ea85170 (diff) | |
download | poi-9563aa92dadcace917afed901438da2a0646d629.tar.gz poi-9563aa92dadcace917afed901438da2a0646d629.zip |
add extra max size config
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898234 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-ooxml')
-rw-r--r-- | poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java | 6 | ||||
-rw-r--r-- | poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java index 4f26afdb2d..2eb65bef8c 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java @@ -86,10 +86,16 @@ public class TSPTimeStampService implements TimeStampService { private static final int DEFAULT_TIMESTAMP_RESPONSE_SIZE = 10_000_000; private static int MAX_TIMESTAMP_RESPONSE_SIZE = DEFAULT_TIMESTAMP_RESPONSE_SIZE; + /** + * @param maxTimestampResponseSize the max timestamp response size allowed + */ public static void setMaxTimestampResponseSize(int maxTimestampResponseSize) { MAX_TIMESTAMP_RESPONSE_SIZE = maxTimestampResponseSize; } + /** + * @return the max timestamp response size allowed + */ public static int getMaxTimestampResponseSize() { return MAX_TIMESTAMP_RESPONSE_SIZE; } diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java index 85512059a7..fbc9668203 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java @@ -572,7 +572,7 @@ public class XMLSlideShow extends POIXMLDocument */ @Override public XSLFPictureData addPicture(InputStream is, PictureType format) throws IOException { - return addPicture(IOUtils.toByteArray(is, MAX_IMAGE_SIZE), format); + return addPicture(IOUtils.toByteArray(is, getMaxImageSize()), format); } |