Skip to content

Releases: verronpro/office-stamper

2.7.0

16 Dec 19:52
Compare
Choose a tag to compare

What's Changed

Features

  • Add the PostProcessor concept to be able to add cleaners or summaries at stamping finish.
  • #68 Filled to displayXXXIf panoply with:
    • displayParagraphIf(boolean), displayParagraphIfPresent(object) and displayParagraphIfAbsent(object)
    • displayTableRowIf(boolean), displayTableRowIfPresent(object) and displayTableRowIfAbsent(object)
    • displayTableIf(boolean), displayTableIfPresent(object) and displayTableIfAbsent(object)
    • displayWordsIf(boolean), displayWordsIfPresent(object) and displayWordsIfAbsent(object)
    • displayDocPartIf(boolean), displayDocPartIfPresent(object) and displayDocPartIfAbsent(object)
  • The two provided evaluation context configurer now include the classic Get Accessor and the Map Accessor, so the object used as context can be much more flexible.
    • ie. ${name} can now refer to an object getName() method or to a map get("name") value.

Bugfixes

  • BREAKING - Paragraph#getComment now returns a Collection instead of an Optional, because one paragraph can have several comments.
    Fixes a bug when commenting several groups of runs by different comments in a single paragraph.
  • #69 Office-stamper is now aware of Footnotes and Endnotes, it only cleans orphaned notes with standardWithPreprocessing configuration for now, but probably going to run the stamping as well in future versions.
  • #510 All repeatXXX can now accept Iterable as input

Dependencies

  • Bump org.docx4j:docx4j-core from 11.5.0 to 11.5.1

  • Bump org.docx4j:docx4j-JAXB-ReferenceImpl from 11.5.0 to 11.5.1

  • Bump org.springframework:spring-expression from 6.1.14 to 6.2.1

  • Bump org.springframework:spring-context from 6.1.14 to 6.2.1

Continuous Integration

  • Bump org.junit.jupiter:junit-jupiter from 5.11.3 to 5.11.4

  • Bump org.pitest:pitest-maven from 1.17.0 to 1.17.3

  • Bump org.apache.maven.plugins:maven-surefire-plugin from 3.5.1 to 3.5.2

  • Bump org.apache.maven.plugins:maven-site-plugin from 3.20.0 to 3.21.0

  • Bump org.apache.maven.plugins:maven-project-info-reports-plugin from 3.7.0 to 3.8.0

  • Bump org.apache.maven.plugins:maven-surefire-report-plugin from 3.5.1 to 3.5.2

  • Bump org.apache.maven.reporting:maven-reporting-exec from 2.0.0-M14 to 2.0.0

  • Bump org.asciidoctor:asciidoctor-maven-plugin from 3.1.0 to 3.1.1

  • Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.10.1 to 3.11.2

  • Bump org.apache.maven.plugins:maven-gpg-plugin from 3.2.5 to 3.2.7

Refactorings

  • Removed the old ObjectDeleter utility class to use mostly WmlUtils#remove method instead.
  • All Lang info is removed with standardWithPreprocessing configuration now.

Tests

  • Create the ObjectContextFactory, and the MapContextFactory to test all use cases with POJO Beans and Map equally.
  • Fix a bug in Locale when some test failed
  • Move processors-specific test outside the DefaultTest class
  • #114 added a test to trace this still unresolved issue.
  • Word 2 String now includes comments, endnotes and footnotes
  • String 2 Word now includes comments

Full Changelog: v2.6.0...v2.7.0

2.6.0

09 Nov 12:31
Compare
Choose a tag to compare

Features

  • It is now possible to add custom function to the Spel context in a simpler way. Try using OfficeStamperConfiguration.addCustomFunction methods.
  • Added the pro.verron.officestamper.utils package to provide useful and common elements for core, preset, test and users.
  • Deprecated the Paragraph wrapper now can provide a bit more advanced capability on inner P, don’t recommend calling getP() anymore.

Dependencies

  • Change java target from 17 to 21
  • Bump org.springframework:spring-expression from 6.1.12 to 6.1.14
  • Bump org.springframework:spring-context from 6.1.12 to 6.1.14

Continuous Integration

  • Removed dependabot analysis
  • Bump org.apache.maven.plugins:maven-gpg-plugin from 3.2.5 to 3.2.7
  • Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.10.0 to 3.10.1
  • Bump org.apache.maven.plugins:maven-surefire-plugin from 3.5.0 to 3.5.1
  • Bump org.apache.maven.reporting:maven-surefire-report-plugin from 3.5.0 to 3.5.1
  • Bump org.apache.maven.plugins:maven-site-plugin from 3.20.0 to 3.21.0
  • Bump org.apache.maven.plugins:maven-project-info-reports-plugin from 3.7.0 to 3.8.0
  • Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.10.0 to 3.10.1
  • Bump org.apache.maven.reporting:maven-reporting-exec from 2.0.0-M14 to 2.0.0
  • Bump org.pitest:pitest-maven from 1.16.3 to 1.17.0
  • Bump org.asciidoctor:asciidoctor-maven-plugin from 3.0.0 to 3.1.0
  • Bump org.junit.jupiter:junit-jupiter from 5.11.0 to 5.11.3

Refactorings

  • CommentProcessor to now be setup with a P, run and placeholder with a ProcessorContext instead.
  • Cleanup of malformed comments has moved to a PreProcessor instead of done on the fly during processing.
  • Do a step toward treating Comment in the same way as Placeholder.
  • Deprecated CommentProcessor to now be setup with a Paragraph that wraps and provides features around the docx4j P.
  • Deprecated The Image preset object now deprecate getMaxWidth and getImageBytes.
  • BREAK Removed DocxDocument.commentsPart method.
  • BREAK DocxPart.streamParagraphs method now returns the Paragraph wrapper, instead of docx4j P.

Tests

  • Improved test names,
  • Improved Word to string representation to better differentiate paragraph, run and cell styles.
  • Remove exotic characters from string representation of Word documents.
  • Section break and page break are more explicit in string representation of Word documents.

Full Changelog: v2.5.0...v2.6.0

2.5.0

23 Sep 01:39
Compare
Choose a tag to compare

What's Changed

Features

  • Add a way to set an ExceptionResolver to Office stamper, with OfficeStamperConfiguration#setExceptionResolver(ExceptionResolver)
    and allows users to handle errors programmatically as was expressed in the old https://github.com/verronpro/docx-stamper/issues/65[Issue #65]
    • Added an ExceptionsResolvers class providind default implementations
    • It deprecates setFailOnUnresolvedExpression(boolean), unresolvedExpressionsDefaultValue(String), replaceUnresolvedExpressions(boolean) and leaveEmptyOnExpressionError(boolean).

Dependencies

  • Bumped org.docx4j:docx4j-core from version 11.4.11 to 11.5.0
  • Bumped org.springframework:spring-context from version 6.1.11 to 6.1.12.

Continuous Integration

  • Added Renovate settings to improve over dependabot
  • Follow best practices for maven-gpg-plugin
  • Removed GitHub .devcontainer settings
  • Bumped actions/configure-pages to v5
  • Bumped org.pitest:pitest-maven to 1.16.3
  • Bumped org.apache.maven.plugins:maven-javadoc-plugin to 3.10.0
  • Bumped org.apache.maven.plugins:maven-gpg-plugin to 3.2.5
  • Bumped org.apache.maven.plugins:maven-site-plugin to 3.20.0
  • Bumped org.apache.maven.plugins:maven-project-info-reports-plugin to 3.7.0
  • Bumped org.junit.jupiter:junit-jupiter to 5.11.0

Refactorings

  • Improved some logs related to unresolved errors
  • Improved comments collections

Tests

  • Tests can now differentiate tables with their asciidoc-like representation
  • Tests can now differentiate when paragraph style has the cnfStyle property set
  • Quite a few tests have been remodeled to decrease their verbosity
  • Added a regression test for https://github.com/verronpro/docx-stamper/issues/64[Issue #64]

== {proj}/v2.4.0[v2.4.0]

=== Features

  • Office-stamper can now format all java.time objects directly from standard configuration (issue #411), see engine/src/test/java/pro/verron/officestamper/test/DateFormatTests.java
  • Office-stamper can now resolve multiline placeholders (not multi paragraph, just with linebreaks)(issue #422)
  • Office-stamper proven can resolve custom function inside comments expressions (issue #56)
  • Office-stamper proven can resolve displayParagraphIf inside table with repeatTableRow (issue #52)

=== Dependencies

  • Bumped org.springframework:spring-expression from version 6.1.11 to 6.1.12.

=== Documentation

  • The release notes have been separated into their own file for better organization and easier access.
  • Deprecated Paragraph#replaceAll and Paragraph#contains from api package as it was a remnant of a core fix.

=== Tests

  • Tests can now better differentiate types of breaks in word documents
  • Fixed a regression in tests about whitespaces manipulation

Full Changelog: v2.4.0...v2.5.0

2.4.0

04 Sep 17:20
a896d5c
Compare
Choose a tag to compare

What's Changed

Features

  • Office-stamper can now format all java.time objects directly from standard configuration #411, see DateFormatTests.java
  • Office-stamper can now resolve multiline placeholders (not multi paragraph, just with linebreaks) #422
  • Office-stamper proven can resolve custom function inside comments expressions #56
  • Office-stamper proven can resolve displayParagraphIf inside table with repeatTableRow #52

Dependencies

  • Bumped org.springframework:spring-expression from version 6.1.11 to 6.1.12.

Documentation

  • The release notes have been separated into their own file for better organization and easier access.
  • Deprecated Paragraph#replaceAll and Paragraph#contains from api package as it was a remnant of a core fix.

Tests

  • Tests can now better differentiate types of breaks in word documents
  • Fixed a regression in tests about whitespaces manipulation

Full Changelog: v2.3.0...v2.4.0

2.3.0

10 Aug 02:08
c019949
Compare
Choose a tag to compare

What's Changed in Release 2.3

  • by @dependabot in #404 and #410

    • bump org.springframework:spring-expression & org.springframework:spring-context from 6.1.10 to 6.1.11
  • by @caring-coder in #405

    • feat: office-stamper can now type resolve images inside footers and header (issue #53)
      • introduced the DocxPart type to wrap the docx4j WordprocessingMLPackage and specify a working sub Part
      • MAY BREAK: updated references to WordprocessingMLPackage by DocxPart in API. A default implementation has been made to try for supporting users existing implementations, but switching to new version is recommended
      • MAY BREAK: the order of resolution has been modified, nothing should have broke, but please check if you had specific expectations in your custom implementations
    • doc: added linebreak replacement feature mention in readme
    • test: added a test for linebreak replacement feature inside tables
    • test: introduce the makeResource method, that allow generating word document directly from textual representation
    • test: removed integration subfolder in test and moved content to main test folder
    • test: fixed an conf error in log level settings for tests

Full Changelog: v2.2.0...v2.3.0

2.2.0

14 Jul 11:43
b664fd7
Compare
Choose a tag to compare

What's Changed

  • feat: add new maven extension for caching build by @caring-coder in #389
  • Release 2.2.0 by @caring-coder in #390
    • Fix an issue when computing docx run length, to avoid potential bugw
    • Now support forms control text replacement from proposal #286
    • StampTable are now Value objects
    • The test stringificqtion now add support for testing headers and footers
    • Some test templates have been simplified
  • chore(deps): bump dependencies

Full Changelog: v2.1.0...v2.2.0

2.1.0

05 Jun 11:06
49f8407
Compare
Choose a tag to compare

What's Changed

  • feat: Add v2.1.0 release notes to README by @caring-coder in #386
  • Miscellaneous updates by @caring-coder in #361
    ** Update Readme howto to document the last API changes
    ** Update the mechanism to walk through a Word document
    ** First step to the separation of resolvers in two: the future 'engine resolver' (that will wrap the template features) and 'context resolver' (that will wrap the actual stamped data)
    ** Update exception management and messages
    ** The raw stamper does not carry any comment processors by default
    ** Bump dependencies org.springframework:spring-expression to 6.1.8
    ** Update documentation to be more Github-friendly

Full Changelog: v2.0.1...v2.1.0

2.0.1

03 Jun 16:30
076970f
Compare
Choose a tag to compare

What's Changed

  • fix: Update office-stamper, engine, examples version to 2.0.1 and make OfficeStamper engine module independent from root pom by @caring-coder in #384
  • refactor: update project references from 'Office-Stamper' to 'OfficeStamper' by @caring-coder in #384

Full Changelog: v2.0.0...v2.0.1

2.0.0

17 May 18:08
367b16c
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.6.9...v2.0.0

1.6.9

17 May 13:32
6d392a5
Compare
Choose a tag to compare

What's Changed

  • fix a regression for unresolved type exception / failOnUnresolvedExpression in 1.6.8 #343

Full Changelog: v1.6.8...v1.6.9