Exemple #1
0
        public void TestScheme()
        {
            CT_Font       ctFont = new CT_Font();
            CT_FontScheme scheme = ctFont.AddNewScheme();

            scheme.val = (ST_FontScheme.major);
            ctFont.SetSchemeArray(0, scheme);

            XSSFFont font = new XSSFFont(ctFont);

            Assert.AreEqual(FontScheme.MAJOR, font.GetScheme());

            font.SetScheme(FontScheme.NONE);
            Assert.AreEqual(ST_FontScheme.none, ctFont.GetSchemeArray(0).val);
        }
Exemple #2
0
 private static XSSFFont CreateDefaultFont()
 {
     CT_Font ctFont = new CT_Font();
     XSSFFont xssfFont = new XSSFFont(ctFont, 0);
     xssfFont.FontHeightInPoints = (XSSFFont.DEFAULT_FONT_SIZE);
     xssfFont.Color = (XSSFFont.DEFAULT_FONT_COLOR);//SetTheme
     xssfFont.FontName = (XSSFFont.DEFAULT_FONT_NAME);
     xssfFont.SetFamily(FontFamily.SWISS);
     xssfFont.SetScheme(FontScheme.MINOR);
     return xssfFont;
 }
Exemple #3
0
        public void TestScheme()
        {
            CT_Font ctFont = new CT_Font();
            CT_FontScheme scheme = ctFont.AddNewScheme();
            scheme.val = (ST_FontScheme.major);
            ctFont.SetSchemeArray(0, scheme);

            XSSFFont font = new XSSFFont(ctFont);
            Assert.AreEqual(FontScheme.MAJOR, font.GetScheme());

            font.SetScheme(FontScheme.NONE);
            Assert.AreEqual(ST_FontScheme.none, ctFont.GetSchemeArray(0).val);
        }