Example #1
0
        /**
         * Read document
         */

        internal override void OnDocumentRead()
        {
            FootnotesDocument notesDoc;
            Stream            is1 = null;

            try
            {
                is1 = GetPackagePart().GetInputStream();
                XmlDocument xmldoc = ConvertStreamToXml(is1);
                notesDoc    = FootnotesDocument.Parse(xmldoc, NamespaceManager);
                ctFootnotes = notesDoc.Footnotes;
            }
            catch (XmlException)
            {
                throw new POIXMLException();
            }
            finally
            {
                if (is1 != null)
                {
                    is1.Close();
                }
            }
            //get any Footnote
            if (ctFootnotes.footnote != null)
            {
                foreach (CT_FtnEdn note in ctFootnotes.footnote)
                {
                    listFootnote.Add(new XWPFFootnote(note, this));
                }
            }
        }
Example #2
0
 internal override void OnDocumentRead()
 {
     try
     {
         this.ctFootnotes = FootnotesDocument.Parse(this.GetPackagePart().GetInputStream()).Footnotes;
     }
     catch (XmlException ex)
     {
         throw new POIXMLException();
     }
     foreach (CT_FtnEdn footnote in this.ctFootnotes.FootnoteList)
     {
         this.listFootnote.Add(new XWPFFootnote(footnote, this));
     }
 }
Example #3
0
        /**
         * Read document
         */

        internal override void OnDocumentRead()
        {
            FootnotesDocument notesDoc;
            try {
               Stream is1 = GetPackagePart().GetInputStream();
               notesDoc = FootnotesDocument.Parse(is1);
               ctFootnotes = notesDoc.Footnotes;
            } catch (XmlException) {
               throw new POIXMLException();
            }
	   
            //get any Footnote
            foreach(CT_FtnEdn note in ctFootnotes.FootnoteList) {
               listFootnote.Add(new XWPFFootnote(note, this));
            }
        }
Example #4
0
        /**
         * Read document
         */

        internal override void OnDocumentRead()
        {
            FootnotesDocument notesDoc;

            try {
                Stream is1 = GetPackagePart().GetInputStream();
                notesDoc    = FootnotesDocument.Parse(is1);
                ctFootnotes = notesDoc.Footnotes;
            } catch (XmlException) {
                throw new POIXMLException();
            }

            //get any Footnote
            foreach (CT_FtnEdn note in ctFootnotes.FootnoteList)
            {
                listFootnote.Add(new XWPFFootnote(note, this));
            }
        }
Example #5
0
        /**
         * Read document
         */

        internal override void OnDocumentRead()
        {
            FootnotesDocument notesDoc;
            try {
               XmlDocument xmldoc = ConvertStreamToXml(GetPackagePart().GetInputStream());
               notesDoc = FootnotesDocument.Parse(xmldoc, NamespaceManager);
               ctFootnotes = notesDoc.Footnotes;
            } catch (XmlException) {
               throw new POIXMLException();
            }
	   
            //get any Footnote
            if (ctFootnotes.footnote != null)
            {
                foreach (CT_FtnEdn note in ctFootnotes.footnote)
                {
                    listFootnote.Add(new XWPFFootnote(note, this));
                }
            }
        }
Example #6
0
 public void SetFootnotes(CT_Footnotes footnotes)
 {
     this.ctFootnotes = footnotes;
 }
Example #7
0
 public FootnotesDocument(CT_Footnotes footnotes)
 {
     this.footnotes = footnotes;
 }
Example #8
0
 public FootnotesDocument()
 {
     footnotes = new CT_Footnotes();
 }
Example #9
0
 /**
  * Sets the ctFootnotes
  * @param footnotes
  */
 public void SetFootnotes(CT_Footnotes footnotes)
 {
     ctFootnotes = footnotes;
 }
Example #10
0
 public FootnotesDocument(CT_Footnotes footnotes)
 {
     this.footnotes = footnotes;
 }
Example #11
0
        public static FootnotesDocument Parse(XDocument doc, XmlNamespaceManager namespaceMgr)
        {
            CT_Footnotes obj = CT_Footnotes.Parse(doc.Document.Root, namespaceMgr);

            return(new FootnotesDocument(obj));
        }
Example #12
0
 public FootnotesDocument()
 {
     footnotes = new CT_Footnotes();
 }