public void Reset() { this.m_rightPadding = null; this.m_leftPadding = null; this.m_topPadding = null; this.m_bottomPadding = null; this.m_sprms = new List <byte[]>(); this.m_runningSize = 0; this.m_adjustmentTop = 0; this.m_adjustmentBottom = 0; }
public void SetPaddingLeft(int cellIndex, int twips) { if (this.m_leftPadding == null) { this.m_leftPadding = new CellSpacingStruct(CellSpacingStruct.Location.Left); this.m_leftPadding.ItcFirst = cellIndex; this.m_leftPadding.Width = twips; } else if (this.m_leftPadding.Width != twips) { this.m_leftPadding.ItcLim = cellIndex; this.Commit(this.m_leftPadding); this.m_leftPadding.ItcFirst = cellIndex; this.m_leftPadding.Width = twips; } }
public void SetPaddingBottom(int cellIndex, int twips) { if (this.m_bottomPadding == null) { this.m_bottomPadding = new CellSpacingStruct(CellSpacingStruct.Location.Bottom); this.m_bottomPadding.ItcFirst = cellIndex; this.m_bottomPadding.Width = twips; this.m_adjustmentBottom = Math.Max(twips, this.m_adjustmentBottom); } else if (this.m_bottomPadding.Width != twips) { this.m_bottomPadding.ItcLim = cellIndex; this.Commit(this.m_bottomPadding); this.m_bottomPadding.ItcFirst = cellIndex; this.m_bottomPadding.Width = twips; this.m_adjustmentBottom = Math.Max(twips, this.m_adjustmentBottom); } }
private void Commit(CellSpacingStruct spacing) { byte[] array = spacing.ToByteArray(); this.m_sprms.Add(array); this.m_runningSize += array.Length; }