public override Object Clone() { TextObjectRecord rec = new TextObjectRecord(); rec._text = _text; rec.field_1_options = field_1_options; rec.field_2_textOrientation = field_2_textOrientation; rec.field_3_reserved4 = field_3_reserved4; rec.field_4_reserved5 = field_4_reserved5; rec.field_5_reserved6 = field_5_reserved6; rec.field_8_reserved7 = field_8_reserved7; rec._text = _text; // clone needed? if (_linkRefPtg != null) { rec._unknownPreFormulaInt = _unknownPreFormulaInt; rec._linkRefPtg = _linkRefPtg.Copy(); rec._unknownPostFormulaByte = _unknownPostFormulaByte; } return(rec); }
/// <summary> /// Creates the low evel records for a textbox. /// </summary> /// <param name="hssfShape">The highlevel shape.</param> /// <param name="shapeId">The shape id to use for this shape.</param> public TextboxShape(HSSFTextbox hssfShape, int shapeId) { spContainer = CreateSpContainer(hssfShape, shapeId); objRecord = CreateObjRecord(hssfShape, shapeId); textObjectRecord = CreateTextObjectRecord(hssfShape, shapeId); }
/// <summary> /// Textboxes also have an extra TXO record associated with them that most /// other shapes dont have. /// </summary> /// <param name="hssfShape">The HSSF shape.</param> /// <param name="shapeId">The shape id.</param> /// <returns></returns> private TextObjectRecord CreateTextObjectRecord(HSSFTextbox hssfShape, int shapeId) { HSSFTextbox shape = hssfShape; TextObjectRecord obj = new TextObjectRecord(); obj.HorizontalTextAlignment=(int)hssfShape.HorizontalAlignment; obj.VerticalTextAlignment=(int)hssfShape.VerticalAlignment; obj.IsTextLocked=true; obj.TextOrientation=TextObjectRecord.TEXT_ORIENTATION_NONE; int frLength = (shape.String.NumFormattingRuns + 1) * 8; obj.Str=shape.String; return obj; }
public override Object Clone() { TextObjectRecord rec = new TextObjectRecord(); rec._text = _text; rec.field_1_options = field_1_options; rec.field_2_textOrientation = field_2_textOrientation; rec.field_3_reserved4 = field_3_reserved4; rec.field_4_reserved5 = field_4_reserved5; rec.field_5_reserved6 = field_5_reserved6; rec.field_8_reserved7 = field_8_reserved7; rec._text = _text; // clone needed? if (_linkRefPtg != null) { rec._unknownPreFormulaInt = _unknownPreFormulaInt; rec._linkRefPtg = _linkRefPtg.Copy(); rec._unknownPostFormulaByte = _unknownPostFormulaByte; } return rec; }
/// <summary> /// Initializes a new instance of the <see cref="HSSFComment"/> class. /// </summary> /// <param name="note">The note.</param> /// <param name="txo">The txo.</param> public HSSFComment(NoteRecord note, TextObjectRecord txo):this((HSSFShape)null, (HSSFAnchor)null) { this.txo = txo; this.note = note; }