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; }
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)); }