Skip to content

Added scratchpad to support old office formats#5

Merged
gastaldi merged 2 commits into
quarkiverse:mainfrom
tpodg:main
Feb 4, 2023
Merged

Added scratchpad to support old office formats#5
gastaldi merged 2 commits into
quarkiverse:mainfrom
tpodg:main

Conversation

@tpodg

@tpodg tpodg commented Feb 4, 2023

Copy link
Copy Markdown
Contributor

Added additional dependency on poi-scratchpad, which supports older MS Office formats (as .doc).

@gastaldi gastaldi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic! Thank you so much!

void indexTransitiveDependencies(BuildProducer<IndexDependencyBuildItem> index) {
index.produce(new IndexDependencyBuildItem("org.apache.xmlbeans", "xmlbeans"));
index.produce(new IndexDependencyBuildItem("org.apache.poi", "poi-ooxml-full"));
index.produce(new IndexDependencyBuildItem("org.apache.poi", "poi-scratchpad"));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depending on the size, I wonder if it should be a different extension.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking if it would be possible to make support for different formats configurable with build time configuration? I believe quite some Quarkus features can be configured in such way...
For example scratchpad could be conditionally included? Or maybe even something more fine-grained, if this makes sense at all...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that's possible without a separate extension

@gastaldi

gastaldi commented Feb 4, 2023

Copy link
Copy Markdown
Member

PR is failing with:

Caused by: java.lang.NullPointerException
	at org.apache.poi.poifs.filesystem.FileMagic.prepareToCheckMagic(FileMagic.java:222)
	at org.apache.poi.hwpf.HWPFDocumentCore.verifyAndBuildPOIFS(HWPFDocumentCore.java:137)
	at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:223)
	at io.quarkiverse.poi.it.POIResource.doc(POIResource.java:64)

@tpodg

tpodg commented Feb 4, 2023

Copy link
Copy Markdown
Contributor Author

I will have a look. There is a bit of a struggle with native build on a mac due to awt…

@gastaldi

gastaldi commented Feb 4, 2023

Copy link
Copy Markdown
Member

I will have a look. There is a bit of a struggle with native build on a mac due to awt…

Yes, it's caused by:

I've opened the following PRs as an attempt to workaround it:

@gastaldi

gastaldi commented Feb 4, 2023

Copy link
Copy Markdown
Member

I created #9. Meanwhile, I'll merge this. Thank you!

@gastaldi
gastaldi merged commit 116ec0b into quarkiverse:main Feb 4, 2023
@gastaldi

gastaldi commented Feb 4, 2023

Copy link
Copy Markdown
Member

@all-contributors add @tpodg for code

@allcontributors

Copy link
Copy Markdown
Contributor

@gastaldi

I've put up a pull request to add @tpodg! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants