Esempio n. 1
0
        public void TestUnderline()
        {
            CT_Font ctFont = new CT_Font();
            CT_UnderlineProperty underlinePropr = ctFont.AddNewU();

            underlinePropr.val = (ST_UnderlineValues.single);
            ctFont.SetUArray(0, underlinePropr);

            XSSFFont xssfFont = new XSSFFont(ctFont);

            Assert.AreEqual(FontUnderlineType.Single, xssfFont.Underline);

            xssfFont.SetUnderline(FontUnderlineType.Double);
            Assert.AreEqual(1, ctFont.u.Count);
            Assert.AreEqual(ST_UnderlineValues.@double, ctFont.GetUArray(0).val);

            xssfFont.SetUnderline(FontUnderlineType.DoubleAccounting);
            Assert.AreEqual(1, ctFont.u.Count);
            Assert.AreEqual(ST_UnderlineValues.doubleAccounting, ctFont.GetUArray(0).val);
        }
Esempio n. 2
0
        public void TestUnderline()
        {
            CT_Font ctFont = new CT_Font();
            CT_UnderlineProperty underlinePropr = ctFont.AddNewU();
            underlinePropr.val = (ST_UnderlineValues.single);
            ctFont.SetUArray(0, underlinePropr);

            XSSFFont xssfFont = new XSSFFont(ctFont);
            Assert.AreEqual(FontUnderlineType.Single, xssfFont.Underline);

            xssfFont.SetUnderline(FontUnderlineType.Double);
            Assert.AreEqual(1,ctFont.u.Count);
            Assert.AreEqual(ST_UnderlineValues.@double, ctFont.GetUArray(0).val);

            xssfFont.SetUnderline(FontUnderlineType.DoubleAccounting);
            Assert.AreEqual(1,ctFont.u.Count);
            Assert.AreEqual(ST_UnderlineValues.doubleAccounting, ctFont.GetUArray(0).val);
        }