View | Details | Raw Unified | Return to bug 57459
Collapse All | Expand All

(-)src/ooxml/testcases/org/apache/poi/xssf/streaming/TestOutlining.java (+12 lines)
Lines 152-157 Link Here
152
        sxssfSheet.createRow(2);
152
        sxssfSheet.createRow(2);
153
        sxssfSheet.createRow(3);
153
        sxssfSheet.createRow(3);
154
        sxssfSheet.createRow(4);
154
        sxssfSheet.createRow(4);
155
        sxssfSheet.createRow(5);
155
        sxssfSheet.groupRow(1, 3);
156
        sxssfSheet.groupRow(1, 3);
156
        sxssfSheet.groupRow(2, 3);
157
        sxssfSheet.groupRow(2, 3);
157
158
Lines 160-165 Link Here
160
        assertEquals(2, sxssfSheet.getRow(2).getOutlineLevel());
161
        assertEquals(2, sxssfSheet.getRow(2).getOutlineLevel());
161
        assertEquals(2, sxssfSheet.getRow(3).getOutlineLevel());
162
        assertEquals(2, sxssfSheet.getRow(3).getOutlineLevel());
162
        assertEquals(0, sxssfSheet.getRow(4).getOutlineLevel());
163
        assertEquals(0, sxssfSheet.getRow(4).getOutlineLevel());
164
        assertEquals(0, sxssfSheet.getRow(5).getOutlineLevel());
165
        
166
        // add tests for direct setting - add row 4 to deepest group
167
        ((SXSSFSheet)sxssfSheet).setRowOutlineLevel(4, 2);
168
        assertEquals(0, sxssfSheet.getRow(0).getOutlineLevel());
169
        assertEquals(1, sxssfSheet.getRow(1).getOutlineLevel());
170
        assertEquals(2, sxssfSheet.getRow(2).getOutlineLevel());
171
        assertEquals(2, sxssfSheet.getRow(3).getOutlineLevel());
172
        assertEquals(2, sxssfSheet.getRow(4).getOutlineLevel());
173
        assertEquals(0, sxssfSheet.getRow(5).getOutlineLevel());
174
        
163
        sxssfWorkbook.dispose();
175
        sxssfWorkbook.dispose();
164
        sxssfWorkbook.close();
176
        sxssfWorkbook.close();
165
    }
177
    }

Return to bug 57459