Uploaded image for project: 'ZK Spreadsheet'
  1. ZK Spreadsheet
  2. ZSS-386

Inserting a picture after deleting first picture causes an exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 3.0.0 RC
    • 3.0.0 RC
    • ZSS Component

      Problem Description:

      Inserting a picture after deleting first picture causes an exception

      Reproducing Steps:

      1. start a Spreadsheet
      2. insert first & second picture
      3. delete first picture
      4. insert third picture

      Expected:
      The third picture is inserted without errors.

      Actual:
      An exception is thrown.

      >>org.zkoss.poi.openxml4j.exceptions.PartAlreadyExistsException: A part with the name '/xl/media/image2.png' 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.zkoss.poi.openxml4j.opc.OPCPackage.createPart(OPCPackage.java:735)
      >> at org.zkoss.poi.openxml4j.opc.OPCPackage.createPart(OPCPackage.java:699)
      >> at org.zkoss.poi.POIXMLDocumentPart.createRelationship(POIXMLDocumentPart.java:350)
      >> at org.zkoss.poi.xssf.usermodel.XSSFWorkbook.addPicture(XSSFWorkbook.java:447)
      >> at org.zkoss.zssex.model.impl.DrawingManagerImpl.addPicture(DrawingManagerImpl.java:386)
      >> at org.zkoss.zss.model.sys.impl.XRangeImpl.addPicture(XRangeImpl.java:2332)
      >> at org.zkoss.zss.api.impl.RangeImpl.addPicture(RangeImpl.java:735)
      >> at org.zkoss.zss.api.SheetOperationUtil.addPicture(SheetOperationUtil.java:103)
      >> at org.zkoss.zss.api.SheetOperationUtil.addPicture(SheetOperationUtil.java:89)
      >> at org.zkoss.zss.api.SheetOperationUtil.addPicture(SheetOperationUtil.java:75)
      >> at org.zkoss.zss.essential.PictureComposer.add(PictureComposer.java:47)

            paowang paowang
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: