Class CommentShapeImpl
Class used for comment shapes.
Implements
Inherited Members
Namespace: Syncfusion.XlsIO.Implementation.Shapes
Assembly: Syncfusion.XlsIO.Portable.dll
Syntax
public class CommentShapeImpl : TextBoxShapeBase, IDisposable, ICloneParent, INamedObject, ICommentShape, IComment, ITextBox, IShape, IParentApplication
Constructors
CommentShapeImpl(IApplication, Object)
Creates new comment with specified Application and Parent objects.
Declaration
public CommentShapeImpl(IApplication application, object parent)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Application object for the current object. |
System.Object | parent | Parent object for the current object. |
CommentShapeImpl(IApplication, Object, MsofbtSpContainer)
Extracts comment from MsofbtSpContainer.
Declaration
public CommentShapeImpl(IApplication application, object parent, MsofbtSpContainer container)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Application object for the current object. |
System.Object | parent | Parent object for the current object. |
MsofbtSpContainer | container | Container that represents comment. |
CommentShapeImpl(IApplication, Object, MsofbtSpContainer, ExcelParseOptions)
Extracts comment from MsofbtSpContainer.
Declaration
public CommentShapeImpl(IApplication application, object parent, MsofbtSpContainer container, ExcelParseOptions options)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Application object for the current object. |
System.Object | parent | Parent object for the current object. |
MsofbtSpContainer | container | Container that represents comment. |
ExcelParseOptions | options | Parse options. |
CommentShapeImpl(IApplication, Object, Boolean)
Creates new comment with specified Application and Parent objects.
Declaration
public CommentShapeImpl(IApplication application, object parent, bool bIsParseOptions)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Application object for the current object. |
System.Object | parent | Parent object for the current object. |
System.Boolean | bIsParseOptions | Indicates is parse comment fill line options. |
CommentShapeImpl(IApplication, Object, String)
Creates new comment with specified text.
Declaration
public CommentShapeImpl(IApplication application, object parent, string commentText)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Application object for the current object. |
System.Object | parent | Parent object for the current object. |
System.String | commentText | Text of new comment. |
Fields
DEF_OFFSET
Default offset in the cell of comment frame.
Declaration
public const int DEF_OFFSET = 240
Field Value
Type |
---|
System.Int32 |
Properties
Author
Comment's author.
Declaration
public string Author { get; set; }
Property Value
Type |
---|
System.String |
Column
Column of the commented cell.
Declaration
public int Column { get; set; }
Property Value
Type |
---|
System.Int32 |
Hyperlink
Get object that represents the hyperlink for the shape.
Declaration
public IHyperLink Hyperlink { get; }
Property Value
Type |
---|
IHyperLink |
Instance
Returns instance value. Read-only.
Declaration
public override int Instance { get; }
Property Value
Type |
---|
System.Int32 |
Overrides
IsVisible
Indicates whether comment to be shown or hidden.
Declaration
public bool IsVisible { get; set; }
Property Value
Type |
---|
System.Boolean |
Row
Row of the commented cell.
Declaration
public int Row { get; set; }
Property Value
Type |
---|
System.Int32 |
Methods
CanCopyShapesOnRangeCopy(Rectangle, Rectangle, out Rectangle)
Indicates is can copy current shape.
Declaration
public override bool CanCopyShapesOnRangeCopy(Rectangle sourceRec, Rectangle destRec, out Rectangle newPosition)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | sourceRec | Represents source range dimension. |
Rectangle | destRec | Represents destination range dimension. |
Rectangle | newPosition | Gets new position of shape. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if can copy; otherwise - false. |
Overrides
Clone(Object, Dictionary<String, String>, Dictionary<Int32, Int32>, Boolean)
Creates a clone of the current shape.
Declaration
public override IShape Clone(object parent, Dictionary<string, string> hashNewNames, Dictionary<int, int> dicFontIndexes, bool addToCollections)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parent | New parent for the shape object. |
System.Collections.Generic.Dictionary<System.String, System.String> | hashNewNames | Dictionary with new worksheet names. |
System.Collections.Generic.Dictionary<System.Int32, System.Int32> | dicFontIndexes | Dictionary with new font indexes. |
System.Boolean | addToCollections | Indicates whether we should add created shape into all necessary parent collections. |
Returns
Type | Description |
---|---|
IShape | A copy of the current shape. |
Overrides
CopyCommentOptions(CommentShapeImpl, Dictionary<Int32, Int32>)
Copy comments options.
Declaration
public void CopyCommentOptions(CommentShapeImpl sourceComment, Dictionary<int, int> dicFontIndexes)
Parameters
Type | Name | Description |
---|---|---|
CommentShapeImpl | sourceComment | Represents source comment. |
System.Collections.Generic.Dictionary<System.Int32, System.Int32> | dicFontIndexes | Represents dictionary with shape indexes. |
CopyMoveShapeOnRangeCopyMove(WorksheetImpl, Rectangle, Boolean)
Copies / moves shape in range copy / move.
Declaration
public override ShapeImpl CopyMoveShapeOnRangeCopyMove(WorksheetImpl sheet, Rectangle destRec, bool bIsCopy)
Parameters
Type | Name | Description |
---|---|---|
WorksheetImpl | sheet | Represents destination sheet. |
Rectangle | destRec | Represents position of . |
System.Boolean | bIsCopy | Indicates is copy. |
Returns
Type | Description |
---|---|
ShapeImpl | Returns copied moved shape. |
Overrides
CreateDefaultFillLineFormats()
Create default fill line formats
Declaration
protected override void CreateDefaultFillLineFormats()
Overrides
CreateDefaultOptions()
Creates default options.
Declaration
protected override MsofbtOPT CreateDefaultOptions()
Returns
Type | Description |
---|---|
MsofbtOPT | MsofbtOPT record. |
Overrides
Dispose()
Disposes the comment shape
Declaration
public override void Dispose()
Overrides
InitializeVariables()
Initialize variables.
Declaration
protected override void InitializeVariables()
Overrides
OnDelete()
Removes shapes from collection.
Declaration
protected override void OnDelete()
Overrides
OnPrepareForSerialization()
This method is called inside of PrepareForSerialization to make shape-dependent preparations.
Declaration
protected override void OnPrepareForSerialization()
Overrides
RegisterInSubCollection()
Registers shape in all required sub collections.
Declaration
public override void RegisterInSubCollection()
Overrides
SerializeCommentShadow(MsofbtOPT)
Serialize comment shadow.
Declaration
protected override void SerializeCommentShadow(MsofbtOPT option)
Parameters
Type | Name | Description |
---|---|---|
MsofbtOPT | option | Represents option holder. |
Overrides
SerializeOption344(MsofbtOPT)
Serializes option with index 344 (this is unknown option).
Declaration
protected void SerializeOption344(MsofbtOPT options)
Parameters
Type | Name | Description |
---|---|---|
MsofbtOPT | options | MsofbtOPT record to which text ID will be added. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If options argument is NULL. |
SerializeShape(MsofbtSpgrContainer)
Serializes current shape.
Declaration
protected override void SerializeShape(MsofbtSpgrContainer spgrContainer)
Parameters
Type | Name | Description |
---|---|---|
MsofbtSpgrContainer | spgrContainer | Container that will receive this comment. |
Overrides
SerializeTextId(MsofbtOPT)
Serializes Text ID.
Declaration
protected void SerializeTextId(MsofbtOPT options)
Parameters
Type | Name | Description |
---|---|---|
MsofbtOPT | options | MsofbtOPT record to which text ID will be added. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If options argument is NULL. |
UpdateNotSizeNotMoveShape(Boolean, Int32, Int32)
Updates shape that include not size and not move flags.
Declaration
protected override void UpdateNotSizeNotMoveShape(bool bRow, int index, int iCount)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | bRow | Indicates is row or column to update. |
System.Int32 | index | One-based row or column index. |
System.Int32 | iCount | Number of inserted/removed rows/column. |