From: PJ Fanning Date: Wed, 9 Dec 2020 21:03:15 +0000 (+0000) Subject: [bug-64972] HSSFPictureData#getPictureType() should return 0 for unknown picture... X-Git-Tag: before_ooxml_3rd_edition~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=93c8c1540e3b04202289c942ef0d5621f4754312;p=poi.git [bug-64972] HSSFPictureData#getPictureType() should return 0 for unknown picture type (to be consistent with other implementations) git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884270 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFPictureData.java b/src/java/org/apache/poi/hssf/usermodel/HSSFPictureData.java index 0bac1af0f6..4b7ee376fb 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFPictureData.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFPictureData.java @@ -121,7 +121,8 @@ public class HSSFPictureData implements PictureData } /** - * @return the POI internal image type, -1 if not unknown image type + * @return the POI internal image type, 0 if not unknown image type (was -1 prior to 5.0.0 but + * that was inconsistent with other {@link PictureData} implementations) * * @see Workbook#PICTURE_TYPE_DIB * @see Workbook#PICTURE_TYPE_EMF @@ -145,7 +146,7 @@ public class HSSFPictureData implements PictureData case BLIP_DIB: return Workbook.PICTURE_TYPE_DIB; default: - return -1; + return 0; } } }