DDS-GmbH / jocument

JVM based template engine for DOCX and XLSX.
MIT License
3 stars 1 forks source link

Extend `CustomWordPlaceholderData` to insert into header/footer #252

Closed AntonOellerer closed 5 months ago

AntonOellerer commented 5 months ago

Up until now, the processing flow when inserting a paragraph into a header or footer lead to a ClassCastException, as jocument assumed that the insertion happened into a XWPFDocument. To fix this, the abstract method for transforming a placeholder now expects an IBody element instead of a XWPFDocument, where IBody is an interface which describes the possible insertion methods. This allows jocument to insert paragraphs into any kind of xwpf part.