[Bug 65120] New: [PATCH] PartAlreadyExistsException when creating cell comments

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 65120] New: [PATCH] PartAlreadyExistsException when creating cell comments

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=65120

            Bug ID: 65120
           Summary: [PATCH] PartAlreadyExistsException when creating cell
                    comments
           Product: POI
           Version: 4.1.2-FINAL
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: ---

When creating a new VML drawing (as part of creating a cell comment), the
number assigned to the part file only takes the current number of parts into
account, but this "ID" might already been taken if one of the parts has been
previously removed (i.e. by deleting a sheet).

org.apache.poi.openxml4j.exceptions.PartAlreadyExistsException: A part with the
name '/xl/drawings/vmlDrawing2.vml' already exists : Packages shall not contain
equivalent part names and package implementers shall neither create nor
recognize packages with equivalent part names. [M1.12]
        at
org.apache.poi.openxml4j.opc.OPCPackage.createPart(OPCPackage.java:840)
        at
org.apache.poi.openxml4j.opc.OPCPackage.createPart(OPCPackage.java:803)
        at
org.apache.poi.ooxml.POIXMLDocumentPart.createRelationship(POIXMLDocumentPart.java:586)
        at
org.apache.poi.xssf.usermodel.XSSFSheet.getVMLDrawing(XSSFSheet.java:606)
        at
org.apache.poi.xssf.usermodel.XSSFDrawing.createCellComment(XSSFDrawing.java:371)
        at
org.apache.poi.xssf.usermodel.XSSFDrawing.createCellComment(XSSFDrawing.java:78)

When assigning the number to a new part, it must be checked for uniqueness.

The attached patch uses the same solution in the XSSFSheet.getVMLDrawing()
method as already implemented in XSSFSheet.createDrawingPatriarch().

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 65120] [PATCH] PartAlreadyExistsException when creating cell comments

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=65120

--- Comment #1 from Raúl Wegmann <[hidden email]> ---
Created attachment 37724
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37724&action=edit
patch including test

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 65120] [PATCH] PartAlreadyExistsException when creating cell comments

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=65120

Raúl Wegmann <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
                 OS|                            |All

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 65120] [PATCH] PartAlreadyExistsException when creating cell comments

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=65120

--- Comment #2 from PJ Fanning <[hidden email]> ---
thanks - applied using r1886143 (the gradle change has since been reverted)

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 65120] [PATCH] PartAlreadyExistsException when creating cell comments

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=65120

PJ Fanning <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]