public OpenXmlTableModel(OpenXmlTableModel containingTable, InterleavingWriter interleavingWriter, AutoFit autofit)
 {
     this._containingTable    = containingTable;
     this._interleavingWriter = interleavingWriter;
     this._interleavingWriter.TextWriter.Write("<w:tbl>");
     this._tableProperties = new OpenXmlTablePropertiesModel(autofit);
 }
Exemple #2
0
 public void WriteTableBegin(float left, bool layoutTable, AutoFit autofit)
 {
     if (this._state == State.InBody || this._state == State.InHeaderFooter || this._state == State.InCell)
     {
         if (this._state == State.InCell)
         {
             this._currentCell.PrepareForNestedTable();
         }
         this._state        = State.InTable;
         this._currentTable = new OpenXmlTableModel(this.CurrentTable, this._interleavingWriter, autofit);
         this._depth++;
     }
     else
     {
         WordOpenXmlUtils.FailCodingError();
     }
 }
Exemple #3
0
 public void WriteTableEnd()
 {
     if (this._state == State.InTable)
     {
         this.CurrentTable.WriteCloseTag();
         this._currentTable = this.CurrentTable.ContainingTable;
         if (this.CurrentTable == null)
         {
             this._state = (State)(this._startedInHeaderFooter ? 1 : 0);
         }
         else
         {
             this._state = State.InCell;
         }
         this._depth--;
     }
     else
     {
         WordOpenXmlUtils.FailCodingError();
     }
 }
 public void WriteTableEnd()
 {
     if (_state == State.InTable)
     {
         CurrentTable.WriteCloseTag();
         _currentTable = CurrentTable.ContainingTable;
         if (CurrentTable == null)
         {
             _state = (_startedInHeaderFooter ? State.InHeaderFooter : State.InBody);
         }
         else
         {
             _state = State.InCell;
         }
         _depth--;
     }
     else
     {
         WordOpenXmlUtils.FailCodingError();
     }
 }