コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: HSSFSimpleShape.cs プロジェクト: zbl960/npoi
        protected override EscherContainerRecord CreateSpContainer()
        {
            EscherContainerRecord spContainer = new EscherContainerRecord();

            spContainer.RecordId = EscherContainerRecord.SP_CONTAINER;
            spContainer.Options  = ((short)0x000F);

            EscherSpRecord sp = new EscherSpRecord();

            sp.RecordId = (EscherSpRecord.RECORD_ID);
            sp.Flags    = (EscherSpRecord.FLAG_HAVEANCHOR | EscherSpRecord.FLAG_HASSHAPETYPE);
            sp.Version  = ((short)0x2);

            EscherClientDataRecord clientData = new EscherClientDataRecord();

            clientData.RecordId = (EscherClientDataRecord.RECORD_ID);
            clientData.Options  = ((short)(0x0000));

            EscherOptRecord optRecord = new EscherOptRecord();

            optRecord.SetEscherProperty(new EscherSimpleProperty(EscherProperties.LINESTYLE__LINEDASHING, LINESTYLE_SOLID));
            optRecord.SetEscherProperty(new EscherBoolProperty(EscherProperties.LINESTYLE__NOLINEDRAWDASH, 0x00080008));
            //        optRecord.SetEscherProperty(new EscherSimpleProperty(EscherProperties.LINESTYLE__LINEWIDTH, LINEWIDTH_DEFAULT));
            optRecord.SetEscherProperty(new EscherRGBProperty(EscherProperties.FILL__FILLCOLOR, FILL__FILLCOLOR_DEFAULT));
            optRecord.SetEscherProperty(new EscherRGBProperty(EscherProperties.LINESTYLE__COLOR, LINESTYLE__COLOR_DEFAULT));
            optRecord.SetEscherProperty(new EscherBoolProperty(EscherProperties.FILL__NOFILLHITTEST, NO_FILLHITTEST_FALSE));
            optRecord.SetEscherProperty(new EscherBoolProperty(EscherProperties.LINESTYLE__NOLINEDRAWDASH, 0x00080008));

            optRecord.SetEscherProperty(new EscherShapePathProperty(EscherProperties.GEOMETRY__SHAPEPATH, EscherShapePathProperty.COMPLEX));
            optRecord.SetEscherProperty(new EscherBoolProperty(EscherProperties.GROUPSHAPE__PRINT, 0x080000));
            optRecord.RecordId = EscherOptRecord.RECORD_ID;

            EscherTextboxRecord escherTextbox = new EscherTextboxRecord();

            escherTextbox.RecordId = (EscherTextboxRecord.RECORD_ID);
            escherTextbox.Options  = (short)0x0000;

            spContainer.AddChildRecord(sp);
            spContainer.AddChildRecord(optRecord);
            spContainer.AddChildRecord(this.Anchor.GetEscherAnchor());
            spContainer.AddChildRecord(clientData);
            spContainer.AddChildRecord(escherTextbox);
            return(spContainer);
        }
コード例 #3
0
        protected override EscherContainerRecord CreateSpContainer()
        {
            EscherContainerRecord  spContainer   = new EscherContainerRecord();
            EscherSpRecord         sp            = new EscherSpRecord();
            EscherOptRecord        opt           = new EscherOptRecord();
            EscherClientDataRecord clientData    = new EscherClientDataRecord();
            EscherTextboxRecord    escherTextbox = new EscherTextboxRecord();

            spContainer.RecordId = (EscherContainerRecord.SP_CONTAINER);
            spContainer.Options  = ((short)0x000F);
            sp.RecordId          = (EscherSpRecord.RECORD_ID);
            sp.Options           = ((short)((EscherAggregate.ST_TEXTBOX << 4) | 0x2));

            sp.Flags     = (EscherSpRecord.FLAG_HAVEANCHOR | EscherSpRecord.FLAG_HASSHAPETYPE);
            opt.RecordId = (EscherOptRecord.RECORD_ID);
            opt.AddEscherProperty(new EscherSimpleProperty(EscherProperties.TEXT__TEXTID, 0));
            opt.AddEscherProperty(new EscherSimpleProperty(EscherProperties.TEXT__WRAPTEXT, 0));
            opt.AddEscherProperty(new EscherSimpleProperty(EscherProperties.TEXT__ANCHORTEXT, 0));
            opt.AddEscherProperty(new EscherSimpleProperty(EscherProperties.GROUPSHAPE__PRINT, 0x00080000));

            opt.AddEscherProperty(new EscherSimpleProperty(EscherProperties.TEXT__TEXTLEFT, 0));
            opt.AddEscherProperty(new EscherSimpleProperty(EscherProperties.TEXT__TEXTRIGHT, 0));
            opt.AddEscherProperty(new EscherSimpleProperty(EscherProperties.TEXT__TEXTTOP, 0));
            opt.AddEscherProperty(new EscherSimpleProperty(EscherProperties.TEXT__TEXTBOTTOM, 0));

            opt.SetEscherProperty(new EscherSimpleProperty(EscherProperties.LINESTYLE__LINEDASHING, LINESTYLE_SOLID));
            opt.SetEscherProperty(new EscherBoolProperty(EscherProperties.LINESTYLE__NOLINEDRAWDASH, 0x00080008));
            opt.SetEscherProperty(new EscherSimpleProperty(EscherProperties.LINESTYLE__LINEWIDTH, LINEWIDTH_DEFAULT));
            opt.SetEscherProperty(new EscherRGBProperty(EscherProperties.FILL__FILLCOLOR, FILL__FILLCOLOR_DEFAULT));
            opt.SetEscherProperty(new EscherRGBProperty(EscherProperties.LINESTYLE__COLOR, LINESTYLE__COLOR_DEFAULT));
            opt.SetEscherProperty(new EscherBoolProperty(EscherProperties.FILL__NOFILLHITTEST, NO_FILLHITTEST_FALSE));
            opt.SetEscherProperty(new EscherBoolProperty(EscherProperties.GROUPSHAPE__PRINT, 0x080000));

            EscherRecord anchor = Anchor.GetEscherAnchor();

            clientData.RecordId    = (EscherClientDataRecord.RECORD_ID);
            clientData.Options     = ((short)0x0000);
            escherTextbox.RecordId = (EscherTextboxRecord.RECORD_ID);
            escherTextbox.Options  = ((short)0x0000);

            spContainer.AddChildRecord(sp);
            spContainer.AddChildRecord(opt);
            spContainer.AddChildRecord(anchor);
            spContainer.AddChildRecord(clientData);
            spContainer.AddChildRecord(escherTextbox);

            return(spContainer);
        }
コード例 #4
0
        /**
         * Generates the shape records for this shape.
         */

        protected override EscherContainerRecord CreateSpContainer()
        {
            EscherContainerRecord  spContainer = new EscherContainerRecord();
            EscherSpRecord         sp          = new EscherSpRecord();
            EscherOptRecord        opt         = new EscherOptRecord();
            EscherClientDataRecord clientData  = new EscherClientDataRecord();

            spContainer.RecordId = (EscherContainerRecord.SP_CONTAINER);
            spContainer.Options  = ((short)0x000F);
            sp.RecordId          = (EscherSpRecord.RECORD_ID);
            sp.Options           = ((short)((EscherAggregate.ST_NOT_PRIMATIVE << 4) | 0x2));
            if (Parent == null)
            {
                sp.Flags = (EscherSpRecord.FLAG_HAVEANCHOR | EscherSpRecord.FLAG_HASSHAPETYPE);
            }
            else
            {
                sp.Flags = (EscherSpRecord.FLAG_CHILD | EscherSpRecord.FLAG_HAVEANCHOR | EscherSpRecord.FLAG_HASSHAPETYPE);
            }
            opt.RecordId = (EscherOptRecord.RECORD_ID);
            opt.SetEscherProperty(new EscherSimpleProperty(EscherProperties.TRANSFORM__ROTATION, false, false, 0));
            opt.SetEscherProperty(new EscherSimpleProperty(EscherProperties.GEOMETRY__RIGHT, false, false, 100));
            opt.SetEscherProperty(new EscherSimpleProperty(EscherProperties.GEOMETRY__BOTTOM, false, false, 100));
            opt.SetEscherProperty(new EscherShapePathProperty(EscherProperties.GEOMETRY__SHAPEPATH, EscherShapePathProperty.COMPLEX));

            opt.SetEscherProperty(new EscherSimpleProperty(EscherProperties.GEOMETRY__FILLOK, false, false, 0x00010001));
            opt.SetEscherProperty(new EscherSimpleProperty(EscherProperties.LINESTYLE__LINESTARTARROWHEAD, false, false, 0x0));
            opt.SetEscherProperty(new EscherSimpleProperty(EscherProperties.LINESTYLE__LINEENDARROWHEAD, false, false, 0x0));
            opt.SetEscherProperty(new EscherSimpleProperty(EscherProperties.LINESTYLE__LINEENDCAPSTYLE, false, false, 0x0));

            opt.SetEscherProperty(new EscherSimpleProperty(EscherProperties.LINESTYLE__LINEDASHING, LINESTYLE_SOLID));
            opt.SetEscherProperty(new EscherBoolProperty(EscherProperties.LINESTYLE__NOLINEDRAWDASH, 0x00080008));
            opt.SetEscherProperty(new EscherSimpleProperty(EscherProperties.LINESTYLE__LINEWIDTH, LINEWIDTH_DEFAULT));
            opt.SetEscherProperty(new EscherRGBProperty(EscherProperties.FILL__FILLCOLOR, FILL__FILLCOLOR_DEFAULT));
            opt.SetEscherProperty(new EscherRGBProperty(EscherProperties.LINESTYLE__COLOR, LINESTYLE__COLOR_DEFAULT));
            opt.SetEscherProperty(new EscherBoolProperty(EscherProperties.FILL__NOFILLHITTEST, 1));

            opt.SetEscherProperty(new EscherBoolProperty(EscherProperties.GROUPSHAPE__PRINT, 0x080000));

            EscherRecord anchor = Anchor.GetEscherAnchor();

            clientData.RecordId = (EscherClientDataRecord.RECORD_ID);
            clientData.Options  = ((short)0x0000);

            spContainer.AddChildRecord(sp);
            spContainer.AddChildRecord(opt);
            spContainer.AddChildRecord(anchor);
            spContainer.AddChildRecord(clientData);

            return(spContainer);
        }
コード例 #5
0
 protected void SetPropertyValue(EscherProperty property)
 {
     _optRecord.SetEscherProperty(property);
 }