NoteRecord

Namespace: NPOI
We found 10 examples in language CSharp for this search. You will see 38 fragments of code.


        internal override void AfterInsert(HSSFPatriarch patriarch)
        {
            base.AfterInsert(patriarch);
            patriarch.GetBoundAggregate().AddTailRecord(NoteRecord);
        }

        private NoteRecord CreateNoteRecord()
        {
            NoteRecord note = new NoteRecord();
            note.Flags = (NoteRecord.NOTE_HIDDEN);
            note.Author = ("");
            return note;
        }
        

        internal override void AfterRemove(HSSFPatriarch patriarch)
        {
            base.AfterRemove(patriarch);
            patriarch.GetBoundAggregate().RemoveTailRecord(this.NoteRecord);
        }



        internal override void AfterInsert(HSSFPatriarch patriarch)
        {
            base.AfterInsert(patriarch);
            patriarch.GetBoundAggregate().AddTailRecord(NoteRecord);
        }

        protected override EscherContainerRecord CreateSpContainer()
        {
            EscherContainerRecord spContainer = base.CreateSpContainer();
            EscherOptRecord opt = (EscherOptRecord)spContainer.GetChildById(EscherOptRecord.RECORD_ID);
            opt.RemoveEscherProperty(EscherProperties.TEXT__TEXTLEFT);
            opt.RemoveEscherProperty(EscherProperties.TEXT__TEXTRIGHT);
            opt.RemoveEscherProperty(EscherProperties.TEXT__TEXTTOP);
            opt.RemoveEscherProperty(EscherProperties.TEXT__TEXTBOTTOM);
            opt.SetEscherProperty(new EscherSimpleProperty(EscherProperties.GROUPSHAPE__PRINT, false, false, GROUP_SHAPE_PROPERTY_DEFAULT_VALUE));
            return spContainer;
        }


        protected override ObjRecord CreateObjRecord()
        {
            ObjRecord obj = new ObjRecord();
            CommonObjectDataSubRecord c = new CommonObjectDataSubRecord();
            c.ObjectType = (CommonObjectType)OBJECT_TYPE_COMMENT;
            c.IsLocked = (true);
            c.IsPrintable = (true);
            c.IsAutoFill = (false);
            c.IsAutoline = (true);

            NoteStructureSubRecord u = new NoteStructureSubRecord();
            EndSubRecord e = new EndSubRecord();
            obj.AddSubRecord(c);
            obj.AddSubRecord(u);
            obj.AddSubRecord(e);
            return obj;
        }

        private NoteRecord CreateNoteRecord()
        {
            NoteRecord note = new NoteRecord();
            note.Flags = (NoteRecord.NOTE_HIDDEN);
            note.Author = ("");
            return note;
        }
        

        internal override void AfterRemove(HSSFPatriarch patriarch)
        {
            base.AfterRemove(patriarch);
            patriarch.GetBoundAggregate().RemoveTailRecord(this.NoteRecord);
        }
        internal override HSSFShape CloneShape()
        {
            TextObjectRecord txo = (TextObjectRecord)GetTextObjectRecord().CloneViaReserialise();
            EscherContainerRecord spContainer = new EscherContainerRecord();
            byte[] inSp = GetEscherContainer().Serialize();
            spContainer.FillFields(inSp, 0, new DefaultEscherRecordFactory());
            ObjRecord obj = (ObjRecord)GetObjRecord().CloneViaReserialise();
            NoteRecord note = (NoteRecord)NoteRecord.CloneViaReserialise();
            return new HSSFComment(spContainer, obj, txo, note);
        }


        [Test]
        public void TestRead()
        {

            NoteRecord record = new NoteRecord(TestcaseRecordInputStream.Create(NoteRecord.sid, testData));

            Assert.AreEqual(NoteRecord.sid, record.Sid);

            Assert.AreEqual(6, record.Row);
            Assert.AreEqual(1, record.Column);
            Assert.AreEqual(NoteRecord.NOTE_VISIBLE, record.Flags);
            Assert.AreEqual(1026, record.ShapeId);
            Assert.AreEqual("Apache Software Foundation", record.Author);

        }
        [Test]
        public void TestWrite()
        {
            NoteRecord record = new NoteRecord();
            Assert.AreEqual(NoteRecord.sid, record.Sid);

            record.Row = ((short)6);
            record.Column = ((short)1);
            record.Flags = (NoteRecord.NOTE_VISIBLE);
            record.ShapeId = ((short)1026);
            record.Author = ("Apache Software Foundation");

            byte[] ser = record.Serialize();
            TestcaseRecordInputStream.ConfirmRecordEncoding(NoteRecord.sid, testData, ser);
        }
        [Test]
        public void TestClone()
        {
            NoteRecord record = new NoteRecord();

            record.Row = ((short)1);
            record.Column = ((short)2);
            record.Flags = (NoteRecord.NOTE_VISIBLE);
            record.ShapeId = ((short)1026);
            record.Author = ("Apache Software Foundation");

            NoteRecord cloned = (NoteRecord)record.Clone();
            Assert.AreEqual(record.Row, cloned.Row);
            Assert.AreEqual(record.Column, cloned.Column);
            Assert.AreEqual(record.Flags, cloned.Flags);
            Assert.AreEqual(record.ShapeId, cloned.ShapeId);
            Assert.AreEqual(record.Author, cloned.Author);

            //finally check that the Serialized data is1 the same
            byte[] src = record.Serialize();
            byte[] cln = cloned.Serialize();
            Assert.IsTrue(NPOI.Util.Arrays.Equals(src, cln));
        }
        [Test]
        public void TestUnicodeAuthor()
        {
            // This sample data was created by setting the 'user name' field in the 'Personalize' 
            // section of Excel's options to \u30A2\u30D1\u30C3\u30C1\u65CF, and then 
            // creating a cell comment.
            byte[] data = HexRead.ReadFromString("01 00 01 00 00 00 03 00 " +
                    "05 00 01 " + // len=5, 16bit
                    "A2 30 D1 30 C3 30 C1 30 CF 65 " + // character data 
                    "00 " // padding byte
                    );
            RecordInputStream in1 = TestcaseRecordInputStream.Create(NoteRecord.sid, data);
            NoteRecord nr = new NoteRecord(in1);
            if ("\u00A2\u0030\u00D1\u0030\u00C3".Equals(nr.Author))
            {
                throw new AssertionException("Identified bug in reading note with unicode author");
            }
            Assert.AreEqual("\u30A2\u30D1\u30C3\u30C1\u65CF", nr.Author);
            Assert.IsTrue(nr.AuthorIsMultibyte);

            byte[] ser = nr.Serialize();
            TestcaseRecordInputStream.ConfirmRecordEncoding(NoteRecord.sid, data, ser);

            // Re-check
            in1 = TestcaseRecordInputStream.Create(ser);
            nr = new NoteRecord(in1);
            Assert.AreEqual("\u30A2\u30D1\u30C3\u30C1\u65CF", nr.Author);
            Assert.IsTrue(nr.AuthorIsMultibyte);


            // Change to a non unicode author, will stop being unicode
            nr.Author = ("Simple");
            ser = nr.Serialize();
            in1 = TestcaseRecordInputStream.Create(ser);
            nr = new NoteRecord(in1);

            Assert.AreEqual("Simple", nr.Author);
            Assert.IsFalse(nr.AuthorIsMultibyte);

            // Now set it back again
            nr.Author = ("Unicode\u1234");
            ser = nr.Serialize();
            in1 = TestcaseRecordInputStream.Create(ser);
            nr = new NoteRecord(in1);

            Assert.AreEqual("Unicode\u1234", nr.Author);
            Assert.IsTrue(nr.AuthorIsMultibyte);
        }


        [Test]
        public void TestRead()
        {

            NoteRecord record = new NoteRecord(TestcaseRecordInputStream.Create(NoteRecord.sid, testData));

            Assert.AreEqual(NoteRecord.sid, record.Sid);

            Assert.AreEqual(6, record.Row);
            Assert.AreEqual(1, record.Column);
            Assert.AreEqual(NoteRecord.NOTE_VISIBLE, record.Flags);
            Assert.AreEqual(1026, record.ShapeId);
            Assert.AreEqual("Apache Software Foundation", record.Author);

        }
        [Test]
        public void TestWrite()
        {
            NoteRecord record = new NoteRecord();
            Assert.AreEqual(NoteRecord.sid, record.Sid);

            record.Row = ((short)6);
            record.Column = ((short)1);
            record.Flags = (NoteRecord.NOTE_VISIBLE);
            record.ShapeId = ((short)1026);
            record.Author = ("Apache Software Foundation");

            byte[] ser = record.Serialize();
            TestcaseRecordInputStream.ConfirmRecordEncoding(NoteRecord.sid, testData, ser);
        }
        [Test]
        public void TestClone()
        {
            NoteRecord record = new NoteRecord();

            record.Row = ((short)1);
            record.Column = ((short)2);
            record.Flags = (NoteRecord.NOTE_VISIBLE);
            record.ShapeId = ((short)1026);
            record.Author = ("Apache Software Foundation");

            NoteRecord cloned = (NoteRecord)record.Clone();
            Assert.AreEqual(record.Row, cloned.Row);
            Assert.AreEqual(record.Column, cloned.Column);
            Assert.AreEqual(record.Flags, cloned.Flags);
            Assert.AreEqual(record.ShapeId, cloned.ShapeId);
            Assert.AreEqual(record.Author, cloned.Author);

            //finally check that the Serialized data is1 the same
            byte[] src = record.Serialize();
            byte[] cln = cloned.Serialize();
            Assert.IsTrue(NPOI.Util.Arrays.Equals(src, cln));
        }
        [Test]
        public void TestUnicodeAuthor()
        {
            // This sample data was created by setting the 'user name' field in the 'Personalize' 
            // section of Excel's options to \u30A2\u30D1\u30C3\u30C1\u65CF, and then 
            // creating a cell comment.
            byte[] data = HexRead.ReadFromString("01 00 01 00 00 00 03 00 " +
                    "05 00 01 " + // len=5, 16bit
                    "A2 30 D1 30 C3 30 C1 30 CF 65 " + // character data 
                    "00 " // padding byte
                    );
            RecordInputStream in1 = TestcaseRecordInputStream.Create(NoteRecord.sid, data);
            NoteRecord nr = new NoteRecord(in1);
            if ("\u00A2\u0030\u00D1\u0030\u00C3".Equals(nr.Author))
            {
                throw new AssertionException("Identified bug in reading note with unicode author");
            }
            Assert.AreEqual("\u30A2\u30D1\u30C3\u30C1\u65CF", nr.Author);
            Assert.IsTrue(nr.AuthorIsMultibyte);

            byte[] ser = nr.Serialize();
            TestcaseRecordInputStream.ConfirmRecordEncoding(NoteRecord.sid, data, ser);

            // Re-check
            in1 = TestcaseRecordInputStream.Create(ser);
            nr = new NoteRecord(in1);
            Assert.AreEqual("\u30A2\u30D1\u30C3\u30C1\u65CF", nr.Author);
            Assert.IsTrue(nr.AuthorIsMultibyte);


            // Change to a non unicode author, will stop being unicode
            nr.Author = ("Simple");
            ser = nr.Serialize();
            in1 = TestcaseRecordInputStream.Create(ser);
            nr = new NoteRecord(in1);

            Assert.AreEqual("Simple", nr.Author);
            Assert.IsFalse(nr.AuthorIsMultibyte);

            // Now set it back again
            nr.Author = ("Unicode\u1234");
            ser = nr.Serialize();
            in1 = TestcaseRecordInputStream.Create(ser);
            nr = new NoteRecord(in1);

            Assert.AreEqual("Unicode\u1234", nr.Author);
            Assert.IsTrue(nr.AuthorIsMultibyte);
        }


        /// <summary>
        /// Creates the low level NoteRecord
        /// which holds the comment attributes.
        /// </summary>
        /// <param name="shape">The shape.</param>
        /// <param name="shapeId">The shape id.</param>
        /// <returns></returns>
        private NoteRecord CreateNoteRecord(HSSFComment shape, int shapeId)
        {
            NoteRecord note = new NoteRecord();
            note.Column = shape.Column;
            note.Row = shape.Row;
            note.Flags = (shape.Visible ? NoteRecord.NOTE_VISIBLE : NoteRecord.NOTE_HIDDEN);
            note.ShapeId = shapeId;
            note.Author = (shape.Author == null ? "" : shape.Author);
            return note;
        }

        /// <summary>
        /// Sets standard escher options for a comment.
        /// This method is responsible for Setting default background,
        /// shading and other comment properties.
        /// </summary>
        /// <param name="shape">The highlevel shape.</param>
        /// <param name="opt">The escher records holding the proerties</param>
        /// <returns>The number of escher options added</returns>
        protected override int AddStandardOptions(HSSFShape shape, EscherOptRecord opt)
        {
            base.AddStandardOptions(shape, opt);

            //Remove Unnecessary properties inherited from TextboxShape
            for (int i = 0; i < opt.EscherProperties.Count; i++ )
            {
                EscherProperty prop = opt.EscherProperties[i];
                switch (prop.Id)
                {
                    case EscherProperties.TEXT__TEXTLEFT:
                    case EscherProperties.TEXT__TEXTRIGHT:
                    case EscherProperties.TEXT__TEXTTOP:
                    case EscherProperties.TEXT__TEXTBOTTOM:
                    case EscherProperties.GROUPSHAPE__PRINT:
                    case EscherProperties.Fill__FillBACKCOLOR:
                    case EscherProperties.LINESTYLE__COLOR:
                        opt.EscherProperties.Remove(prop);
                        i--;
                        break;
                }
            }

            HSSFComment comment = (HSSFComment)shape;
            opt.AddEscherProperty(new EscherSimpleProperty(EscherProperties.GROUPSHAPE__PRINT, comment.Visible ? 0x000A0000 : 0x000A0002));
            opt.AddEscherProperty(new EscherSimpleProperty(EscherProperties.SHADOWSTYLE__SHADOWOBSURED, 0x00030003));
            opt.AddEscherProperty(new EscherSimpleProperty(EscherProperties.SHADOWSTYLE__COLOR, 0x00000000));
            opt.SortProperties();
            return opt.EscherProperties.Count;   // # options Added
        }
        protected override int GetCmoObjectId(int shapeId)
        {
            return shapeId;
        }


        /// <summary>
        /// Creates the low level NoteRecord
        /// which holds the comment attributes.
        /// </summary>
        /// <param name="shape">The shape.</param>
        /// <param name="shapeId">The shape id.</param>
        /// <returns></returns>
        private NoteRecord CreateNoteRecord(HSSFComment shape, int shapeId)
        {
            NoteRecord note = new NoteRecord();
            note.Column = shape.Column;
            note.Row = shape.Row;
            note.Flags = (shape.Visible ? NoteRecord.NOTE_VISIBLE : NoteRecord.NOTE_HIDDEN);
            note.ShapeId = shapeId;
            note.Author = (shape.Author == null ? "" : shape.Author);
            return note;
        }

        /// <summary>
        /// Sets standard escher options for a comment.
        /// This method is responsible for Setting default background,
        /// shading and other comment properties.
        /// </summary>
        /// <param name="shape">The highlevel shape.</param>
        /// <param name="opt">The escher records holding the proerties</param>
        /// <returns>The number of escher options added</returns>
        protected override int AddStandardOptions(HSSFShape shape, EscherOptRecord opt)
        {
            base.AddStandardOptions(shape, opt);

            //Remove Unnecessary properties inherited from TextboxShape
            for (int i = 0; i < opt.EscherProperties.Count; i++ )
            {
                EscherProperty prop = opt.EscherProperties[i];
                switch (prop.Id)
                {
                    case EscherProperties.TEXT__TEXTLEFT:
                    case EscherProperties.TEXT__TEXTRIGHT:
                    case EscherProperties.TEXT__TEXTTOP:
                    case EscherProperties.TEXT__TEXTBOTTOM:
                    case EscherProperties.GROUPSHAPE__PRINT:
                    case EscherProperties.Fill__FillBACKCOLOR:
                    case EscherProperties.LINESTYLE__COLOR:
                        opt.EscherProperties.Remove(prop);
                        i--;
                        break;
                }
            }

            HSSFComment comment = (HSSFComment)shape;
            opt.AddEscherProperty(new EscherSimpleProperty(EscherProperties.GROUPSHAPE__PRINT, comment.Visible ? 0x000A0000 : 0x000A0002));
            opt.AddEscherProperty(new EscherSimpleProperty(EscherProperties.SHADOWSTYLE__SHADOWOBSURED, 0x00030003));
            opt.AddEscherProperty(new EscherSimpleProperty(EscherProperties.SHADOWSTYLE__COLOR, 0x00000000));
            opt.SortProperties();
            return opt.EscherProperties.Count;   // # options Added
        }
        protected override int GetCmoObjectId(int shapeId)
        {
            return shapeId;
        }



        internal override void AfterInsert(HSSFPatriarch patriarch)
        {
            base.AfterInsert(patriarch);
            patriarch.getBoundAggregate().AddTailRecord(NoteRecord);
        }

        protected override EscherContainerRecord CreateSpContainer()
        {
            EscherContainerRecord spContainer = base.CreateSpContainer();
            EscherOptRecord opt = (EscherOptRecord)spContainer.GetChildById(EscherOptRecord.RECORD_ID);
            opt.RemoveEscherProperty(EscherProperties.TEXT__TEXTLEFT);
            opt.RemoveEscherProperty(EscherProperties.TEXT__TEXTRIGHT);
            opt.RemoveEscherProperty(EscherProperties.TEXT__TEXTTOP);
            opt.RemoveEscherProperty(EscherProperties.TEXT__TEXTBOTTOM);
            opt.SetEscherProperty(new EscherSimpleProperty(EscherProperties.GROUPSHAPE__PRINT, false, false, 655362));
            return spContainer;
        }


        protected override ObjRecord CreateObjRecord()
        {
            ObjRecord obj = new ObjRecord();
            CommonObjectDataSubRecord c = new CommonObjectDataSubRecord();
            c.ObjectType = (CommonObjectType)OBJECT_TYPE_COMMENT;
            c.IsLocked = (true);
            c.IsPrintable = (true);
            c.IsAutoFill = (false);
            c.IsAutoline = (true);

            NoteStructureSubRecord u = new NoteStructureSubRecord();
            EndSubRecord e = new EndSubRecord();
            obj.AddSubRecord(c);
            obj.AddSubRecord(u);
            obj.AddSubRecord(e);
            return obj;
        }

        private NoteRecord CreateNoteRecord()
        {
            NoteRecord note = new NoteRecord();
            note.Flags = (NoteRecord.NOTE_HIDDEN);
            note.Author = ("");
            return note;
        }
        

        internal override void AfterRemove(HSSFPatriarch patriarch)
        {
            base.AfterRemove(patriarch);
            patriarch.getBoundAggregate().RemoveTailRecord(this.NoteRecord);
        }
        internal override HSSFShape CloneShape()
        {
            TextObjectRecord txo = (TextObjectRecord)GetTextObjectRecord().CloneViaReserialise();
            EscherContainerRecord spContainer = new EscherContainerRecord();
            byte[] inSp = GetEscherContainer().Serialize();
            spContainer.FillFields(inSp, 0, new DefaultEscherRecordFactory());
            ObjRecord obj = (ObjRecord)GetObjRecord().CloneViaReserialise();
            NoteRecord note = (NoteRecord)NoteRecord.CloneViaReserialise();
            return new HSSFComment(spContainer, obj, txo, note);
        }


        /// <summary>
        /// Creates the low level NoteRecord
        /// which holds the comment attributes.
        /// </summary>
        /// <param name="shape">The shape.</param>
        /// <param name="shapeId">The shape id.</param>
        /// <returns></returns>
        private NoteRecord CreateNoteRecord(HSSFComment shape, int shapeId)
        {
            NoteRecord note = new NoteRecord();
            note.Column = shape.Column;
            note.Row = shape.Row;
            note.Flags = (shape.Visible ? NoteRecord.NOTE_VISIBLE : NoteRecord.NOTE_HIDDEN);
            note.ShapeId = shapeId;
            note.Author = (shape.Author == null ? "" : shape.Author);
            return note;
        }

        /// <summary>
        /// Sets standard escher options for a comment.
        /// This method is responsible for Setting default background,
        /// shading and other comment properties.
        /// </summary>
        /// <param name="shape">The highlevel shape.</param>
        /// <param name="opt">The escher records holding the proerties</param>
        /// <returns>The number of escher options added</returns>
        protected override int AddStandardOptions(HSSFShape shape, EscherOptRecord opt)
        {
            base.AddStandardOptions(shape, opt);

            //Remove Unnecessary properties inherited from TextboxShape
            for (int i = 0; i < opt.EscherProperties.Count; i++ )
            {
                EscherProperty prop = opt.EscherProperties[i];
                switch (prop.Id)
                {
                    case EscherProperties.TEXT__TEXTLEFT:
                    case EscherProperties.TEXT__TEXTRIGHT:
                    case EscherProperties.TEXT__TEXTTOP:
                    case EscherProperties.TEXT__TEXTBOTTOM:
                    case EscherProperties.GROUPSHAPE__PRINT:
                    case EscherProperties.Fill__FillBACKCOLOR:
                    case EscherProperties.LINESTYLE__COLOR:
                        opt.EscherProperties.Remove(prop);
                        i--;
                        break;
                }
            }

            HSSFComment comment = (HSSFComment)shape;
            opt.AddEscherProperty(new EscherSimpleProperty(EscherProperties.GROUPSHAPE__PRINT, comment.Visible ? 0x000A0000 : 0x000A0002));
            opt.AddEscherProperty(new EscherSimpleProperty(EscherProperties.SHADOWSTYLE__SHADOWOBSURED, 0x00030003));
            opt.AddEscherProperty(new EscherSimpleProperty(EscherProperties.SHADOWSTYLE__COLOR, 0x00000000));
            opt.SortProperties();
            return opt.EscherProperties.Count;   // # options Added
        }
        protected override int GetCmoObjectId(int shapeId)
        {
            return shapeId;
        }


        /**
         * Serialize the record data into the supplied array of bytes
         *
         * @param offset offset in the <c>data</c>
         * @param data the data to Serialize into
         *
         * @return size of the record
         */
        public override void Serialize(ILittleEndianOutput out1)
        {
            out1.WriteShort(field_1_row);
		    out1.WriteShort(field_2_col);
		    out1.WriteShort(field_3_flags);
		    out1.WriteShort(field_4_shapeid);
		    out1.WriteShort(field_6_author.Length);
		    out1.WriteByte(field_5_hasMultibyte ? 0x01 : 0x00);
		    if (field_5_hasMultibyte) {
			    StringUtil.PutUnicodeLE(field_6_author, out1);
		    } else {
			    StringUtil.PutCompressedUnicode(field_6_author, out1);
		    }
		    if (field_7_padding != null) {
			    out1.WriteByte(Convert.ToInt32(field_7_padding, CultureInfo.InvariantCulture));
		    }

        }

        /**
         * Convert this record to string.
         * Used by BiffViewer and other utulities.
         */
        public override String ToString()
        {
            StringBuilder buffer = new StringBuilder();

            buffer.Append("[NOTE]\n");
            buffer.Append("    .recordid = 0x" + StringUtil.ToHexString(Sid) + ", size = " + RecordSize + "\n");
            buffer.Append("    .row =     " + field_1_row + "\n");
            buffer.Append("    .col =     " + field_2_col + "\n");
            buffer.Append("    .flags =   " + field_3_flags + "\n");
            buffer.Append("    .shapeid = " + field_4_shapeid + "\n");
            buffer.Append("    .author =  " + field_6_author + "\n");
            buffer.Append("[/NOTE]\n");
            return buffer.ToString();
        }

        public override Object Clone()
        {
            NoteRecord rec = new NoteRecord();
            rec.field_1_row = field_1_row;
            rec.field_2_col = field_2_col;
            rec.field_3_flags = field_3_flags;
            rec.field_4_shapeid = field_4_shapeid;
            rec.field_6_author = field_6_author;
            return rec;
        }


        /// <summary>
        /// Creates the low level NoteRecord
        /// which holds the comment attributes.
        /// </summary>
        /// <param name="shape">The shape.</param>
        /// <param name="shapeId">The shape id.</param>
        /// <returns></returns>
        private NoteRecord CreateNoteRecord(HSSFComment shape, int shapeId)
        {
            NoteRecord note = new NoteRecord();
            note.Column = shape.Column;
            note.Row = shape.Row;
            note.Flags = (shape.Visible ? NoteRecord.NOTE_VISIBLE : NoteRecord.NOTE_HIDDEN);
            note.ShapeId = shapeId;
            note.Author = (shape.Author == null ? "" : shape.Author);
            return note;
        }

        /// <summary>
        /// Sets standard escher options for a comment.
        /// This method is responsible for Setting default background,
        /// shading and other comment properties.
        /// </summary>
        /// <param name="shape">The highlevel shape.</param>
        /// <param name="opt">The escher records holding the proerties</param>
        /// <returns>The number of escher options added</returns>
        protected override int AddStandardOptions(HSSFShape shape, EscherOptRecord opt)
        {
            base.AddStandardOptions(shape, opt);

            //Remove Unnecessary properties inherited from TextboxShape
            for (int i = 0; i < opt.EscherProperties.Count; i++ )
            {
                EscherProperty prop = opt.EscherProperties[i];
                switch (prop.Id)
                {
                    case EscherProperties.TEXT__TEXTLEFT:
                    case EscherProperties.TEXT__TEXTRIGHT:
                    case EscherProperties.TEXT__TEXTTOP:
                    case EscherProperties.TEXT__TEXTBOTTOM:
                    case EscherProperties.GROUPSHAPE__PRINT:
                    case EscherProperties.FILL__FILLBACKCOLOR:
                    case EscherProperties.LINESTYLE__COLOR:
                        opt.EscherProperties.Remove(prop);
                        i--;
                        break;
                }
            }

            HSSFComment comment = (HSSFComment)shape;
            opt.AddEscherProperty(new EscherSimpleProperty(EscherProperties.GROUPSHAPE__PRINT, comment.Visible ? 0x000A0000 : 0x000A0002));
            opt.AddEscherProperty(new EscherSimpleProperty(EscherProperties.SHADOWSTYLE__SHADOWOBSURED, 0x00030003));
            opt.AddEscherProperty(new EscherSimpleProperty(EscherProperties.SHADOWSTYLE__COLOR, 0x00000000));
            opt.SortProperties();
            return opt.EscherProperties.Count;   // # options Added
        }
        protected override int GetCmoObjectId(int shapeId)
        {
            return shapeId;
        }

NPOI.HSSF.Record.NoteRecord : ICloneable

Fields :

public static NoteRecord[] EMPTY_ARRAY
public static Int16 sid
public static Int16 NOTE_HIDDEN
public static Int16 NOTE_VISIBLE

Constructors :

public NoteRecord()
public NoteRecord(RecordInputStream in1 = )

Methods :

public Int16 get_Sid()
public Void Serialize(ILittleEndianOutput out1 = )
public String ToString()
public Int32 get_Row()
public Void set_Row(Int32 value = )
public Int32 get_Column()
public Void set_Column(Int32 value = )
public Int16 get_Flags()
public Void set_Flags(Int16 value = )
public Int32 get_ShapeId()
public Void set_ShapeId(Int32 value = )
public String get_Author()
public Void set_Author(String value = )
public Object Clone()
public Int32 get_RecordSize()
public Int32 Serialize(Int32 offset = , Byte[] data = )
public Byte[] Serialize()
public Record CloneViaReserialise()
public Type GetType()
public Boolean Equals(Object obj = )
public Int32 GetHashCode()

Other methods