Example #1
0
        public bool RemoveShape(HSSFShape shape)
        {
            bool isRemoved = GetEscherContainer().RemoveChildRecord(shape.GetEscherContainer());

            if (isRemoved)
            {
                shape.AfterRemove(this.Patriarch);
                shapes.Remove(shape);
            }
            return(isRemoved);
        }
Example #2
0
        /**
         * @param shape to be removed
         * @return true of shape is removed
         */
        public bool RemoveShape(HSSFShape shape)
        {
            bool isRemoved = _mainSpgrContainer.RemoveChildRecord(shape.GetEscherContainer());

            if (isRemoved)
            {
                shape.AfterRemove(this);
                _shapes.Remove(shape);
            }
            return(isRemoved);
        }
Example #3
0
 private void OnCreate(HSSFShape shape)
 {
     if (this.Patriarch != null)
     {
         EscherContainerRecord spContainer = shape.GetEscherContainer();
         int shapeId = this.Patriarch.NewShapeId();
         shape.ShapeId = (shapeId);
         GetEscherContainer().AddChildRecord(spContainer);
         shape.AfterInsert(Patriarch);
         EscherSpRecord sp;
         if (shape is HSSFShapeGroup)
         {
             sp = (EscherSpRecord)shape.GetEscherContainer().ChildContainers[0].GetChildById(EscherSpRecord.RECORD_ID);
         }
         else
         {
             sp = (EscherSpRecord)shape.GetEscherContainer().GetChildById(EscherSpRecord.RECORD_ID);
         }
         sp.Flags = sp.Flags | EscherSpRecord.FLAG_CHILD;
     }
 }
Example #4
0
        private void SetFlipFlags(HSSFShape shape)
        {
            EscherSpRecord sp = (EscherSpRecord)shape.GetEscherContainer().GetChildById(EscherSpRecord.RECORD_ID);

            if (shape.Anchor.IsHorizontallyFlipped)
            {
                sp.Flags = (sp.Flags | EscherSpRecord.FLAG_FLIPHORIZ);
            }
            if (shape.Anchor.IsVerticallyFlipped)
            {
                sp.Flags = (sp.Flags | EscherSpRecord.FLAG_FLIPVERT);
            }
        }
Example #5
0
        private void OnCreate(HSSFShape shape)
        {
            EscherContainerRecord spgrContainer =
                _boundAggregate.GetEscherContainer().ChildContainers[0];

            EscherContainerRecord spContainer = shape.GetEscherContainer();
            int shapeId = NewShapeId();

            shape.ShapeId = shapeId;

            spgrContainer.AddChildRecord(spContainer);
            shape.AfterInsert(this);
            SetFlipFlags(shape);
        }
Example #6
0
 public static EscherContainerRecord GetEscherContainer(HSSFShape shape)
 {
     return shape.GetEscherContainer();
 }
Example #7
0
        private void OnCreate(HSSFShape shape)
        {
            EscherContainerRecord spgrContainer =
                    _boundAggregate.GetEscherContainer().ChildContainers[0];

            EscherContainerRecord spContainer = shape.GetEscherContainer();
            int shapeId = NewShapeId();
            shape.ShapeId = shapeId;

            spgrContainer.AddChildRecord(spContainer);
            shape.AfterInsert(this);
            SetFlipFlags(shape);
        }
Example #8
0
 private void SetFlipFlags(HSSFShape shape)
 {
     EscherSpRecord sp = (EscherSpRecord)shape.GetEscherContainer().GetChildById(EscherSpRecord.RECORD_ID);
     if (shape.Anchor.IsHorizontallyFlipped)
     {
         sp.Flags = (sp.Flags | EscherSpRecord.FLAG_FLIPHORIZ);
     }
     if (shape.Anchor.IsVerticallyFlipped)
     {
         sp.Flags = (sp.Flags | EscherSpRecord.FLAG_FLIPVERT);
     }
 }
Example #9
0
 /**
  * @param shape to be removed
  * @return true of shape is removed
  */
 public bool RemoveShape(HSSFShape shape)
 {
     bool isRemoved = _mainSpgrContainer.RemoveChildRecord(shape.GetEscherContainer());
     if (isRemoved)
     {
         shape.AfterRemove(this);
         _shapes.Remove(shape);
     }
     return isRemoved;
 }
Example #10
0
 public bool RemoveShape(HSSFShape shape)
 {
     bool isRemoved = GetEscherContainer().RemoveChildRecord(shape.GetEscherContainer());
     if (isRemoved)
     {
         shape.AfterRemove(this.Patriarch);
         shapes.Remove(shape);
     }
     return isRemoved;
 }
Example #11
0
 private void OnCreate(HSSFShape shape)
 {
     if (this.Patriarch != null)
     {
         EscherContainerRecord spContainer = shape.GetEscherContainer();
         int shapeId = this.Patriarch.NewShapeId();
         shape.ShapeId = (shapeId);
         GetEscherContainer().AddChildRecord(spContainer);
         shape.AfterInsert(Patriarch);
         EscherSpRecord sp;
         if (shape is HSSFShapeGroup)
         {
             sp = (EscherSpRecord)shape.GetEscherContainer().ChildContainers[0].GetChildById(EscherSpRecord.RECORD_ID);
         }
         else
         {
             sp = (EscherSpRecord)shape.GetEscherContainer().GetChildById(EscherSpRecord.RECORD_ID);
         }
         sp.Flags = sp.Flags | EscherSpRecord.FLAG_CHILD;
     }
 }