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
 }