Exemple #1
0
        //public void SetWrapTopAndBottom(uint distanceFromTop = 0, uint distanceFromBottom = 0, DW.EffectExtent effectExtent = null)
        private OpenXmlElement CreateWrapTopAndBottom(OXmlAnchorWrapTopAndBottom wrap)
        {
            // Top and Bottom Wrapping, <wp:wrapTopAndBottom>, possible child : EffectExtent <wp:effectExtent>
            DW.WrapTopBottom wrapElement = new DW.WrapTopBottom();

            // Distance From Text on Top Edge, <wp:wrapTopAndBottom distT>
            //wrapElement.DistanceFromTop = distanceFromTop;
            if (wrap.DistanceFromTop != null)
            {
                wrapElement.DistanceFromTop = (uint)wrap.DistanceFromTop;
            }

            // Distance From Text on Bottom Edge, <wp:wrapTopAndBottom distB>
            //wrapElement.DistanceFromBottom = distanceFromBottom;
            if (wrap.DistanceFromBottom != null)
            {
                wrapElement.DistanceFromBottom = (uint)wrap.DistanceFromBottom;
            }

            if (wrap.EffectExtent != null)
            {
                // Wrapping Boundaries <wp:effectExtent>
                //wrapElement.EffectExtent = effectExtent;
                wrapElement.EffectExtent = wrap.EffectExtent.ToEffectExtent();
            }

            //_wrapElement = wrapElement;
            return(wrapElement);
        }
Exemple #2
0
        //public void SetWrapTopAndBottom(uint distanceFromTop = 0, uint distanceFromBottom = 0, DW.EffectExtent effectExtent = null)
        private OpenXmlElement CreateWrapTopAndBottom(OXmlAnchorWrapTopAndBottom wrap)
        {
            // Top and Bottom Wrapping, <wp:wrapTopAndBottom>, possible child : EffectExtent <wp:effectExtent>
            DW.WrapTopBottom wrapElement = new DW.WrapTopBottom();

            // Distance From Text on Top Edge, <wp:wrapTopAndBottom distT>
            //wrapElement.DistanceFromTop = distanceFromTop;
            wrapElement.DistanceFromTop = wrap.DistanceFromTop;

            // Distance From Text on Bottom Edge, <wp:wrapTopAndBottom distB>
            //wrapElement.DistanceFromBottom = distanceFromBottom;
            wrapElement.DistanceFromBottom = wrap.DistanceFromBottom;

            if (wrap.EffectExtent != null)
                // Wrapping Boundaries <wp:effectExtent>
                //wrapElement.EffectExtent = effectExtent;
                wrapElement.EffectExtent = wrap.EffectExtent.ToEffectExtent();

            //_wrapElement = wrapElement;
            return wrapElement;
        }