コード例 #1
0
        internal X14.DifferentialType ToDifferentialType()
        {
            Sync();

            X14.DifferentialType dt = new X14.DifferentialType();
            if (HasFont)
            {
                dt.Font = this.Font.ToFont();
            }
            if (HasNumberingFormat)
            {
                dt.NumberingFormat = this.nfFormatCode.ToNumberingFormat();
            }
            if (HasFill)
            {
                dt.Fill = this.Fill.ToFill();
            }
            if (HasAlignment)
            {
                dt.Alignment = this.Alignment.ToAlignment();
            }
            if (HasBorder)
            {
                dt.Border = this.Border.ToBorder();
            }
            if (HasProtection)
            {
                dt.Protection = this.Protection.ToProtection();
            }

            return(dt);
        }
コード例 #2
0
        internal void FromDifferentialType(X14.DifferentialType dt)
        {
            SetAllNull();

            var listempty = new List <Color>();

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

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

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

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

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

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

            Sync();
        }
コード例 #3
0
        internal X14.DifferentialType ToDifferentialType()
        {
            Sync();

            X14.DifferentialType dt = new X14.DifferentialType();
            if (HasFont) dt.Font = this.Font.ToFont();
            if (HasNumberingFormat) dt.NumberingFormat = this.nfFormatCode.ToNumberingFormat();
            if (HasFill) dt.Fill = this.Fill.ToFill();
            if (HasAlignment) dt.Alignment = this.Alignment.ToAlignment();
            if (HasBorder) dt.Border = this.Border.ToBorder();
            if (HasProtection) dt.Protection = this.Protection.ToProtection();

            return dt;
        }