Examples of RichTextRun


Examples of org.apache.poi.hslf.usermodel.RichTextRun

        MasterSheet masterSheet = slide.getMasterSheet();
        assertTrue(masterSheet instanceof TitleMaster);

        TextRun[] txt = slide.getTextRuns();
        for (int i = 0; i < txt.length; i++) {
            RichTextRun rt = txt[i].getRichTextRuns()[0];
            switch(txt[i].getRunType()){
                case TextHeaderAtom.CENTER_TITLE_TYPE:
                    assertEquals("Arial", rt.getFontName());
                    assertEquals(32, rt.getFontSize());
                    assertEquals(true, rt.isBold());
                    assertEquals(true, rt.isUnderlined());
                    break;
                case TextHeaderAtom.CENTRE_BODY_TYPE:
                    assertEquals("Courier New", rt.getFontName());
                    assertEquals(20, rt.getFontSize());
                    assertEquals(true, rt.isBold());
                    assertEquals(false, rt.isUnderlined());
                    break;
            }

        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.