コード例 #1
1
 private static OXmlAnchorWrapTopAndBottom CreateAnchorWrapTopAndBottom(BsonDocument element)
 {
     OXmlAnchorWrapTopAndBottom wrapTopAndBottom = new OXmlAnchorWrapTopAndBottom();
     wrapTopAndBottom.DistanceFromTop = (uint)element.zGet("DistanceFromTop").zAsInt();
     wrapTopAndBottom.DistanceFromBottom = (uint)element.zGet("DistanceFromBottom").zAsInt();
     wrapTopAndBottom.EffectExtent = CreateEffectExtent(element.zGet("EffectExtent").zAsBsonDocument());
     return wrapTopAndBottom;
 }
コード例 #2
0
ファイル: AnchorDrawing.cs プロジェクト: labeuze/source
        //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;
        }
コード例 #3
0
 private static void SerializeWrapTopBottom(BsonWriter bsonWriter, OXmlAnchorWrapTopAndBottom wrap)
 {
     if (wrap.DistanceFromTop != 0)
         bsonWriter.WriteInt32("DistanceFromTop", (int)wrap.DistanceFromTop);
     if (wrap.DistanceFromBottom != 0)
         bsonWriter.WriteInt32("DistanceFromBottom", (int)wrap.DistanceFromBottom);
     SerializeEffectExtent(bsonWriter, wrap.EffectExtent);
 }