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")); }
internal override void OnDocumentRead() { try { this.ctStyles = StylesDocument.Parse(this.GetPackagePart().GetInputStream()).Styles; this.latentStyles = new XWPFLatentStyles(this.ctStyles.latentStyles, this); } catch (XmlException ex) { throw new POIXMLException("Unable to read styles", (Exception) ex); } foreach (CT_Style style in (IEnumerable<CT_Style>) this.ctStyles.GetStyleList()) this.listStyle.Add(new XWPFStyle(style, this)); }
/** * Read document */ internal override void OnDocumentRead() { StylesDocument stylesDoc; try { XmlDocument doc = ConvertStreamToXml(GetPackagePart().GetInputStream()); stylesDoc = StylesDocument.Parse(doc, NamespaceManager); SetStyles(stylesDoc.Styles); latentStyles = new XWPFLatentStyles(ctStyles.latentStyles, this); } catch (XmlException e) { throw new POIXMLException("Unable to read styles", e); } }
/** * Read document */ internal override void OnDocumentRead() { StylesDocument stylesDoc; try { XmlDocument doc = ConvertStreamToXml(GetPackagePart().GetInputStream()); stylesDoc = StylesDocument.Parse(doc,NamespaceManager); SetStyles(stylesDoc.Styles); latentStyles = new XWPFLatentStyles(ctStyles.latentStyles, this); } catch (XmlException e) { throw new POIXMLException("Unable to read styles", e); } }
/** * Read document */ internal override void OnDocumentRead() { StylesDocument stylesDoc; try { Stream is1 = GetPackagePart().GetInputStream(); stylesDoc = StylesDocument.Parse(is1); ctStyles = stylesDoc.Styles; latentStyles = new XWPFLatentStyles(ctStyles.latentStyles, this); } catch (XmlException e) { throw new POIXMLException("Unable to read styles", e); } // Build up all the style objects foreach (CT_Style style in ctStyles.GetStyleList()) { listStyle.Add(new XWPFStyle(style, this)); } }
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")); }