PJ Fanning
9d37011683
workaround stray whitespace in sst index ( #874 )
...
* tolerate whitespace in ints
* try to workaround stray whitespace in sst index
* Update TestAllFiles.java
2025-08-05 12:00:54 +01:00
PJ Fanning
b50ce609ca
check xwpf node depth ( #869 )
...
* check xwpf node depth
* Update TestAllFiles.java
* Update TestAllFiles.java
2025-08-01 20:28:05 +01:00
PJ Fanning
8d71c1f2ff
add poifs test
2025-07-30 18:54:05 +01:00
Jacobo Aragunde Pérez
cceccc4bae
Support all possible alignment values for docx tables. ( #848 )
...
Besides the start/center/end values specified in the OOXML standard,
Word also uses "left" and "right" as values. We need to support this
to prevent POI code from crashing with such documents.
Fixes: https://bz.apache.org/bugzilla/show_bug.cgi?id=69744
2025-07-17 12:11:46 +01:00
Jacobo Aragunde Pérez
73b2874824
Add getters and setters for XWPFTable indentation. ( #843 )
...
* Add getters and setters for XWPFTable indentation.
The element tblPr->tblInd represents "table indent from leading margin".
It specifies the indentation which shall be added before the leading
edge of the current table in the document (the left edge in a
left-to-right table, and the right edge in a right-to-left table). This
indentation should shift the table into the text margin by the specified
amount.
This value is specified in the units applied via its type attribute. Any
width value of type pct or auto for this element shall be ignored.
If this element is omitted, then the table shall inherit the table
indentation from the associated table style. If table indentation is
never specified in the style hierarchy, no indentation shall be added to
the parent table. If the resulting justification on any table row is not
left, then this property shall be ignored.
To implement this property, we included a getter and a setter for the
property value, and another couple of getter/setter for the existence
(and validity) or absence of the property itself, for clients to know
they must fall back to the table style.
* Address reviewer comments.
2025-07-15 10:05:17 +01:00
Jacobo Aragunde Pérez
6d8f1901dc
Allow null values in XWPFParagraph.get/setAlignment(). ( #829 )
...
* Allow null values in XWPFParagraph.get/setAlignment().
A null value in this field would indicate that the paragraph should
follow the alignment provided by the style hierarchy.
Fixes: https://bz.apache.org/bugzilla/show_bug.cgi?id=69720
* Revert getAlignment() and implement isAlignmentSet() instead.
* Replace test case file.
* Implement XWPFParagraph.getTCPPr(create).
It lets the caller choose if a new PPr should be created in case it
doesn't exist.
* use getCTPPr(boolean)
* compile issue
---------
Co-authored-by: PJ Fanning <pjfanning@users.noreply.github.com>
2025-07-09 20:00:14 +01:00
PJ Fanning
c01228c331
[bug-69697] HSLF getPictureData can return null for some pictures
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926414 13f79535-47bb-0310-9956-ffa450edef68
2025-06-14 14:14:15 +00:00
PJ Fanning
9a6bd3902d
[bug-69628] add test case
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924643 13f79535-47bb-0310-9956-ffa450edef68
2025-03-26 20:52:10 +00:00
Dominik Stadler
80fd35198d
Bug 66425: Avoid exceptions found via poi-fuzz
...
Prevent too deep nesting by throwing an exception
instead of just not parsing more nesting-levels as
this still caused OOMs.
Allow to adjust the limit via static setter as elsewhere
to give users a chance to parse very complicated files
if really necessary.
https://issues.oss-fuzz.com/issues/42528505
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923277 13f79535-47bb-0310-9956-ffa450edef68
2025-01-20 18:40:32 +00:00
Dominik Stadler
dd647b5d2d
Bug 66425: Avoid exceptions found via poi-fuzz
...
Prevent NullPointerException
Fixes https://issues.oss-fuzz.com/issues/389724915
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923276 13f79535-47bb-0310-9956-ffa450edef68
2025-01-20 18:40:27 +00:00
Dominik Stadler
6befe2ad52
Bug 66425: Avoid exceptions found via poi-fuzz
...
Prevent a NullPointerException
Fixes https://issues.oss-fuzz.com/issues/42537720
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923061 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 09:24:20 +00:00
Dominik Stadler
76617e9793
Bug 66425: Avoid exceptions found via poi-fuzz
...
Prevent a NullPointerException
Fixes https://issues.oss-fuzz.com/issues/42537550
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923060 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 09:24:14 +00:00
Dominik Stadler
57afb34a18
Bug 66425: Avoid exceptions found via poi-fuzz
...
Prevent a NullPointerException
Fixes https://issues.oss-fuzz.com/issues/379574870
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923059 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 09:24:08 +00:00
Dominik Stadler
edcbd87360
Bug 66425: Avoid exceptions found via poi-fuzz
...
Prevent a NullPointerException
Fixes https://issues.oss-fuzz.com/issues/42538163
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923058 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 09:24:03 +00:00
Dominik Stadler
534d24dc74
Add test for bug 58805
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923055 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 09:23:50 +00:00
Dominik Stadler
c1f52674fd
Bug 69315: HSMF: At least continue processing properties after multivalued properties
...
Currently processing stops at multivalued properties.
This at least continues processing, so other properties are processed properly.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923051 13f79535-47bb-0310-9956-ffa450edef68
2025-01-11 09:23:29 +00:00
PJ Fanning
edb9aeaca5
[github-733] Fix rate order in Mirr function. Thanks to Aleksandrs Jansons. This closes #733
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922095 13f79535-47bb-0310-9956-ffa450edef68
2024-11-25 20:48:45 +00:00
PJ Fanning
a139a17909
[github-692] D* functions are incompatible with the diamond operator. Thanks to Luk Spiewak. This closes #692
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1920817 13f79535-47bb-0310-9956-ffa450edef68
2024-09-20 20:20:34 +00:00
Dominik Stadler
0559accac4
Bug 66425: Avoid exceptions found via poi-fuzz
...
Prevent a possible NullPointerException
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=70467
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919562 13f79535-47bb-0310-9956-ffa450edef68
2024-07-28 11:02:18 +00:00
PJ Fanning
c05eebf415
add chinese hssf test
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919373 13f79535-47bb-0310-9956-ffa450edef68
2024-07-19 14:19:35 +00:00
PJ Fanning
889ba37ae9
remove 22742.xls
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919372 13f79535-47bb-0310-9956-ffa450edef68
2024-07-19 13:36:06 +00:00
Dominik Stadler
0dea4a301c
Bug 66425: Avoid exceptions found via poi-fuzz
...
Processing formats uses regular expressions. Very complex formats
can recurse very deeply and thus can cause StackOVerflows depending
on the used stack-size.
In order to handle this a bit more gracefully, we now catch this
and report a better exception with details about the parsed
format and potential mitigation.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66137
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919342 13f79535-47bb-0310-9956-ffa450edef68
2024-07-18 07:09:32 +00:00
Dominik Stadler
09fbfd5be4
Bug 66425: Avoid exceptions found via poi-fuzz
...
Avoid a possible OutOfMemoryException with many child-records
This avoids having too many children in EscherRecords, the limit of
100_000 is arbitrarily chosen and can be adjusted if needed
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62924 and maybe others
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919272 13f79535-47bb-0310-9956-ffa450edef68
2024-07-16 05:26:42 +00:00
Dominik Stadler
2582e5e0c1
Bug 66425: Avoid exceptions found via poi-fuzz
...
Avoid a possible StackOverflowException
This adds support of counting of the "nesting level" into the base
EscherRecord and thus makes this existing limitation much more effective
as it kicks in for more types of nested records.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66374
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919256 13f79535-47bb-0310-9956-ffa450edef68
2024-07-15 13:02:43 +00:00
Dominik Stadler
e2044c958b
Bug 66425: Avoid exceptions found via poi-fuzz
...
Prevent too much memory usage
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=67413
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919237 13f79535-47bb-0310-9956-ffa450edef68
2024-07-15 05:41:04 +00:00
Dominik Stadler
a042165133
Bug 66425: Avoid exceptions found via poi-fuzz
...
Prevent a NullPointerException
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=68104
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919215 13f79535-47bb-0310-9956-ffa450edef68
2024-07-14 11:26:56 +00:00
Dominik Stadler
fc17f113d8
Bug 66425: Avoid exceptions found via poi-fuzz
...
Prevent a ClassCastException
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66089
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919214 13f79535-47bb-0310-9956-ffa450edef68
2024-07-14 11:26:50 +00:00
Dominik Stadler
7601beb592
Bug 66425: Avoid exceptions found via poi-fuzz
...
Prevent a NullPointerException
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=70273
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919213 13f79535-47bb-0310-9956-ffa450edef68
2024-07-14 11:26:43 +00:00
Dominik Stadler
148ac23c0d
List expected failures in stress.xls instead of fully excluding them
...
We list expected failures in stress.xls to verify that
the error message is correct and no unexpected exception
is introduced
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919212 13f79535-47bb-0310-9956-ffa450edef68
2024-07-14 11:26:38 +00:00
PJ Fanning
302b43641f
add negative test
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919065 13f79535-47bb-0310-9956-ffa450edef68
2024-07-09 14:43:03 +00:00
PJ Fanning
bfd4645a72
add test case
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919064 13f79535-47bb-0310-9956-ffa450edef68
2024-07-09 14:16:47 +00:00
Dominik Stadler
397cee3a12
Bug 66425: Avoid exceptions found via poi-fuzz
...
Prevent a NullPointerException
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=69450
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918985 13f79535-47bb-0310-9956-ffa450edef68
2024-07-07 06:40:31 +00:00
PJ Fanning
6e07ce50dd
add dataformatter test
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918819 13f79535-47bb-0310-9956-ffa450edef68
2024-07-02 09:42:02 +00:00
PJ Fanning
8a37350e94
rename file
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918803 13f79535-47bb-0310-9956-ffa450edef68
2024-07-01 22:50:04 +00:00
PJ Fanning
f8a990051b
throw exception if xlsx contains duplicate file names
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918800 13f79535-47bb-0310-9956-ffa450edef68
2024-07-01 21:36:31 +00:00
Dominik Stadler
3f243f65ab
Change one exception to warning-log to avoid regressions in mass-tests
...
This avoids "breaking" a few documents which could be opened before.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918118 13f79535-47bb-0310-9956-ffa450edef68
2024-06-02 11:31:31 +00:00
Dominik Stadler
329a659739
Avoid NPE and improve error message when saving a package-part fails
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918117 13f79535-47bb-0310-9956-ffa450edef68
2024-06-02 09:39:57 +00:00
PJ Fanning
af5d4b9f22
[bug-69021] add guard around cast
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917779 13f79535-47bb-0310-9956-ffa450edef68
2024-05-17 10:00:28 +00:00
Dominik Stadler
3800aa5418
Bug 66425: Avoid exceptions found via poi-fuzz
...
Avoid a possible NullPointerException
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=67922
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917269 13f79535-47bb-0310-9956-ffa450edef68
2024-04-22 13:32:30 +00:00
Dominik Stadler
5813a6d2d3
One integration-test file now fails in "additional" as well
...
Not sure which change introduced this as it worked initially...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917223 13f79535-47bb-0310-9956-ffa450edef68
2024-04-20 16:12:36 +00:00
Dominik Stadler
d4bcc2b3bb
Bug 66425: Avoid exceptions found via poi-fuzz
...
Prevent a NullPointerException
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65448
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917175 13f79535-47bb-0310-9956-ffa450edef68
2024-04-20 07:53:40 +00:00
Dominik Stadler
8c101982e0
Integration tests: Add writing out the document
...
This will cover some more functionality
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917174 13f79535-47bb-0310-9956-ffa450edef68
2024-04-20 07:53:35 +00:00
PJ Fanning
eebb3717e0
[bug-63189] support hyperlink relationships. Thanks to Ohyoung Kwon. This closes #617
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917134 13f79535-47bb-0310-9956-ffa450edef68
2024-04-19 09:23:54 +00:00
Dominik Stadler
9453fa908a
Bug 66425: Avoid exceptions found via poi-fuzz
...
Use correct default date-format, add some tests
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66381
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917070 13f79535-47bb-0310-9956-ffa450edef68
2024-04-17 18:15:46 +00:00
Dominik Stadler
c4e8388742
Bug 66425: Avoid exceptions found via poi-fuzz
...
Prevent a NullPointerException
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66386
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917069 13f79535-47bb-0310-9956-ffa450edef68
2024-04-17 18:15:38 +00:00
Dominik Stadler
51637fcc43
Bug 66425: Avoid exceptions found via poi-fuzz
...
Prevent a few NullPointerException
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66400
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917068 13f79535-47bb-0310-9956-ffa450edef68
2024-04-17 18:15:33 +00:00
PJ Fanning
1c156c4005
[bug-68703] fix issue with XSLFTextRuns in XSLFTableCells
...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916105 13f79535-47bb-0310-9956-ffa450edef68
2024-03-04 12:49:02 +00:00
Dominik Stadler
a27029d1af
Bug 66425: Avoid exceptions found via poi-fuzz
...
Prevent NullPointerException
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64212
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915006 13f79535-47bb-0310-9956-ffa450edef68
2023-12-30 19:39:42 +00:00
Dominik Stadler
d54c8f16e6
Bug 66425: Avoid exceptions found via poi-fuzz
...
Prevent NullPointerException
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64495
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915005 13f79535-47bb-0310-9956-ffa450edef68
2023-12-30 19:39:36 +00:00
Dominik Stadler
94ace1c4b0
Bug 66425: Avoid exceptions found via poi-fuzz
...
Prevent NullPointerException
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64943
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915004 13f79535-47bb-0310-9956-ffa450edef68
2023-12-30 19:39:31 +00:00