Beispiel #1
0
        //http://codereview/#3WF
        public void Copy(Format src)
        {
            Init();
            Office.ParagraphFormat2 srcFormat = src.UnderlyingObject;

            //Bullets
            this.format.Bullet.Font.Name           = srcFormat.Bullet.Font.Name;
            this.format.Bullet.Font.Bold           = srcFormat.Bullet.Font.Bold;
            this.format.Bullet.Font.Size           = srcFormat.Bullet.Font.Size;
            this.format.Bullet.Font.Fill.ForeColor = srcFormat.Bullet.Font.Fill.ForeColor;
            this.format.Bullet.Character           = srcFormat.Bullet.Character;
            this.format.Bullet.RelativeSize        = srcFormat.Bullet.RelativeSize;
            this.format.Bullet.Visible             = srcFormat.Bullet.Visible;
            //Indent
            this.format.FirstLineIndent    = srcFormat.FirstLineIndent;
            this.format.IndentLevel        = srcFormat.IndentLevel;
            this.format.LeftIndent         = srcFormat.LeftIndent;
            this.format.HangingPunctuation = srcFormat.HangingPunctuation;
            this.format.LineRuleBefore     = srcFormat.LineRuleBefore;
            this.format.LineRuleAfter      = srcFormat.LineRuleAfter;
            //Spacing
            this.format.SpaceBefore = srcFormat.SpaceBefore;
            this.format.SpaceAfter  = srcFormat.SpaceAfter;
            this.format.SpaceWithin = srcFormat.SpaceWithin;
        }
Beispiel #2
0
 private bool Init()
 {
     if (this.format == null && this.paragraph != null)
     {
         this.format = this.paragraph.UnderlyingObject.ParagraphFormat;
     }
     return(true);
 }
Beispiel #3
0
 public Format(Office.ParagraphFormat2 format)
 {
     this.format = format;
 }