Ejemplo n.º 1
0
        public XLPageSetup(XLPageSetup defaultPageOptions, XLWorksheet worksheet)
        {
            if (defaultPageOptions != null)
            {
                PrintAreas                = new XLPrintAreas(defaultPageOptions.PrintAreas as XLPrintAreas, worksheet);
                CenterHorizontally        = defaultPageOptions.CenterHorizontally;
                CenterVertically          = defaultPageOptions.CenterVertically;
                FirstPageNumber           = defaultPageOptions.FirstPageNumber;
                HorizontalDpi             = defaultPageOptions.HorizontalDpi;
                PageOrientation           = defaultPageOptions.PageOrientation;
                VerticalDpi               = defaultPageOptions.VerticalDpi;
                FirstRowToRepeatAtTop     = defaultPageOptions.FirstRowToRepeatAtTop;
                LastRowToRepeatAtTop      = defaultPageOptions.LastRowToRepeatAtTop;
                FirstColumnToRepeatAtLeft = defaultPageOptions.FirstColumnToRepeatAtLeft;
                LastColumnToRepeatAtLeft  = defaultPageOptions.LastColumnToRepeatAtLeft;
                ShowComments              = defaultPageOptions.ShowComments;


                PaperSize  = defaultPageOptions.PaperSize;
                _pagesTall = defaultPageOptions.PagesTall;
                _pagesWide = defaultPageOptions.PagesWide;
                _scale     = defaultPageOptions.Scale;


                if (defaultPageOptions.Margins != null)
                {
                    Margins = new XLMargins
                    {
                        Top    = defaultPageOptions.Margins.Top,
                        Bottom = defaultPageOptions.Margins.Bottom,
                        Left   = defaultPageOptions.Margins.Left,
                        Right  = defaultPageOptions.Margins.Right,
                        Header = defaultPageOptions.Margins.Header,
                        Footer = defaultPageOptions.Margins.Footer
                    };
                }
                AlignHFWithMargins       = defaultPageOptions.AlignHFWithMargins;
                ScaleHFWithDocument      = defaultPageOptions.ScaleHFWithDocument;
                ShowGridlines            = defaultPageOptions.ShowGridlines;
                ShowRowAndColumnHeadings = defaultPageOptions.ShowRowAndColumnHeadings;
                BlackAndWhite            = defaultPageOptions.BlackAndWhite;
                DraftQuality             = defaultPageOptions.DraftQuality;
                PageOrder = defaultPageOptions.PageOrder;

                ColumnBreaks    = defaultPageOptions.ColumnBreaks.ToList();
                RowBreaks       = defaultPageOptions.RowBreaks.ToList();
                Header          = new XLHeaderFooter(defaultPageOptions.Header as XLHeaderFooter, worksheet);
                Footer          = new XLHeaderFooter(defaultPageOptions.Footer as XLHeaderFooter, worksheet);
                PrintErrorValue = defaultPageOptions.PrintErrorValue;
            }
            else
            {
                PrintAreas   = new XLPrintAreas(worksheet);
                Header       = new XLHeaderFooter(worksheet);
                Footer       = new XLHeaderFooter(worksheet);
                ColumnBreaks = new List <Int32>();
                RowBreaks    = new List <Int32>();
            }
        }
Ejemplo n.º 2
0
 public XLHeaderFooter(XLHeaderFooter defaultHF, XLWorksheet worksheet)
 {
     defaultHF.innerTexts.ForEach(kp => innerTexts.Add(kp.Key, kp.Value));
     Left   = new XLHFItem(defaultHF.Left as XLHFItem, worksheet);
     Center = new XLHFItem(defaultHF.Center as XLHFItem, worksheet);
     Right  = new XLHFItem(defaultHF.Right as XLHFItem, worksheet);
     SetAsInitial();
 }
Ejemplo n.º 3
0
 public XLHeaderFooter(XLHeaderFooter defaultHF, XLWorksheet worksheet)
 {
     defaultHF.innerTexts.ForEach(kp => innerTexts.Add(kp.Key, kp.Value));
     Left = new XLHFItem(defaultHF.Left as XLHFItem, worksheet);
     Center = new XLHFItem(defaultHF.Center as XLHFItem, worksheet);
     Right = new XLHFItem(defaultHF.Right as XLHFItem, worksheet);
     SetAsInitial();
 }
Ejemplo n.º 4
0
        public XLPageSetup(XLPageSetup defaultPageOptions, XLWorksheet worksheet)
        {
            
            if (defaultPageOptions != null)
            {
                PrintAreas = new XLPrintAreas(defaultPageOptions.PrintAreas as XLPrintAreas, worksheet);
                CenterHorizontally = defaultPageOptions.CenterHorizontally;
                CenterVertically = defaultPageOptions.CenterVertically;
                FirstPageNumber = defaultPageOptions.FirstPageNumber;
                HorizontalDpi = defaultPageOptions.HorizontalDpi;
                PageOrientation = defaultPageOptions.PageOrientation;
                VerticalDpi = defaultPageOptions.VerticalDpi;

                PaperSize = defaultPageOptions.PaperSize;
                _pagesTall = defaultPageOptions.PagesTall;
                _pagesWide = defaultPageOptions.PagesWide;
                _scale = defaultPageOptions.Scale;
                

                if (defaultPageOptions.Margins != null)
                {
                    Margins = new XLMargins
                                  {
                                Top = defaultPageOptions.Margins.Top,
                                Bottom = defaultPageOptions.Margins.Bottom,
                                Left = defaultPageOptions.Margins.Left,
                                Right = defaultPageOptions.Margins.Right,
                                Header = defaultPageOptions.Margins.Header,
                                Footer = defaultPageOptions.Margins.Footer
                            };
                }
                AlignHFWithMargins = defaultPageOptions.AlignHFWithMargins;
                ScaleHFWithDocument = defaultPageOptions.ScaleHFWithDocument;
                ShowGridlines = defaultPageOptions.ShowGridlines;
                ShowRowAndColumnHeadings = defaultPageOptions.ShowRowAndColumnHeadings;
                BlackAndWhite = defaultPageOptions.BlackAndWhite;
                DraftQuality = defaultPageOptions.DraftQuality;
                PageOrder = defaultPageOptions.PageOrder;

                ColumnBreaks = defaultPageOptions.ColumnBreaks.ToList();
                RowBreaks = defaultPageOptions.RowBreaks.ToList();
                Header = new XLHeaderFooter(defaultPageOptions.Header as XLHeaderFooter, worksheet);
                Footer = new XLHeaderFooter(defaultPageOptions.Footer as XLHeaderFooter, worksheet);
                PrintErrorValue = defaultPageOptions.PrintErrorValue;
            }
            else
            {
                PrintAreas = new XLPrintAreas(worksheet);
                Header = new XLHeaderFooter(worksheet);
                Footer = new XLHeaderFooter(worksheet);
                ColumnBreaks = new List<Int32>();
                RowBreaks = new List<Int32>();
            }
        }
Ejemplo n.º 5
0
 public XLHFItem(XLHeaderFooter headerFooter)
 {
     HeaderFooter = headerFooter;
 }
Ejemplo n.º 6
0
 public XLHFItem(XLHFItem defaultHFItem, XLHeaderFooter headerFooter)
     : this(headerFooter)
 {
     defaultHFItem.texts.ForEach(kp => texts.Add(kp.Key, kp.Value));
 }