示例#1
0
 // endregion
 // region update, footer/header
 protected internal override TableBorders UpdateBordersOnNewPage(bool isOriginalNonSplitRenderer, bool isFooterOrHeader
                                                                 , TableRenderer currentRenderer, TableRenderer headerRenderer, TableRenderer footerRenderer)
 {
     if (!isFooterOrHeader)
     {
         // collapse all cell borders
         if (isOriginalNonSplitRenderer)
         {
             if (null != rows)
             {
                 ProcessAllBordersAndEmptyRows();
                 rightBorderMaxWidth = GetMaxRightWidth();
                 leftBorderMaxWidth  = GetMaxLeftWidth();
             }
             SetTopBorderCollapseWith(((Table)currentRenderer.GetModelElement()).GetLastRowBottomBorder());
         }
         else
         {
             SetTopBorderCollapseWith(null);
             SetBottomBorderCollapseWith(null);
         }
     }
     if (null != footerRenderer)
     {
         float rightFooterBorderWidth = footerRenderer.bordersHandler.GetMaxRightWidth();
         float leftFooterBorderWidth  = footerRenderer.bordersHandler.GetMaxLeftWidth();
         leftBorderMaxWidth  = Math.Max(leftBorderMaxWidth, leftFooterBorderWidth);
         rightBorderMaxWidth = Math.Max(rightBorderMaxWidth, rightFooterBorderWidth);
     }
     if (null != headerRenderer)
     {
         float rightHeaderBorderWidth = headerRenderer.bordersHandler.GetMaxRightWidth();
         float leftHeaderBorderWidth  = headerRenderer.bordersHandler.GetMaxLeftWidth();
         leftBorderMaxWidth  = Math.Max(leftBorderMaxWidth, leftHeaderBorderWidth);
         rightBorderMaxWidth = Math.Max(rightBorderMaxWidth, rightHeaderBorderWidth);
     }
     return(this);
 }