001package com.hfg.xml.msofficexml.docx.wordprocessingml;
002
003
004import com.hfg.xml.XMLTag;
005
006public class WmlComments extends XMLTag
007{
008   private int mIdSrc = 1;
009
010   //---------------------------------------------------------------------------
011   public WmlComments()
012   {
013      super(WmlXML.COMMENTS);
014   }
015
016   //---------------------------------------------------------------------------
017   public int addComment(WmlParagraph inValue)
018   {
019      XMLTag commentTag = new XMLTag(WmlXML.COMMENT);
020      int id = mIdSrc++;
021      commentTag.setAttribute(WmlXML.ID_ATT, id);
022      addSubtag(commentTag);
023
024      commentTag.addSubtag(inValue);
025
026      return id;
027   }
028}