예제 #1
0
 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;
 }
예제 #2
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;
     }
 }
예제 #3
0
 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);
     }
 }
예제 #4
0
 private void Commit(CellSpacingStruct spacing)
 {
     byte[] array = spacing.ToByteArray();
     this.m_sprms.Add(array);
     this.m_runningSize += array.Length;
 }