private void CreateCommonStyleContent()
{
XmlNode nodeCommonStyles = this.DocumentStyles.Styles.SelectSingleNode(
"office:document-styles/office:styles", this.NamespaceManager);
nodeCommonStyles.InnerXml = "";
foreach(IStyle style in this.CommonStyles.ToValueList())
{
XmlNode nodeStyle = this.DocumentStyles.Styles.ImportNode(style.Node, true);
nodeCommonStyles.AppendChild(nodeStyle);
}
//Remove styles node
nodeCommonStyles = this.XmlDoc.SelectSingleNode(
"office:document-content/office:styles", this.NamespaceManager);
if (nodeCommonStyles != null)
this.XmlDoc.SelectSingleNode(
"office:document-content", this.NamespaceManager).RemoveChild(nodeCommonStyles);
}