]> source.dussan.org Git - poi.git/commitdiff
Bug 60656 - EMF image support in slideshows
authorAndreas Beeker <kiwiwings@apache.org>
Sun, 5 May 2019 01:05:58 +0000 (01:05 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Sun, 5 May 2019 01:05:58 +0000 (01:05 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1858628 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hemf/record/emfplus/HemfPlusRecordIterator.java
src/scratchpad/src/org/apache/poi/hwmf/record/HwmfEscape.java

index 3cf7076b3986333b02a171bf23d84a91bec82072..d30ba5d79c6b459282ed496155e5ad1faa2740a0 100644 (file)
@@ -51,8 +51,7 @@ public class HemfPlusRecordIterator implements Iterator<HemfPlusRecord> {
     public HemfPlusRecord next() {
         HemfPlusRecord toReturn = currentRecord;
         // add the size for recordId/flags/recordSize/dataSize = 12 bytes
-        final boolean isEOF = (limit == -1 || (leis.getReadIndex()-startIdx)+12 >= limit);
-        // (currentRecord instanceof HemfPlusMisc.EmfEof)
+        final boolean isEOF = (limit == -1 || (leis.getReadIndex()-startIdx)+12 > limit);
         currentRecord = isEOF ? null : _next();
         return toReturn;
     }
index 44623703503449eead7ad50b4211d650ee013945..a2a7082a3532b61e054894b1f5444187c4eeed53 100644 (file)
@@ -271,7 +271,7 @@ public class HwmfEscape implements HwmfRecord {
             }
 
             // A 32-bit unsigned integer that defines this record as a WMF Comment record.
-            int commentIdentifier = leis.readInt();
+            commentIdentifier = leis.readInt();
 
             if (commentIdentifier != EMF_COMMENT_IDENTIFIER) {
                 // there are some WMF implementation using this record as a MFCOMMENT or similar