A malformed spreadsheet could trigger a very large allocation.
Can be overruled by users via IOUtils.setByteArrayMaxOverride().
Fixes https://issues.oss-fuzz.com/issues/476431391
* Support rendering transparent bitmaps in presentations.
Add PictureShape.getAlpha() method and implementations for HSLF and
XSLF. Then make use of it in DrawPictureShape to apply the right alpha
value to the picture being drawn.
Fixed a bug in BitmapImageRenderer that considered alpha value 0 as
"fully opaque", when it means "fully transparent" instead.
Finally, added a test for this feature in TestDrawPictureShape for XSLF.
A test for HSLF could not be created because it was not possible to
generate a test file with today's tools; MS Office removes the
bitmap transparency effect when saving as .ppt, and LibreOffice blends
it into the bitmap.
* Address reviewer comments.
* Add comment about default alpha value.
* Prevent NPE in XSLFPictureShape.getAlpha().
* Change wording in comments to avoid the word "percentage".
* Use static vars for extreme alpha values.
When retrieving picture data
When retrieving text in slides
When handling XSLFTableStyles
In EmbeddedExtractor if ShapeName is not set
In HSSF with invalid EscherSpRecord
In HSSF with invalid RecordStreams
When drawing arcs for shapes in slides
In HSSFPicture.getPictureIndex
Adjust "opens" for tests in poi-ooxml
Either handle it gracefully or throw
IllegalStateException instead for broken files
Only signing-handling in poi-ooxml is still remaining, but
this deprecation seems to have been moved to Gradle 10 anyway.
Gradle 9 will require JDK 17, though, so we can only upgrade
when the min. supported JDK is bumped once more.
* Bugzilla 69303: added failing test for case with same sheet RangeCopier for merged regions
* Bugzilla 69303: fixed same sheet issue when enabling copy of merged ranges
* Bugzilla 69303: added @since 6.0.0 to new public methods
---------
Co-authored-by: Viktor Ozerov <vik.ozerov+git@gmail.com>
We announced their removal for 6.0.0, so
we can remove them now as we plan a 6.0.0 release
next.
Some were not yet removed as they have still internal
usage or seem to need more work to finally remove.
We announced their removal already for 5.0.0 or 5.3.0, so
we can safely remove them now as we plan a 6.0.0 release
next.
Cell.setCellType() needs a closer look later as
it is not a simple deletion of code.
* git-svn-id: https://svn.apache.org/repos/asf/poi/tags/REL_5_2_3@1904113 13f79535-47bb-0310-9956-ffa450edef68
* Delay loading AWT classes by moving the methods into own class
* Set default value of ignoreMissingFontSystem to true when java.desktop module isn't available
---------
Co-authored-by: PJ Fanning <fanningpj@apache.org>
Co-authored-by: Jaroslav Tulach <jaroslav.tulach@apidesign.org>
* feat: Full color support in cellformat expressions
This change adds full support for named and indexed color in cell format expressions by adding in the standard color palette to CellFormatPart, from where the formatting information is free to propagate down the stack.
For strict format compatibility, only the 8 basic named colors and 56 indexed colors should be allowed, but this change retains the assumed intended feature of the original code to also support the full set of colors specified in HSSFColor.HSSFColorPredefined. If this is undesirable, the dependency on HSSFColor should be dropped entirely.
This change is required in order to properly support named and indexed colors as part of cell format expressions in products using POI.
* Add some sanity tests
* Rename testNamedColorsExist to testNamedColors
* fix rebase corruption in CellFormatPart
* fix indentation in TestCellFormat
..by converting tabs to four spaces
* fix: replace .length() == 0 with .isEmpty for color name string
* fix Javadoc name parameter in CellFormatPart.getColor()
* chore: Tidy up CellFormatPart