diff options
author | PJ Fanning <fanningpj@apache.org> | 2020-12-09 21:03:15 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2020-12-09 21:03:15 +0000 |
commit | 93c8c1540e3b04202289c942ef0d5621f4754312 (patch) | |
tree | bf0ae7be192614fa3214e9848144eea675032cf1 /src/java/org/apache/poi | |
parent | ea56d752f4c93af19a136601e6e28926a95cfe4e (diff) | |
download | poi-93c8c1540e3b04202289c942ef0d5621f4754312.tar.gz poi-93c8c1540e3b04202289c942ef0d5621f4754312.zip |
[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
Diffstat (limited to 'src/java/org/apache/poi')
-rw-r--r-- | src/java/org/apache/poi/hssf/usermodel/HSSFPictureData.java | 5 |
1 files changed, 3 insertions, 2 deletions
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; } } } |