https://issues.apache.org/bugzilla/show_bug.cgi?id=55566

            Bug ID: 55566
           Summary: [PATCH] Accept 0-based ID values
           Product: POI
           Version: 3.9
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XWPF
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 30854
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30854&action=edit
Patch extending the accepted identifier range to include 0

XWPF documents using identifiers starting with 0 will currently fail with:
"IllegalArgumentException: Value for parameter 'id' was out of bounds".

This is due to the IdentifierManager being initialized for IDs starting at 1.

Documents from LibreOffice (at least 4.0.4.2 and 4.1.1) may use IDs starting at
0. (AFAIU IDs get used for objects embedded into the documents, i.e. pictures.)

See also
http://stackoverflow.com/questions/18756484/getting-illegalarguementexception-value-for-parameter-id-was-out-of-bounds

With the attached trivial patch, POI/XWPF worked correctly for such documents
here.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

Reply via email to