Esempio n. 1
0
 internal void Reset()
 {
     m_rightPadding     = null;
     m_leftPadding      = null;
     m_topPadding       = null;
     m_bottomPadding    = null;
     m_sprms            = new List <byte[]>();
     m_runningSize      = 0;
     m_adjustmentTop    = 0;
     m_adjustmentBottom = 0;
 }
Esempio n. 2
0
 internal void SetPaddingRight(int cellIndex, int twips)
 {
     if (m_rightPadding == null)
     {
         m_rightPadding          = new CellSpacingStruct(CellSpacingStruct.Location.Right);
         m_rightPadding.ItcFirst = cellIndex;
         m_rightPadding.Width    = twips;
     }
     else if (m_rightPadding.Width != twips)
     {
         m_rightPadding.ItcLim = cellIndex;
         Commit(m_rightPadding);
         m_rightPadding.ItcFirst = cellIndex;
         m_rightPadding.Width    = twips;
     }
 }
Esempio n. 3
0
 internal void SetPaddingBottom(int cellIndex, int twips)
 {
     if (m_bottomPadding == null)
     {
         m_bottomPadding          = new CellSpacingStruct(CellSpacingStruct.Location.Bottom);
         m_bottomPadding.ItcFirst = cellIndex;
         m_bottomPadding.Width    = twips;
         m_adjustmentBottom       = Math.Max(twips, m_adjustmentBottom);
     }
     else if (m_bottomPadding.Width != twips)
     {
         m_bottomPadding.ItcLim = cellIndex;
         Commit(m_bottomPadding);
         m_bottomPadding.ItcFirst = cellIndex;
         m_bottomPadding.Width    = twips;
         m_adjustmentBottom       = Math.Max(twips, m_adjustmentBottom);
     }
 }
Esempio n. 4
0
 private void Commit(CellSpacingStruct spacing)
 {
     byte[] array = spacing.ToByteArray();
     m_sprms.Add(array);
     m_runningSize += array.Length;
 }