]> source.dussan.org Git - poi.git/commitdiff
Replace magic constant use of Escher Blip End type ID with reference
authorMarius Volkhart <mariusvolkhart@apache.org>
Sat, 27 Feb 2021 18:33:56 +0000 (18:33 +0000)
committerMarius Volkhart <mariusvolkhart@apache.org>
Sat, 27 Feb 2021 18:33:56 +0000 (18:33 +0000)
Instead of referring to the magic constant 0xF117, reference the value in the EscherRecordTypes enum.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886988 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java
src/scratchpad/src/org/apache/poi/hwpf/model/PICFAndOfficeArtData.java

index b489605827eaec4c2727653c70b6ad4796072243..4ebe43518faf33033615df1e40f98444f64cfdd1 100644 (file)
@@ -381,7 +381,8 @@ public final class HSLFSlideShowImpl extends POIDocument implements Closeable {
 
                 // When parsing the BStoreDelay stream, [MS-ODRAW] says that we
                 //  should terminate if the type isn't 0xf007 or 0xf018->0xf117
-                if (!((type == EscherRecordTypes.BSE.typeID) || (type >= EscherRecordTypes.BLIP_START.typeID && type <= 0xf117))) {
+                if (!((type == EscherRecordTypes.BSE.typeID) ||
+                        (type >= EscherRecordTypes.BLIP_START.typeID && type <= EscherRecordTypes.BLIP_END.typeID))) {
                     break;
                 }
 
index 99eda8228f8043c71e9f9b0a1c137ee5ec0a7e90..b778fea19f18459e479117be6dba3e2292ca1109 100644 (file)
@@ -74,7 +74,7 @@ public class PICFAndOfficeArtData
                     dataStream, offset );
             if ( nextRecord.getRecordId() != EscherRecordTypes.BSE.typeID
                     && ( nextRecord.getRecordId() < EscherRecordTypes.BLIP_START.typeID || nextRecord
-                            .getRecordId() > (short) 0xF117 ) )
+                            .getRecordId() > EscherRecordTypes.BLIP_END.typeID ) )
                 break;
 
             int blipRecordSize = nextRecord.fillFields( dataStream, offset,