AODL.Document.TextDocuments.TextDocument.CreateContentBody C# (CSharp) Method

CreateContentBody() private method

Creates the content body.
private CreateContentBody ( ) : void
return void
		private void CreateContentBody()
		{
			XmlNode nodeText		= this.XmlDoc.SelectSingleNode(
				TextDocumentHelper.OfficeTextPath, this.NamespaceManager);
			
			if (Forms.Count != 0)
			{
				XmlNode nodeForms = nodeText.SelectSingleNode("office:forms", this.NamespaceManager);
				if (nodeForms == null)
				{
					nodeForms = this.CreateNode("forms","office");
				}
				
				foreach (ODFForm f in Forms)
				{
					nodeForms.AppendChild(f.Node);
				}
				nodeText.AppendChild(nodeForms);
			}

			if (_varDecls.Count != 0)
			{
				XmlNode nodeVarDecls = nodeText.SelectSingleNode("text:variable-decls", this.NamespaceManager);
				if (nodeVarDecls == null)
				{
					nodeVarDecls = this.CreateNode("variable-decls","text");
				}
				
				foreach (VariableDecl vd in _varDecls)
				{
					nodeVarDecls.AppendChild(this.XmlDoc.ImportNode(vd.Node, true));
				}

				nodeText.AppendChild(nodeVarDecls);
			}
			
			foreach(IContent content in this.Content)
			{
				if (content is Table)
					((Table)content).BuildNode();
				nodeText.AppendChild(content.Node);
			}
			
			
			this.CreateLocalStyleContent();
			this.CreateCommonStyleContent();
		}