Class ExtendedFormatImpl
Contains the font attributes (font name, font size, color, and so on) for an object.
Implements
Inherited Members
Namespace: Syncfusion.XlsIO.Implementation
Assembly: Syncfusion.XlsIO.NET.dll
Syntax
public class ExtendedFormatImpl : CommonObject, IInternalExtendedFormat, IExtendedFormat, IParentApplication, IComparable, ICloneable, IXFIndex, ICloneParent, IDisposable
Constructors
ExtendedFormatImpl(IApplication, Object)
Sets application and parent fields.
Declaration
public ExtendedFormatImpl(IApplication application, object parent)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Application object for the format. |
System.Object | parent | Parent object for the format. |
ExtendedFormatImpl(IApplication, Object, BiffRecordRaw[], Int32)
Recovers ExtendedFormatImpl records from Biff Records array and position of ExtendedFormatRecord in it.
Declaration
public ExtendedFormatImpl(IApplication application, object parent, BiffRecordRaw[] data, int position)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Application object for the XF. |
System.Object | parent | Parent object for the XF. |
Syncfusion.XlsIO.Parser.Biff_Records.BiffRecordRaw[] | data | Array of Biff Records. |
System.Int32 | position | Position of ExtendedFormatRecord. |
ExtendedFormatImpl(IApplication, Object, ExtendedFormatRecord, ExtendedXFRecord)
Gets information about extended format from specified format.
Declaration
public ExtendedFormatImpl(IApplication application, object parent, ExtendedFormatRecord format, ExtendedXFRecord xfExt)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Application object for the XF. |
System.Object | parent | Parent object for the XF. |
ExtendedFormatRecord | format | Format that contains all needed information. |
ExtendedXFRecord | xfExt |
ExtendedFormatImpl(IApplication, Object, ExtendedFormatRecord, ExtendedXFRecord, Boolean)
Gets information about extended format from specified format.
Declaration
public ExtendedFormatImpl(IApplication application, object parent, ExtendedFormatRecord format, ExtendedXFRecord xfext, bool bInitializeColors)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Application object for the XF. |
System.Object | parent | Parent object for the XF. |
ExtendedFormatRecord | format | Format that contains all needed information. |
ExtendedXFRecord | xfext | |
System.Boolean | bInitializeColors |
ExtendedFormatImpl(IApplication, Object, List<BiffRecordRaw>, Int32)
Recovers ExtendedFormatImpl records from Biff Records List and position of ExtendedFormatRecord in it.
Declaration
public ExtendedFormatImpl(IApplication application, object parent, List<BiffRecordRaw> data, int position)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Application object for the XF. |
System.Object | parent | Parent object for the XF. |
System.Collections.Generic.List<Syncfusion.XlsIO.Parser.Biff_Records.BiffRecordRaw> | data | List of Biff Records. |
System.Int32 | position | Position of ExtendedFormatRecord in List. |
Fields
DEF_NO_PARENT_INDEX
Parent index that indicates that extended format doesn't have any parent format.
Declaration
public const int DEF_NO_PARENT_INDEX = 4095
Field Value
Type |
---|
System.Int32 |
MaxTintValue
Maximum tint value.
Declaration
public const int MaxTintValue = 32767
Field Value
Type |
---|
System.Int32 |
TopToBottomRotation
Indicates that text is drawn from top to bottom.
Declaration
public const int TopToBottomRotation = 255
Field Value
Type |
---|
System.Int32 |
Properties
Borders
Declaration
public IBorders Borders { get; }
Property Value
Type |
---|
IBorders |
BottomBorderColor
Get/set BottomBorder color.
Declaration
public ColorObject BottomBorderColor { get; }
Property Value
Type |
---|
ColorObject |
BottomBorderLineStyle
Gets / sets line style of the bottom border.
Declaration
public ExcelLineStyle BottomBorderLineStyle { get; set; }
Property Value
Type |
---|
ExcelLineStyle |
Color
Returns or sets the cell shading color.
Declaration
public Color Color { get; set; }
Property Value
Type |
---|
Color |
ColorIndex
Returns or sets the color of the interior. The color is specified as an index value into the current color palette.
Declaration
public ExcelKnownColors ColorIndex { get; set; }
Property Value
Type |
---|
ExcelKnownColors |
ColorObject
Returns or sets the cell shading color.
Declaration
public ColorObject ColorObject { get; }
Property Value
Type |
---|
ColorObject |
DiagonalBorderColor
Get/set DiagonalUpBorder color.
Declaration
public ColorObject DiagonalBorderColor { get; }
Property Value
Type |
---|
ColorObject |
DiagonalDownBorderLineStyle
Gets / sets line style of the diagonal border.
Declaration
public ExcelLineStyle DiagonalDownBorderLineStyle { get; set; }
Property Value
Type |
---|
ExcelLineStyle |
DiagonalDownVisible
Indicates whether DiagonalDown line is visible.
Declaration
public bool DiagonalDownVisible { get; set; }
Property Value
Type |
---|
System.Boolean |
DiagonalUpBorderLineStyle
Gets / sets line style of the diagonal border.
Declaration
public ExcelLineStyle DiagonalUpBorderLineStyle { get; set; }
Property Value
Type |
---|
ExcelLineStyle |
DiagonalUpVisible
Indicates whether DiagonalUp line is visible.
Declaration
public bool DiagonalUpVisible { get; set; }
Property Value
Type |
---|
System.Boolean |
FillBackground
Get / set fill background color.
Declaration
public ExcelKnownColors FillBackground { get; set; }
Property Value
Type |
---|
ExcelKnownColors |
FillBackgroundRGB
Get / set fill background color.
Declaration
public Color FillBackgroundRGB { get; set; }
Property Value
Type |
---|
Color |
FillForeground
Get / set fill foreground color.
Declaration
public ExcelKnownColors FillForeground { get; set; }
Property Value
Type |
---|
ExcelKnownColors |
FillForegroundRGB
Get / set fill foreground color.
Declaration
public Color FillForegroundRGB { get; set; }
Property Value
Type |
---|
Color |
FillPattern
Get / set fill pattern.
Declaration
public ExcelPattern FillPattern { get; set; }
Property Value
Type |
---|
ExcelPattern |
Font
Gets font object for this extended format. Read-only.
Declaration
public virtual IFont Font { get; }
Property Value
Type |
---|
IFont |
FontIndex
Get / set font index.
Declaration
public int FontIndex { get; set; }
Property Value
Type |
---|
System.Int32 |
FormulaHidden
Indicates whether formula is hidden.
Declaration
public bool FormulaHidden { get; set; }
Property Value
Type |
---|
System.Boolean |
Gradient
Gets / sets gradient object.
Declaration
public IGradient Gradient { get; set; }
Property Value
Type |
---|
IGradient |
HasBorder
Gets or sets whether border is present
Declaration
public bool HasBorder { get; set; }
Property Value
Type |
---|
System.Boolean |
HasParent
Indicates whether this format is child format.
Declaration
public bool HasParent { get; }
Property Value
Type |
---|
System.Boolean |
HorizontalAlignment
Horizontal alignment.
Declaration
public ExcelHAlign HorizontalAlignment { get; set; }
Property Value
Type |
---|
ExcelHAlign |
IncludeAlignment
Flag for horizontal and vertical alignment, text wrap, indentation, orientation, rotation, and text direction. If False, the attribute of parent style is used.
Declaration
public bool IncludeAlignment { get; set; }
Property Value
Type |
---|
System.Boolean |
IncludeBorder
Flag for border lines. If False, the attribute of parent style is used.
Declaration
public bool IncludeBorder { get; set; }
Property Value
Type |
---|
System.Boolean |
IncludeFont
Flag for font. If False, the attribute of parent style is used.
Declaration
public bool IncludeFont { get; set; }
Property Value
Type |
---|
System.Boolean |
IncludeNumberFormat
Flag for number format. If False, the attribute of parent style is used.
Declaration
public bool IncludeNumberFormat { get; set; }
Property Value
Type |
---|
System.Boolean |
IncludePatterns
Flag for background area style. If False, the attribute of parent style is used.
Declaration
public bool IncludePatterns { get; set; }
Property Value
Type |
---|
System.Boolean |
IncludeProtection
Flag for cell protection (cell locked and formula hidden). If False, the attribute of parent style is used.
Declaration
public bool IncludeProtection { get; set; }
Property Value
Type |
---|
System.Boolean |
IndentLevel
Indent level.
Declaration
public int IndentLevel { get; set; }
Property Value
Type |
---|
System.Int32 |
InnerBottomBorderColor
Returns color of the bottom border. Read-only.
Declaration
protected ColorObject InnerBottomBorderColor { get; }
Property Value
Type |
---|
ColorObject |
InnerColor
Declaration
protected ColorObject InnerColor { get; }
Property Value
Type |
---|
ColorObject |
InnerDiagonalBorderColor
Returns color of the diagonal border. Read-only.
Declaration
protected ColorObject InnerDiagonalBorderColor { get; }
Property Value
Type |
---|
ColorObject |
InnerLeftBorderColor
Returns color of the left border. Read-only.
Declaration
protected ColorObject InnerLeftBorderColor { get; }
Property Value
Type |
---|
ColorObject |
InnerPatternColor
Declaration
protected ColorObject InnerPatternColor { get; }
Property Value
Type |
---|
ColorObject |
InnerRightBorderColor
Returns color of the right border. Read-only.
Declaration
protected ColorObject InnerRightBorderColor { get; }
Property Value
Type |
---|
ColorObject |
InnerTopBorderColor
Returns color of the top border. Read-only.
Declaration
protected ColorObject InnerTopBorderColor { get; }
Property Value
Type |
---|
ColorObject |
IsDefaultColor
Indicates whether color is default. Read-only.
Declaration
public bool IsDefaultColor { get; }
Property Value
Type |
---|
System.Boolean |
IsDefaultPatternColor
Indicates whether pattern color is default. Read-only.
Declaration
public bool IsDefaultPatternColor { get; }
Property Value
Type |
---|
System.Boolean |
IsFirstSymbolApostrophe
If true then first symbol in cell is apostrophe.
Declaration
public bool IsFirstSymbolApostrophe { get; set; }
Property Value
Type |
---|
System.Boolean |
IsModified
Gets value indicating whether format was modified, compared to parent format.
Declaration
public bool IsModified { get; }
Property Value
Type |
---|
System.Boolean |
JustifyLast
For far east languages. Supported only for format. Always 0 for US.
Declaration
public bool JustifyLast { get; set; }
Property Value
Type |
---|
System.Boolean |
LeftBorderColor
Get/set LeftBorder color.
Declaration
public ColorObject LeftBorderColor { get; }
Property Value
Type |
---|
ColorObject |
LeftBorderLineStyle
Gets / sets line style of the left border.
Declaration
public ExcelLineStyle LeftBorderLineStyle { get; set; }
Property Value
Type |
---|
ExcelLineStyle |
Locked
Indicates whether cell with this XF is locked.
Declaration
public bool Locked { get; set; }
Property Value
Type |
---|
System.Boolean |
NumberFormat
Returns or sets the format code for the object. Read/write String.
Declaration
public string NumberFormat { get; set; }
Property Value
Type |
---|
System.String |
NumberFormatIndex
Get / set Format index.
Declaration
public int NumberFormatIndex { get; set; }
Property Value
Type |
---|
System.Int32 |
NumberFormatLocal
Returns or sets the format code for the object as a string in the language of the user. Read/write String.
Declaration
public string NumberFormatLocal { get; set; }
Property Value
Type |
---|
System.String |
NumberFormatObject
Gets number format object.
Declaration
public FormatImpl NumberFormatObject { get; }
Property Value
Type |
---|
FormatImpl |
NumberFormatSettings
Returns object that describes number format. Read-only.
Declaration
public INumberFormat NumberFormatSettings { get; }
Property Value
Type |
---|
INumberFormat |
ParentCollection
Returns parent collection. Read-only.
Declaration
protected ExtendedFormatsCollection ParentCollection { get; }
Property Value
Type |
---|
ExtendedFormatsCollection |
PatternColor
Returns or sets the color of the interior pattern as an Color value.
Declaration
public Color PatternColor { get; set; }
Property Value
Type |
---|
Color |
PatternColorIndex
Returns or sets the color of the interior pattern as an index into the current color palette.
Declaration
public ExcelKnownColors PatternColorIndex { get; set; }
Property Value
Type |
---|
ExcelKnownColors |
PatternColorObject
Returns or sets the color of the interior pattern as an Color value.
Declaration
public ColorObject PatternColorObject { get; }
Property Value
Type |
---|
ColorObject |
Properties
List of extended property.
Declaration
public List<ExtendedProperty> Properties { get; set; }
Property Value
Type |
---|
System.Collections.Generic.List<ExtendedProperty> |
ReadingOrder
Text direction, the reading order for far east versions.
Declaration
public ExcelReadingOrderType ReadingOrder { get; set; }
Property Value
Type |
---|
ExcelReadingOrderType |
Record
Read-only. Returns ExtendedFormatRecord with information about this format.
Declaration
public ExtendedFormatRecord Record { get; protected set; }
Property Value
Type |
---|
ExtendedFormatRecord |
RightBorderColor
Get/set RightBorder color.
Declaration
public ColorObject RightBorderColor { get; }
Property Value
Type |
---|
ColorObject |
RightBorderLineStyle
Gets / sets line style of the right border.
Declaration
public ExcelLineStyle RightBorderLineStyle { get; set; }
Property Value
Type |
---|
ExcelLineStyle |
Rotation
Text rotation angle: 0 Not rotated 1-90 1 to 90 degrees counterclockwise 91-180 1 to 90 degrees clockwise 255 Letters are stacked top-to-bottom, but not rotated.
Declaration
public int Rotation { get; set; }
Property Value
Type |
---|
System.Int32 |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown when value is more than 0xFF. |
ShrinkToFit
True- Indicates that the contents are shrunk to fit into cell.
Declaration
public bool ShrinkToFit { get; set; }
Property Value
Type |
---|
System.Boolean |
TopBorderColor
Get/set TopBorder color.
Declaration
public ColorObject TopBorderColor { get; }
Property Value
Type |
---|
ColorObject |
TopBorderLineStyle
Gets / sets line style of the top border.
Declaration
public ExcelLineStyle TopBorderLineStyle { get; set; }
Property Value
Type |
---|
ExcelLineStyle |
VerticalAlignment
Vertical alignment.
Declaration
public ExcelVAlign VerticalAlignment { get; set; }
Property Value
Type |
---|
ExcelVAlign |
Workbook
Returns parent workbook.
Declaration
public WorkbookImpl Workbook { get; }
Property Value
Type |
---|
WorkbookImpl |
WrapText
True - Indicates that text is wrapped at right border.
Declaration
public bool WrapText { get; set; }
Property Value
Type |
---|
System.Boolean |
XFormatIndex
Gets format index in m_book.InnerFormats.
Declaration
public int XFormatIndex { get; }
Property Value
Type |
---|
System.Int32 |
XFRecord
Read-only. Returns ExtendedXFormat with information about this format.
Declaration
public ExtendedXFRecord XFRecord { get; protected set; }
Property Value
Type |
---|
ExtendedXFRecord |
XFType
Type of the extended format.
Declaration
public ExtendedFormatRecord.TXFType XFType { get; set; }
Property Value
Type |
---|
ExtendedFormatRecord.TXFType |
Methods
BeginUpdate()
Starts updating process.
Declaration
public void BeginUpdate()
CheckAndCorrectFormatRecord(ExtendedFormatRecord)
Checks the record to see if everything is proper and corrects it if necessary.
Declaration
protected void CheckAndCorrectFormatRecord(ExtendedFormatRecord record)
Parameters
Type | Name | Description |
---|---|---|
ExtendedFormatRecord | record |
Clear()
Clears the format
Declaration
public void Clear()
Clone()
Creates a new object that is a copy of the current instance.
Declaration
public object Clone()
Returns
Type | Description |
---|---|
System.Object | A new object that is a copy of the current instance. |
CompareTo(ExtendedFormatImpl)
Declaration
public int CompareTo(ExtendedFormatImpl twin)
Parameters
Type | Name | Description |
---|---|---|
ExtendedFormatImpl | twin |
Returns
Type |
---|
System.Int32 |
CompareTo(Object)
Compares the current instance with another object of the same type.
Declaration
public int CompareTo(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | Object to compare with this instance. |
Returns
Type | Description |
---|---|
System.Int32 | Less than zero - This instance is less than obj. Zero - This instance is equal to obj. Greater than zero - This instance is greater than obj. |
CompareToWithoutIndex(ExtendedFormatImpl)
Compares formats without comparing indexes.
Declaration
public int CompareToWithoutIndex(ExtendedFormatImpl twin)
Parameters
Type | Name | Description |
---|---|---|
ExtendedFormatImpl | twin | Format to compare. |
Returns
Type | Description |
---|---|
System.Int32 | 0 if formats are equal. |
CopyColorsFrom(ExtendedFormatImpl)
Copies color settings from specified format object.
Declaration
protected void CopyColorsFrom(ExtendedFormatImpl format)
Parameters
Type | Name | Description |
---|---|---|
ExtendedFormatImpl | format |
CopyFromTo(ExtendedFormatImpl, ExtendedFormatImpl, Boolean)
Copies one extended format into another.
Declaration
public static void CopyFromTo(ExtendedFormatImpl childFormat, ExtendedFormatImpl parentFormat, bool bSetFlag)
Parameters
Type | Name | Description |
---|---|---|
ExtendedFormatImpl | childFormat | Destination format. |
ExtendedFormatImpl | parentFormat | Source format. |
System.Boolean | bSetFlag | Indicates whether we should change corresponding Include... flag(s) after copying data. |
CopyTo(ExtendedFormatImpl)
Copies all data from this XF into another.
Declaration
public void CopyTo(ExtendedFormatImpl twin)
Parameters
Type | Name | Description |
---|---|---|
ExtendedFormatImpl | twin | Format to copy into. |
CreateChildFormat()
Creates child format if this format is for named style and registers it in workbook.
Declaration
public ExtendedFormatImpl CreateChildFormat()
Returns
Type | Description |
---|---|
ExtendedFormatImpl | Child format. |
CreateChildFormat(ExtendedFormatImpl)
Declaration
public ExtendedFormatImpl CreateChildFormat(ExtendedFormatImpl oldFormat)
Parameters
Type | Name | Description |
---|---|---|
ExtendedFormatImpl | oldFormat |
Returns
Type |
---|
ExtendedFormatImpl |
CreateChildFormat(Boolean)
Creates child format if this format is for named style.
Declaration
public ExtendedFormatImpl CreateChildFormat(bool bRegister)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | bRegister | Defines whether to register format in workbook. |
Returns
Type | Description |
---|---|
ExtendedFormatImpl | Child format. |
EndUpdate()
Ends updating process.
Declaration
public void EndUpdate()
Equals(Object)
Determines whether two Object instances are equal.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The Object to compare with the current Object. |
Returns
Type | Description |
---|---|
System.Boolean | True if the specified Object is equal to the current Object; otherwise, False. |
GetHashCode()
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for the current Object. |
InitializeColors()
Initializes color objects.
Declaration
protected void InitializeColors()
Parse(ExtendedFormatRecord, ExtendedXFRecord)
Parses ExtendedFormatRecord
Declaration
protected void Parse(ExtendedFormatRecord format, ExtendedXFRecord xfExt)
Parameters
Type | Name | Description |
---|---|---|
ExtendedFormatRecord | format | Record to parse. |
ExtendedXFRecord | xfExt |
Exceptions
Type | Condition |
---|---|
System.ApplicationException | When font index in format record is larger than size of the inner font collection of the parent workbook. |
Parse(ExtendedFormatRecord, ExtendedXFRecord, Boolean)
Parses ExtendedFormatRecord
Declaration
protected void Parse(ExtendedFormatRecord format, ExtendedXFRecord xfExt, bool isInitializeColors)
Parameters
Type | Name | Description |
---|---|---|
ExtendedFormatRecord | format | Record to parse. |
ExtendedXFRecord | xfExt | |
System.Boolean | isInitializeColors |
Exceptions
Type | Condition |
---|---|
System.ApplicationException | When font index in format record is larger than size of the inner font collection of the parent workbook. |
Parse(BiffReader)
Recover from the stream.
Declaration
protected void Parse(BiffReader reader)
Parameters
Type | Name | Description |
---|---|---|
BiffReader | reader | Reader with XF data. |
Parse(IList<BiffRecordRaw>, Int32)
Recovers ExtendedFormat from array of Biff Records and position of ExtendedFormatRecord in it.
Declaration
protected void Parse(IList<BiffRecordRaw> data, int position)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<Syncfusion.XlsIO.Parser.Biff_Records.BiffRecordRaw> | data | Array of Biff Records. |
System.Int32 | position | Position of ExtendedFormatRecord in the array. |
Serialize(OffsetArrayList, UInt32[])
Adds format records into records array.
Declaration
public void Serialize(OffsetArrayList records, uint[] crcCache)
Parameters
Type | Name | Description |
---|---|---|
OffsetArrayList | records | Array that will receive format information. |
System.UInt32[] | crcCache |
SerializeXFormat(OffsetArrayList)
Adds Extended XF format records into records array.
Declaration
public void SerializeXFormat(OffsetArrayList records)
Parameters
Type | Name | Description |
---|---|---|
OffsetArrayList | records | Array that will receive format information. |
SynchronizeWithParent()
Synchronizes properties with parent record.
Declaration
public void SynchronizeWithParent()
TypedClone(Object)
Creates a new object that is a copy of the current instance.
Declaration
public ExtendedFormatImpl TypedClone(object parent)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parent |
Returns
Type | Description |
---|---|
ExtendedFormatImpl | A new object that is a copy of the current instance. |
UpdateFromCurrentExtendedFormat(ExtendedFormatImpl)
Updates values from current format.
Declaration
public void UpdateFromCurrentExtendedFormat(ExtendedFormatImpl CurrXF)
Parameters
Type | Name | Description |
---|---|---|
ExtendedFormatImpl | CurrXF |
UpdateFromCurrentExtendedFormatNew(ExtendedFormatImpl, Boolean)
Updates values from current format
Declaration
public void UpdateFromCurrentExtendedFormatNew(ExtendedFormatImpl CurrXF, bool isCellStyle)
Parameters
Type | Name | Description |
---|---|---|
ExtendedFormatImpl | CurrXF | Source extended format record to copy from |
System.Boolean | isCellStyle |
UpdateFromParent()
Updates values from parent format and initializes colors if necessary.
Declaration
public void UpdateFromParent()
Explicit Interface Implementations
ICloneParent.Clone(Object)
Creates a new object that is a copy of the current instance.
Declaration
object ICloneParent.Clone(object parent)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parent | Parent object for a copy of this instance. |
Returns
Type | Description |
---|---|
System.Object | A new object that is a copy of this instance. |