You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2016/06/22 15:00:22 UTC

[Bug 59742] New: XSLFPictureData is missing TIFF support

https://bz.apache.org/bugzilla/show_bug.cgi?id=59742

            Bug ID: 59742
           Summary: XSLFPictureData is missing TIFF support
           Product: POI
           Version: 3.14-FINAL
          Hardware: PC
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: XSLF
          Assignee: dev@poi.apache.org
          Reporter: jens.popp@camline.com

The getType and getRelationForType methods of XSLFPictureData deliver null for
the TIFF format since version 3.14. The addPicutre in e.g. XMLSlideShow throws
an IllegalArgumentException if a TIFF image is passed. PictureData and
XSLFRelation have TIFF as image type.

-- 
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


[Bug 59742] XSLFPictureData is missing TIFF support

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59742

--- Comment #4 from Jens Popp <je...@camline.com> ---
Created attachment 33973
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33973&action=edit
JUnit Test

-- 
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


[Bug 59742] XSLFPictureData is missing TIFF support

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59742

Jens Popp <je...@camline.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Jens Popp <je...@camline.com> ---
Just adding 

    @Override
    public PictureType getType() {
...
        } else if (XSLFRelation.IMAGE_TIFF.getContentType().equals(ct)) {
            return PictureType.TIFF;
        } else {
            return null;
        }
    }

and

    /* package */ static XSLFRelation getRelationForType(PictureType pt) {
        switch (pt) {
            case EMF:
...
            case TIFF:
                return XSLFRelation.IMAGE_TIFF;
            default:
                return null;
        }
    }

Solves the problem

-- 
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


[Bug 59742] XSLFPictureData is missing TIFF support

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59742

Nick Burch <ap...@gagravarr.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #2 from Nick Burch <ap...@gagravarr.org> ---
Any chance you could create a very small and simple .pptx file with a tiff
image in, and upload it here along with some simple code that triggers this
exception? We can then use that to test your patch, and also to verify it stays
fixed into the future!

-- 
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


[Bug 59742] XSLFPictureData is missing TIFF support

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59742

--- Comment #3 from Jens Popp <je...@camline.com> ---
Created attachment 33972
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33972&action=edit
Tiff file for test

-- 
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


[Bug 59742] XSLFPictureData is missing TIFF support

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59742

Nick Burch <ap...@gagravarr.org> changed:

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

--- Comment #5 from Nick Burch <ap...@gagravarr.org> ---
Thanks! Unit test added, and patch applied in r1749732.

-- 
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