private MsofbtClientTextBoxRecord GenerateClientTextBox(MsoBaseRecord parent) { MsofbtClientTextBoxRecord textBox = new MsofbtClientTextBoxRecord { Parent = parent }; TxoRecord txo = new TxoRecord { TextLen = (ushort)this.text.Length, FormattingRunsLen = 16 }; textBox.TextObject = txo; return(this.AddFormattingRunsOnDemand(textBox, txo)); }
private MsofbtClientTextBoxRecord AddFormattingRunsOnDemand(MsofbtClientTextBoxRecord textBox, TxoRecord txo) { if (this.text.Length != 0) { textBox.TextContinue = this.GenerateTextContinueRecord(); byte[] formattingRunsBytes = this.ConvertFromShortToLongFR(this.SaveFormattingRuns()); textBox.FormattingRuns = this.GenerateFormattingRunsContinueRecord(formattingRunsBytes); txo.FormattingRunsLen = (ushort)formattingRunsBytes.Length; } return(textBox); }