Esempio n. 1
0
        public static List <ppt.Shape> GroupShapesToShapes(ppt.GroupShapes groupitms)
        {
            var itm = new List <ppt.Shape>();

            foreach (ppt.Shape shape in groupitms)
            {
                itm.Add(shape);
            }
            return(itm);
        }
Esempio n. 2
0
        private static void GetChildShapes(ppt.GroupShapes groupShapes, ref List <ppt.Shape> allShapes)
        {
            foreach (ppt.Shape shape in groupShapes)
            {
                allShapes.Add(shape);

                if (shape.Type == MsoShapeType.msoGroup)
                {
                    GetChildShapes(shape.GroupItems, ref allShapes);
                }
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Get the groups items (set of shapes inside the group, essentially)
        /// associated with the given shape. Returns null if the shape is not
        /// a group.
        /// </summary>
        public PowerPoint.GroupShapes GetGroupItems(PowerPoint.Shape shape)
        {
            PowerPoint.GroupShapes shapes = null;
            int count = -1;

            try {
                shapes = shape.GroupItems;
                count  = shapes.Count;
            }
            catch (System.UnauthorizedAccessException)
            {
            }
            if (count >= 0)
            {
                return(shapes);
            }
            else
            {
                return(null);
            }
        }