poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Burch <apa...@gagravarr.org>
Subject Re: Document validation hook in POIXMLDocument
Date Sun, 30 Oct 2016 10:37:57 GMT
On Sun, 30 Oct 2016, Mark Murphy wrote:
> Is there a validation hook in POIXMLDocument that will allow a document to
> validate itself before it writes itself to disk?

Maybe prepareForCommit() ? (Need to call superclass too!)

> Here is the use case. An XWPFDocument header or footer must contain at 
> least an empty paragraph. If a header or footer is created without a 
> paragraph, this hook would let me determine this, and just put one in 
> there rather than generating a corrupt document.

You could do it in prepareForCommit or commit of XWPFHeaderFooter


To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

View raw message