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

(-)org/apache/poi/hssf/model/Sheet.java (-9 / +11 lines)
Lines 827-842 Link Here
827
827
828
            // If the BOF record was just serialized then add the IndexRecord
828
            // If the BOF record was just serialized then add the IndexRecord
829
            if (record.getSid() == BOFRecord.sid) {
829
            if (record.getSid() == BOFRecord.sid) {
830
              // Add an optional UncalcedRecord
830
              if (!haveSerializedIndex) {
831
              if (_isUncalced) {
832
                  UncalcedRecord rec = new UncalcedRecord();
833
                  pos += rec.serialize(pos, data);
834
              }
835
              //Can there be more than one BOF for a sheet? If not then we can
836
              //remove this guard. So be safe it is left here.
837
              if (rows != null && !haveSerializedIndex) {
838
                haveSerializedIndex = true;
831
                haveSerializedIndex = true;
839
                pos += serializeIndexRecord(k, pos, data);
832
                // Add an optional UncalcedRecord - for size calculation we have to be shure to add it only once (each diagrams have new BOFRecord)
833
                if (_isUncalced) {
834
                    UncalcedRecord rec = new UncalcedRecord();
835
                    pos += rec.serialize(pos, data);
836
                }
837
                //Can there be more than one BOF for a sheet? If not then we can
838
                //remove this guard. So be safe it is left here.
839
                if (rows != null) {
840
                  pos += serializeIndexRecord(k, pos, data);
841
                }
840
              }
842
              }
841
            }
843
            }
842
        }
844
        }

Return to bug 45414