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();
        }
        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;
        }
Beispiel #3
0
        internal SLAlignment Clone()
        {
            SLAlignment align = new SLAlignment();

            align.HasHorizontal   = this.HasHorizontal;
            align.vHorizontal     = this.vHorizontal;
            align.HasVertical     = this.HasVertical;
            align.vVertical       = this.vVertical;
            align.iTextRotation   = this.iTextRotation;
            align.WrapText        = this.WrapText;
            align.Indent          = this.Indent;
            align.RelativeIndent  = this.RelativeIndent;
            align.JustifyLastLine = this.JustifyLastLine;
            align.ShrinkToFit     = this.ShrinkToFit;
            align.HasReadingOrder = this.HasReadingOrder;
            align.vReadingOrder   = this.vReadingOrder;

            return(align);
        }
Beispiel #4
0
        internal SLAlignment Clone()
        {
            SLAlignment align = new SLAlignment();
            align.HasHorizontal = this.HasHorizontal;
            align.vHorizontal = this.vHorizontal;
            align.HasVertical = this.HasVertical;
            align.vVertical = this.vVertical;
            align.iTextRotation = this.iTextRotation;
            align.WrapText = this.WrapText;
            align.Indent = this.Indent;
            align.RelativeIndent = this.RelativeIndent;
            align.JustifyLastLine = this.JustifyLastLine;
            align.ShrinkToFit = this.ShrinkToFit;
            align.HasReadingOrder = this.HasReadingOrder;
            align.vReadingOrder = this.vReadingOrder;

            return align;
        }
Beispiel #5
0
        internal void FromCellFormat(CellFormat cf)
        {
            this.SetAllNull();

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

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

            if (cf.NumberFormatId != null) this.NumberFormatId = cf.NumberFormatId.Value;

            if (cf.FontId != null) this.FontId = cf.FontId.Value;

            if (cf.FillId != null) this.FillId = cf.FillId.Value;

            if (cf.BorderId != null) this.BorderId = cf.BorderId.Value;

            if (cf.FormatId != null) this.CellStyleFormatId = cf.FormatId.Value;

            if (cf.QuotePrefix != null) this.QuotePrefix = cf.QuotePrefix.Value;

            if (cf.PivotButton != null) this.PivotButton = cf.PivotButton.Value;

            if (cf.ApplyNumberFormat != null) this.ApplyNumberFormat = cf.ApplyNumberFormat.Value;

            if (cf.ApplyFont != null) this.ApplyFont = cf.ApplyFont.Value;

            if (cf.ApplyFill != null) this.ApplyFill = cf.ApplyFill.Value;

            if (cf.ApplyBorder != null) this.ApplyBorder = cf.ApplyBorder.Value;

            if (cf.ApplyAlignment != null) this.ApplyAlignment = cf.ApplyAlignment.Value;

            if (cf.ApplyProtection != null) this.ApplyProtection = cf.ApplyProtection.Value;

            Sync();
        }
Beispiel #6
0
 /// <summary>
 /// Remove any existing alignment properties.
 /// </summary>
 public void RemoveAlignment()
 {
     this.alignReal = new SLAlignment();
     HasAlignment = false;
 }
        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;
        }
        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();
        }