]> source.dussan.org Git - poi.git/commitdiff
revert: [bug-66503] Add flag for Excel 4 macros in composite documents.
authorPJ Fanning <fanningpj@apache.org>
Sat, 18 Mar 2023 00:59:29 +0000 (00:59 +0000)
committerPJ Fanning <fanningpj@apache.org>
Sat, 18 Mar 2023 00:59:29 +0000 (00:59 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908462 13f79535-47bb-0310-9956-ffa450edef68

poi/src/main/java/org/apache/poi/hssf/record/BoundSheetRecord.java
poi/src/test/java/org/apache/poi/hssf/eventusermodel/TestHSSFEventFactory.java
test-data/spreadsheet/66503.xls [deleted file]

index 80602dcd2c2eafb8a01129f62e7814b84186c0ec..1e7ed0351ed2c883d479a2386e1a943865844d28 100644 (file)
@@ -39,7 +39,6 @@ public final class BoundSheetRecord extends StandardRecord {
     public static final short sid = 0x0085;
     private static final BitField hiddenFlag = BitFieldFactory.getInstance(0x01);
     private static final BitField veryHiddenFlag = BitFieldFactory.getInstance(0x02);
-    private static final BitField xl4Flag = BitFieldFactory.getInstance(0x100);
 
     private int field_1_position_of_BOF;
     private int field_2_option_flags;
@@ -178,33 +177,6 @@ public final class BoundSheetRecord extends StandardRecord {
         return veryHiddenFlag.isSet(field_2_option_flags);
     }
 
-    /**
-     * Is the sheet very hidden? Different from (normal) hidden
-     *
-     * @param veryHidden {@code true} if very hidden
-     */
-    public void setVeryHidden(boolean veryHidden) {
-        field_2_option_flags = veryHiddenFlag.setBoolean(field_2_option_flags, veryHidden);
-    }
-
-    /**
-     * Is the sheet an Excel 4 macro sheet?
-     *
-     * @return {@code true} if very hidden
-     */
-    public boolean isExcel4Macro() {
-        return xl4Flag.isSet(field_2_option_flags);
-    }
-
-    /**
-     * Is the sheet an Excel 4 macro sheet?
-     *
-     * @param xl4flag {@code true} if an excel 4 macro sheet
-     */
-    public void setExcel4Macro(boolean xl4flag) {
-        field_2_option_flags = xl4Flag.setBoolean(field_2_option_flags, xl4flag);
-    }
-
     /**
      * Converts a List of {@link BoundSheetRecord}s to an array and sorts by the position of their
      * BOFs.
index b907fdf02e72a474f1233e9a6aa6bc6c6488f94d..24fba3e49256dc10051072b8ac31f0b00c9b8293 100644 (file)
@@ -166,26 +166,4 @@ final class TestHSSFEventFactory {
             Biff8EncryptionKey.setCurrentUserPassword(null);
         }
     }
-
-    @Test
-    void testXL4Workbook() throws Exception {
-        // This document has a single Excel 4 macro in it
-        openSample("66503.xls");
-        assertEquals(records.stream()
-                .filter(r -> r instanceof BoundSheetRecord)
-                .map(r -> (BoundSheetRecord)r)
-                .filter(BoundSheetRecord::isExcel4Macro)
-                .count(), 1);
-    }
-
-    @Test
-    void testXL4Workbook_false() throws Exception {
-        // This document does not have an Excel 4 macro in it
-        openSample("42844.xls");
-        assertEquals(records.stream()
-                .filter(r -> r instanceof BoundSheetRecord)
-                .map(r -> (BoundSheetRecord)r)
-                .filter(BoundSheetRecord::isExcel4Macro)
-                .count(), 0);
-    }
 }
diff --git a/test-data/spreadsheet/66503.xls b/test-data/spreadsheet/66503.xls
deleted file mode 100644 (file)
index a018e6d..0000000
Binary files a/test-data/spreadsheet/66503.xls and /dev/null differ