Пример #1
0
        internal void FromDifferentialType(X14.DifferentialType dt)
        {
            this.SetAllNull();

            List <System.Drawing.Color> listempty = new List <System.Drawing.Color>();

            if (dt.Font != null)
            {
                HasFont       = true;
                this.fontReal = new SLFont(SLConstants.OfficeThemeMajorLatinFont, SLConstants.OfficeThemeMinorLatinFont, listempty, listempty);
                this.fontReal.FromFont(dt.Font);
            }

            if (dt.NumberingFormat != null)
            {
                HasNumberingFormat = true;
                this.nfFormatCode  = new SLNumberingFormat();
                this.nfFormatCode.FromNumberingFormat(dt.NumberingFormat);
            }

            if (dt.Fill != null)
            {
                HasFill       = true;
                this.fillReal = new SLFill(listempty, listempty);
                this.fillReal.FromFill(dt.Fill);
            }

            if (dt.Alignment != null)
            {
                HasAlignment   = true;
                this.alignReal = new SLAlignment();
                this.alignReal.FromAlignment(dt.Alignment);
            }

            if (dt.Border != null)
            {
                HasBorder       = true;
                this.borderReal = new SLBorder(listempty, listempty);
                this.borderReal.FromBorder(dt.Border);
            }

            if (dt.Protection != null)
            {
                HasProtection       = true;
                this.protectionReal = new SLProtection();
                this.protectionReal.FromProtection(dt.Protection);
            }

            Sync();
        }
Пример #2
0
        private void SetAllNull()
        {
            List <System.Drawing.Color> listempty = new List <System.Drawing.Color>();

            this.alignReal      = new SLAlignment();
            HasAlignment        = false;
            this.protectionReal = new SLProtection();
            HasProtection       = false;
            this.nfFormatCode   = new SLNumberingFormat();
            HasNumberingFormat  = false;
            this.fontReal       = new SLFont(SLConstants.OfficeThemeMajorLatinFont, SLConstants.OfficeThemeMinorLatinFont, listempty, listempty);
            HasFont             = false;
            this.fillReal       = new SLFill(listempty, listempty);
            HasFill             = false;
            this.borderReal     = new SLBorder(listempty, listempty);
            HasBorder           = false;
        }
Пример #3
0
        internal SLBorder Clone()
        {
            SLBorder b = new SLBorder(this.listThemeColors, this.listIndexedColors);

            b.HasLeftBorder       = this.HasLeftBorder;
            b.bpLeftBorder        = this.bpLeftBorder.Clone();
            b.HasRightBorder      = this.HasRightBorder;
            b.bpRightBorder       = this.bpRightBorder.Clone();
            b.HasTopBorder        = this.HasTopBorder;
            b.bpTopBorder         = this.bpTopBorder.Clone();
            b.HasBottomBorder     = this.HasBottomBorder;
            b.bpBottomBorder      = this.bpBottomBorder.Clone();
            b.HasDiagonalBorder   = this.HasDiagonalBorder;
            b.bpDiagonalBorder    = this.bpDiagonalBorder.Clone();
            b.HasVerticalBorder   = this.HasVerticalBorder;
            b.bpVerticalBorder    = this.bpVerticalBorder.Clone();
            b.HasHorizontalBorder = this.HasHorizontalBorder;
            b.bpHorizontalBorder  = this.bpHorizontalBorder.Clone();
            b.DiagonalUp          = this.DiagonalUp;
            b.DiagonalDown        = this.DiagonalDown;
            b.Outline             = this.Outline;

            return(b);
        }