예제 #1
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"));
        }
예제 #2
0
 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));
 }
예제 #3
0
        /**
         * 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);
            }
        }
예제 #4
0
        /**
         * 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);
            }
        }
예제 #5
0
        /**
         * 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));
            }
        }
예제 #6
0
파일: XWPFStyles.cs 프로젝트: jdineshk/npoi
        /**
         * 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));
            }
        }
예제 #7
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"));

        }