On Wed, 6 Feb 2013, Mark Kimsal wrote:
If this is supposed to work, then I've found a bug.

POIXMLProperties opcprops = new POIXMLProperties(opc)
CustomerProperties cust = opcprops.getCustomProperties();

//change custom properties, no committing

XWPFDocument doc = new XWPFDocument(opc);
doc.write(outputstream);

Nope, I'd expect that to break. You should either work entirely on the OPC layer (without touching POIXMLDocument based classes like XWPFDocument), or at the POIXMLDocument level (eg ask XWPFDocument for the properties objects to change)

Your code ends up with two different objects holding an in-memory representation of the properties, and changes to one aren't see by the other. At write-out time, one will win, one will loose!

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to