Example #1
0
 public IRichTextInfo GetCellRichTextInfo()
 {
     this._currentRichText            = new RichTextInfo(this._currentCell, this.GetStyle, this._currentRow.RowNumber, this._currentColumn);
     this.GetCellStyle().WrapText     = true;
     this._currentCellHasBeenModified = true;
     return(this._currentRichText);
 }
Example #2
0
 private void FinalizeCell()
 {
     if (this._currentRow != null && !this._currentCellHasBeenModified && (this._currentStyle == null || !this._currentStyle.HasBeenModified))
     {
         this._currentRow.ClearCell(this._currentColumn);
     }
     else
     {
         bool flag = false;
         if (this._currentRichText != null)
         {
             this._currentRichText.Commit(this._currentStyle);
             flag = this._currentRichText.FoundRotatedEastAsianChar;
             this._currentRichText = null;
         }
         else if (this._currentCell != null && this._currentCell.ValueType == Cell.CellValueType.Text && this._currentCell.Value != null)
         {
             string text = this._currentCell.Value.ToString();
             if (text.Length > 0)
             {
                 StringBuilder stringBuilder = new StringBuilder(text.Length);
                 ExcelGeneratorStringUtil.ConvertWhitespaceAppendString(text, stringBuilder, this._checkForRotatedEastAsianChars, out flag);
                 this._currentCell.Value = stringBuilder.ToString();
             }
         }
         if (flag)
         {
             this._currentStyle.Orientation = Orientation.Vertical;
         }
         if (this._currentCell != null)
         {
             if (this._currentStyle != null && (this._currentCell.ValueType == Cell.CellValueType.Text || this._currentCell.ValueType == Cell.CellValueType.Blank || this._currentCell.ValueType == Cell.CellValueType.Error))
             {
                 this._currentStyle.NumberFormat = null;
             }
             this._currentCell.Style = this._currentStyle;
         }
         this._currentStyle = null;
     }
     this._checkForRotatedEastAsianChars = false;
 }