poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 60329] Avoid NPE when styleid is null
Date Wed, 02 Nov 2016 11:37:00 GMT

--- Comment #3 from Mark Murphy <jmarkmurphy@apache.org> ---
Can you attach the document in question? I want to see what Word does, though
that might be a different situation as Word could assign an ID and allow a user
to interactively assign the style to an element in the document. 

The applicable use cases in POI would be to read a document, update it, and
save it. Do we have (or want) a facility in POI to reference a style by some
means other than its ID. If so, we should go ahead and generate a new ID. I
suggest something like a negative 10 digit number. The spec also indicates that
if a document has two styles with the same ID, the first one is to be used. For
our case I think we should check for duplicate style ID's on load, and mangle
duplicates by appending a sequential integer (in parenthesis) to duplicates
unless the duplicate was caused by an auto-generated id. In that case the
auto-generated id should be re-generated.

You are receiving this mail because:
You are the assignee for the bug.
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

View raw message