コード例 #1
0
        protected override object CloneImpl()
        {
            ShapeObject obj2 = (ShapeObject)base.CloneImpl();

            obj2.textBoxItemCollection_0 = new TextBoxItemCollection(base.Document);
            this.textBoxItemCollection_0.method_12(obj2.textBoxItemCollection_0);
            obj2.bool_4 = true;
            return(obj2);
        }
コード例 #2
0
 internal DocOleObject(Document A_0, ShapeObject A_1) : base(A_0)
 {
     this.string_15    = string.Empty;
     this.string_16    = string.Empty;
     this.dictionary_0 = new Dictionary <string, Guid>();
     base.ShapePr      = A_1.ShapePr;
     this.string_13    = string.Empty;
     this.string_14    = string.Empty;
     base.OleFormat    = this;
 }
コード例 #3
0
 internal static bool smethod_1(ShapeObject A_0)
 {
     if (A_0 == null)
     {
         return(false);
     }
     if (!A_0.Filled)
     {
         return(A_0.HasImage);
     }
     return(true);
 }
コード例 #4
0
 private void method_85(ShapeObject A_0)
 {
     if (((A_0.ShapePr != null) && (A_0.ShapePr.Count > 0)) && !A_0.ShapePr.Equals(base.ShapePr))
     {
         List <int> list = new List <int>(A_0.ShapePr.PropertiesHash.Keys);
         foreach (int num in list)
         {
             base.ShapePr.PropertiesHash[num] = A_0.ShapePr.PropertiesHash[num];
         }
     }
     base.SetShapeType(ShapeType.OleObject);
 }
コード例 #5
0
        internal static ShapeObject smethod_2(Document A_0)
        {
            ShapeObject obj2 = new ShapeObject(A_0, ShapeType.Rectangle)
            {
                TextWrappingStyle = TextWrappingStyle.Inline,
                Filled            = true,
                FillColor         = Class628.color_0,
                Stroked           = false
            };

            obj2.HorizontalRule.method_1(true);
            obj2.HorizontalRule.method_5(true);
            obj2.Height = 1.5;
            if (A_0.Sections.Count > 0)
            {
                obj2.method_37((double)A_0.Sections[0].PageSetup.ClientWidth);
            }
            obj2.HorizontalRule.method_9(100.0);
            return(obj2);
        }
コード例 #6
0
 private void method_70(Paragraph A_0, ShapeObject A_1, ref int A_2)
 {
     if (A_0 != null)
     {
         if (A_1.DocumentObjectType == Spire.Doc.Documents.DocumentObjectType.ShapeGroup)
         {
             int num   = 0;
             int count = A_1.ChildObjects.Count;
             while (num < count)
             {
                 DocumentObject obj2 = A_1.ChildObjects[num];
                 if ((obj2 is ShapeObject) && (obj2.DocumentObjectType == Spire.Doc.Documents.DocumentObjectType.ShapeGroup))
                 {
                     this.method_70(A_0, obj2 as ShapeObject, ref A_2);
                 }
                 else
                 {
                     Spire.Doc.Fields.TextBox box2 = this.method_71(obj2 as ShapeObject);
                     if (box2 != null)
                     {
                         A_0.Items.InnerList.Insert(A_2, box2);
                         A_2++;
                     }
                 }
                 num++;
             }
         }
         else
         {
             Spire.Doc.Fields.TextBox box = this.method_71(A_1);
             if (box != null)
             {
                 A_0.Items.InnerList.Insert(A_2, box);
                 A_2++;
             }
         }
     }
 }
コード例 #7
0
        private Spire.Doc.Fields.TextBox method_71(ShapeObject A_0)
        {
            if (((A_0 == null) || (A_0.InternerTextbox == null)) || (A_0.InternerTextbox.ChildObjects.Count <= 0))
            {
                return(null);
            }
            Spire.Doc.Fields.TextBox box   = A_0.InternerTextbox.Clone() as Spire.Doc.Fields.TextBox;
            DocumentObject           owner = A_0.Owner;
            ShapeGroup    group            = null;
            List <PointF> list             = new List <PointF> {
                A_0.BoundsInPoints.Location
            };

            while (owner != null)
            {
                if (owner is Paragraph)
                {
                    break;
                }
                if (owner is ShapeGroup)
                {
                    group = owner as ShapeGroup;
                    list.Add(group.BoundsInPoints.Location);
                }
                owner = owner.Owner;
            }
            PointF tf = new PointF();

            if (list.Count > 1)
            {
                int num   = 1;
                int count = list.Count;
                while (num < count)
                {
                    PointF tf3 = list[num - 1];
                    PointF tf4 = list[num];
                    PointF tf5 = list[num - 1];
                    PointF tf6 = list[num];
                    PointF tf2 = new PointF(tf3.X - tf4.X, tf5.Y - tf6.Y);
                    tf.X += tf2.X;
                    tf.Y += tf2.Y;
                    num++;
                }
            }
            list = null;
            bool flag = (group != null) && (group.DocumentObjectType == Spire.Doc.Documents.DocumentObjectType.ShapeGroup);

            box.method_0(owner);
            if (flag)
            {
                box.Format.Width  = A_0.BoundsInPoints.Width;
                box.Format.Height = A_0.BoundsInPoints.Height;
                if (flag)
                {
                    box.Format.HorizontalAlignment = group.HorizontalAlignment;
                    box.Format.VerticalAlignment   = group.VerticalAlignment;
                    box.Format.HorizontalOrigin    = group.HorizontalOrigin;
                    box.Format.VerticalOrigin      = group.VerticalOrigin;
                    box.Format.HorizontalPosition  = tf.X;
                    box.Format.VerticalPosition    = tf.Y;
                    box.Format.OrderIndex          = group.ZOrderEx;
                }
                else
                {
                    box.Format.HorizontalPosition = A_0.HorizontalPosition;
                    box.Format.VerticalPosition   = A_0.VerticalPosition;
                    box.Format.OrderIndex         = A_0.ZOrderEx;
                }
            }
            box.Format.IsInShape      = true;
            box.ShapeInfo             = flag ? group : A_0;
            box.Format.IsInGroupShape = flag;
            if (A_0.TextBox != null)
            {
                box.Format.TextAnchor            = this.method_73(A_0.TextBox.method_14());
                box.Format.TextBoxWrapMode       = A_0.TextBox.method_12();
                box.Format.IsFitShapeToText      = A_0.TextBox.method_8();
                box.Format.InternalMargin.Bottom = (float)A_0.TextBox.method_6();
                box.Format.InternalMargin.Left   = (float)A_0.TextBox.method_0();
                box.Format.InternalMargin.Right  = (float)A_0.TextBox.method_2();
                box.Format.InternalMargin.Top    = (float)A_0.TextBox.method_4();
                box.Format.LayoutFlowAlt         = this.method_72(A_0.TextBox.method_10());
            }
            return(box);
        }
コード例 #8
0
 internal TextBox(IDocument A_0, ShapeObject A_1) : base((Document)A_0)
 {
     base.ShapePr = A_1.ShapePr;
     this.method_75(A_0);
 }