示例#1
0
文件: Styles.cs 项目: xoposhiy/npoi
 public CT_Styles()
 {
     this.styleField = new List<CT_Style>();
     this.latentStylesField = new CT_LatentStyles();
     this.docDefaultsField = new CT_DocDefaults();
 }
示例#2
0
文件: Styles.cs 项目: kahinke/npoi
 public static CT_LatentStyles Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_LatentStyles ctObj = new CT_LatentStyles();
     if (node.Attributes["w:defLockedState"] != null)
         ctObj.defLockedState = (ST_OnOff)Enum.Parse(typeof(ST_OnOff), node.Attributes["w:defLockedState"].Value);
     ctObj.defUIPriority = XmlHelper.ReadString(node.Attributes["w:defUIPriority"]);
     if (node.Attributes["w:defSemiHidden"] != null)
         ctObj.defSemiHidden = (ST_OnOff)Enum.Parse(typeof(ST_OnOff), node.Attributes["w:defSemiHidden"].Value);
     if (node.Attributes["w:defUnhideWhenUsed"] != null)
         ctObj.defUnhideWhenUsed = (ST_OnOff)Enum.Parse(typeof(ST_OnOff), node.Attributes["w:defUnhideWhenUsed"].Value);
     if (node.Attributes["w:defQFormat"] != null)
         ctObj.defQFormat = (ST_OnOff)Enum.Parse(typeof(ST_OnOff), node.Attributes["w:defQFormat"].Value);
     ctObj.count = XmlHelper.ReadString(node.Attributes["w:count"]);
     ctObj.lsdException = new List<CT_LsdException>();
     foreach (XmlNode childNode in node.ChildNodes)
     {
         if (childNode.LocalName == "lsdException")
             ctObj.lsdException.Add(CT_LsdException.Parse(childNode, namespaceManager));
     }
     return ctObj;
 }
示例#3
0
        public void TestLatentStyles()
        {
            CT_LatentStyles latentStyles = new CT_LatentStyles();
            CT_LsdException ex = latentStyles.AddNewLsdException();
            ex.name=("ex1");
            XWPFLatentStyles ls = new XWPFLatentStyles(latentStyles);
            Assert.AreEqual(true, ls.IsLatentStyle("ex1"));

        }
示例#4
0
 public XWPFLatentStyles(CT_LatentStyles latentStyles, XWPFStyles styles)
 {
     this.latentStyles = latentStyles;
     this.styles = styles;
 }
示例#5
0
 public XWPFLatentStyles(CT_LatentStyles latentStyles)
     : this(latentStyles, null)
 {
     ;
 }
示例#6
0
 protected XWPFLatentStyles(CT_LatentStyles latentStyles)
     : this(latentStyles, null)
 {
     ;
 }