]> source.dussan.org Git - poi.git/commitdiff
[bug-64972] HSSFPictureData#getPictureType() should return 0 for unknown picture...
authorPJ Fanning <fanningpj@apache.org>
Wed, 9 Dec 2020 21:03:15 +0000 (21:03 +0000)
committerPJ Fanning <fanningpj@apache.org>
Wed, 9 Dec 2020 21:03:15 +0000 (21:03 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884270 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hssf/usermodel/HSSFPictureData.java

index 0bac1af0f6f24349a0115623ea5a7b65865bacc0..4b7ee376fb6a47d92692896ac3e17f881ea57e36 100644 (file)
@@ -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;
         }        
     }
 }