public void Serialize(ContinuableRecordOutput out1) { out1.WriteInt(_numStrings); out1.WriteInt(_numUniqueStrings); for (int k = 0; k < strings.Size; k++) { if (k % ExtSSTRecord.DEFAULT_BUCKET_SIZE == 0) { int rOff = out1.TotalSize; int index = k / ExtSSTRecord.DEFAULT_BUCKET_SIZE; if (index < ExtSSTRecord.MAX_BUCKETS) { //Excel only indexes the first 128 buckets. bucketAbsoluteOffsets[index] = rOff; bucketRelativeOffsets[index] = rOff; } } UnicodeString s = GetUnicodeString(k); s.Serialize(out1); } }
private void SerializeTXORecord(ContinuableRecordOutput out1) { out1.WriteShort(field_1_options); out1.WriteShort(field_2_textOrientation); out1.WriteShort(field_3_reserved4); out1.WriteShort(field_4_reserved5); out1.WriteShort(field_5_reserved6); out1.WriteShort(_text.Length); out1.WriteShort(FormattingDataLength); out1.WriteInt(field_8_reserved7); if (_linkRefPtg != null) { int formulaSize = _linkRefPtg.Size; out1.WriteShort(formulaSize); out1.WriteInt(_unknownPreFormulaInt); _linkRefPtg.Write(out1); if (_unknownPostFormulaByte != null) { out1.WriteByte(Convert.ToByte(_unknownPostFormulaByte, CultureInfo.InvariantCulture)); } } }
private void WriteFormatData(ContinuableRecordOutput out1, IRichTextString str) { int nRuns = str.NumFormattingRuns; for (int i = 0; i < nRuns; i++) { out1.WriteShort(str.GetIndexOfFormattingRun(i)); int fontIndex = ((HSSFRichTextString)str).GetFontOfFormattingRun(i); out1.WriteShort(fontIndex == HSSFRichTextString.NO_FONT ? 0 : fontIndex); out1.WriteInt(0); // skip reserved } out1.WriteShort(str.Length); out1.WriteShort(0); out1.WriteInt(0); // skip reserved }