private void CloneNullable <T>(T?currentValue, T newValue) where T : struct { if (!currentValue.HasValue || !newValue.Equals(currentValue)) { mModel = mModel.cloneStyle(cellStyle: true); } }
private void CloneValueType <T>(T currentValue, T newValue) where T : struct { if (!newValue.Equals(currentValue)) { this.mModel = this.mModel.cloneStyle(true); } }
private void Clone <T>(T currentValue, T newValue) where T : class { if (((newValue == null) ^ (currentValue == null)) || (newValue != null && !newValue.Equals(currentValue))) { mModel = mModel.cloneStyle(cellStyle: true); } }
private void CloneNullable <T>(T?currentValue, T newValue) where T : struct { if (currentValue.HasValue && newValue.Equals(currentValue)) { return; } this.mModel = this.mModel.cloneStyle(true); }
private void Clone <T>(T currentValue, T newValue) where T : class { if (!(newValue == null ^ currentValue == null)) { if (newValue == null) { return; } if (newValue.Equals(currentValue)) { return; } } this.mModel = this.mModel.cloneStyle(true); }
private void Copy(IStyleModel srcStyle) { XMLStyleModel xMLStyleModel = (XMLStyleModel)srcStyle; _hasBeenModified = xMLStyleModel._hasBeenModified; _xf.ApplyAlignment_Attr = xMLStyleModel._xf.ApplyAlignment_Attr; _xf.ApplyBorder_Attr = xMLStyleModel._xf.ApplyBorder_Attr; _xf.ApplyFill_Attr = xMLStyleModel._xf.ApplyFill_Attr; _xf.ApplyFont_Attr = xMLStyleModel._xf.ApplyFont_Attr; _xf.ApplyNumberFormat_Attr = xMLStyleModel._xf.ApplyNumberFormat_Attr; _xf.ApplyProtection_Attr = xMLStyleModel._xf.ApplyProtection_Attr; _xf.NumFmtId_Attr = xMLStyleModel._xf.NumFmtId_Attr; if (xMLStyleModel._xf.BorderId_Attr_Is_Specified) { _xf.BorderId_Attr = xMLStyleModel._xf.BorderId_Attr; } if (xMLStyleModel._xf.FillId_Attr_Is_Specified) { _xf.FillId_Attr = xMLStyleModel._xf.FillId_Attr; } if (xMLStyleModel._xf.FontId_Attr_Is_Specified) { _xf.FontId_Attr = xMLStyleModel._xf.FontId_Attr; } if (xMLStyleModel._xf.Alignment != null) { if (xMLStyleModel._xf.Alignment.Vertical_Attr_Is_Specified) { Alignment.Vertical_Attr = xMLStyleModel._xf.Alignment.Vertical_Attr; } if (xMLStyleModel.Alignment.Horizontal_Attr_Is_Specified) { Alignment.Horizontal_Attr = xMLStyleModel._xf.Alignment.Horizontal_Attr; } if (xMLStyleModel.Alignment.ReadingOrder_Attr_Is_Specified) { Alignment.ReadingOrder_Attr = xMLStyleModel._xf.Alignment.ReadingOrder_Attr; } if (xMLStyleModel.Alignment.WrapText_Attr_Is_Specified) { Alignment.WrapText_Attr = xMLStyleModel._xf.Alignment.WrapText_Attr; } if (xMLStyleModel.Alignment.ShrinkToFit_Attr_Is_Specified) { Alignment.ShrinkToFit_Attr = xMLStyleModel._xf.Alignment.ShrinkToFit_Attr; } if (xMLStyleModel.Alignment.Indent_Attr_Is_Specified) { Alignment.Indent_Attr = xMLStyleModel._xf.Alignment.Indent_Attr; } if (xMLStyleModel.Alignment.JustifyLastLine_Attr_Is_Specified) { Alignment.JustifyLastLine_Attr = xMLStyleModel._xf.Alignment.JustifyLastLine_Attr; } if (xMLStyleModel.Alignment.TextRotation_Attr_Is_Specified) { Alignment.TextRotation_Attr = xMLStyleModel._xf.Alignment.TextRotation_Attr; } } if (xMLStyleModel._numberformat != null) { _numberformat = xMLStyleModel._numberformat; } if (xMLStyleModel._font != null) { Font = (XMLFontModel)xMLStyleModel._font.Clone(); } if (xMLStyleModel._fill != null) { Fill = xMLStyleModel._fill.DeepClone(); } if (xMLStyleModel._border != null) { _border = xMLStyleModel._border.DeepClone(); } }
public Style(IStyleModel model) { this.mModel = model; }
internal Style(IStyleModel model) { mModel = model; }
internal GlobalStyle(IStyleModel model) : base(model) { mModel = model; }
public GlobalStyle(IStyleModel model) : base(model) { this.mModel = model; }