コード例 #1
0
 private AlignmentSpecification(AlignmentSpecification specification)
 {
     Horizontal      = specification.Horizontal;
     Vertical        = specification.Vertical;
     Wrap            = specification.Wrap;
     ReadingOrder    = specification.ReadingOrder;
     TextRotation    = specification.TextRotation;
     Indent          = specification.Indent;
     RelativeIndent  = specification.RelativeIndent;
     JustifyLastLine = specification.JustifyLastLine;
     Shrink          = specification.Shrink;
     MergeCell       = specification.MergeCell;
 }
コード例 #2
0
        public CellFormat Build(IBuildContext context)
        {
            var font         = FontSpecification?.Build(context);
            var fill         = FillSpecification?.Build(context);
            var border       = BorderSpecification?.Build(context);
            var numberFormat = NumberFormatSpecification?.Build(context);
            var alignment    = AlignmentSpecification?.Build(context);

            return(new CellFormat(
                       fontId: font == null ? (uint?)null : context.Stylesheet.Add(font),
                       fillId: fill == null ? (uint?)null : context.Stylesheet.Add(fill),
                       borderId: border == null ? (uint?)null : context.Stylesheet.Add(border),
                       numberFormatId: numberFormat?.Id,
                       alignment: alignment));
        }