public OpenXmlTableCellModel(OpenXmlTableCellModel containingCell, OpenXmlTablePropertiesModel tableProperties, TextWriter textWriter) { _containingCell = containingCell; _tableProperties = tableProperties; _textWriter = textWriter; _contents = new List <ICellContent>(); _textWriter.Write("<w:tc>"); _cellProperties = new OpenXmlTableCellPropertiesModel(); }
private void Flush() { if (_cellProperties != null) { OverrideBorders(); CellProperties.Write(_textWriter); _cellProperties = null; } foreach (ICellContent content in _contents) { content.Write(_textWriter); } _contents = new List <ICellContent>(); }