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

CreateLocalStyleContent() private method

Creates the content of the local style.
private CreateLocalStyleContent ( ) : void
return void
		private void CreateLocalStyleContent()
		{
			XmlNode nodeAutomaticStyles		= this.XmlDoc.SelectSingleNode(
				TextDocumentHelper.AutomaticStylePath, this.NamespaceManager);

			foreach(IStyle style in this.Styles.ToValueList())
			{
				bool exist					= false;
				if (style.StyleName != null)
				{
					XmlNode node				= nodeAutomaticStyles.SelectSingleNode("style:style[@style:name='"+style.StyleName+"']",
					                                                       this.NamespaceManager);
					if (node != null)
						exist				= true;
				}
				if (!exist)
					nodeAutomaticStyles.AppendChild(style.Node);
			}
		}