Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Advance XWPF functionalities to POI 3.16 #1048

Merged
merged 28 commits into from
May 14, 2023
Merged

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Mar 19, 2023

The baseline of POI version was 3.15, done by #290.

So I ported all commits related to XWPF from 3.15 until POI 3.16.

9rnsr added 26 commits May 14, 2023 11:43
From:

> Fix bug 61787, which was introduced by bug 58067: Change how deleted content is detected to not incorrectly see too much text as deleted.

> https://svn.apache.org/viewvc?view=revision&revision=1819405

In NPOI, original 61787 issue was fixed in dba2bc3, but tika-792 test case was left unfixed and had broke.
In Java, CT_RPr.sz.val was BigInteger, so the value -1 * 2 == -2 could be stored successfully, and later
getFontSize() would return CT_RPr.sz.val / 2.0 == -1.

However, storing -2 CT_RPr.sz.val didn't seem appropriate in OOXML spec (the minimum value of ST_HpsMeasure is 2,
see https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oi29500/2d0bf5fa-cdf4-4e5f-9a49-d3b3e0a2a35c),
So I added *guard if* statement in FontSize setter to fix test failure in NPOI.
Bug 56076 - Add document protection with password support to XWPF
Bug 56077 - Add password hash function to HWPF

https://svn.apache.org/viewvc?view=revision&revision=1570750
Avoid two possible file-handle leaks when opening files fails with an exception
Make tests close resources properly to not spam the output when running with file-leak-detector

https://svn.apache.org/viewvc?view=revision&revision=1763485
#54916 - POI does not always read all the slides in pptx files

https://svn.apache.org/viewvc?view=revision&revision=1723966
- remove orphaned classes immediately, which are quite likely not used anymore
- deprecated the rest

https://svn.apache.org/viewvc?view=revision&revision=1774842
@9rnsr
Copy link
Contributor Author

9rnsr commented May 14, 2023

I fixed merge conflicts.

@tonyqus
Copy link
Member

tonyqus commented May 14, 2023

I'm thinking if I should merge this PR to master or a test branch. This looks to be a big PR

@9rnsr
Copy link
Contributor Author

9rnsr commented May 14, 2023

I'm paying attentions that any unit test failures will not increase by this PR.

The purpose of this PR is making NPOI closer to POI. As you see the log messages of each commits, these are corresponding to POI bug fixes. That's why I didn't split this PR into many small PRs.

Feel free to use test branch for the production quality of NPOI.

@tonyqus tonyqus changed the base branch from master to XWPF-Enhanced May 14, 2023 11:40
@tonyqus tonyqus merged commit 293f61f into nissl-lab:XWPF-Enhanced May 14, 2023
@9rnsr 9rnsr deleted the fixXWPF branch May 16, 2023 13:21
@tonyqus tonyqus modified the milestones: NPOI 2.6.2, NPOI 2.7.0 Jun 14, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants