Examples of CTFontSize


Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFontSize

    assertEquals(true,ctFont.getStrikeArray(0).getVal());
  }

  public void testFontHeight() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTFontSize size=ctFont.addNewSz();
    size.setVal(11);
    ctFont.setSzArray(0,size);

    XSSFFont xssfFont=new XSSFFont(ctFont);
    assertEquals(11,xssfFont.getFontHeightInPoints());
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFontSize

    assertEquals(20.0, ctFont.getSzArray(0).getVal(), 0.0);
  }

  public void testFontHeightInPoint() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTFontSize size=ctFont.addNewSz();
    size.setVal(14);
    ctFont.setSzArray(0,size);

    XSSFFont xssfFont=new XSSFFont(ctFont);
    assertEquals(14,xssfFont.getFontHeightInPoints());
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFontSize

     * get the font height in point.
     *
     * @return short - height in point
     */
    public short getFontHeight() {
        CTFontSize size = _ctFont.sizeOfSzArray() == 0 ? null : _ctFont.getSzArray(0);
        if (size != null) {
            double fontHeight = size.getVal();
            return (short)(fontHeight*20);
        }
        return (short)(DEFAULT_FONT_SIZE*20);
    }
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFontSize

     * set the font height in points.
     *
     * @param height - height in points
     */
    public void setFontHeight(double height) {
        CTFontSize fontSize = _ctFont.sizeOfSzArray() == 0 ? _ctFont.addNewSz() : _ctFont.getSzArray(0);
        fontSize.setVal(height);
    }
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFontSize

     * @return fontheight (in points/20); or -1 if not modified
     */
    public int getFontHeight(){
        if(_font.sizeOfSzArray() == 0) return -1;

        CTFontSize sz = _font.getSzArray(0);
        return (short)(20*sz.getVal());
    }
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFontSize

    assertEquals(true,ctFont.getStrikeArray(0).getVal());
  }

  public void testFontHeight() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTFontSize size=ctFont.addNewSz();
    size.setVal(11);
    ctFont.setSzArray(0,size);

    XSSFFont xssfFont=new XSSFFont(ctFont);
    assertEquals(11,xssfFont.getFontHeight());
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFontSize

    assertEquals(new Double(20).doubleValue(),ctFont.getSzArray(0).getVal());
  }

  public void testFontHeightInPoint() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTFontSize size=ctFont.addNewSz();
    size.setVal(14);
    ctFont.setSzArray(0,size);

    XSSFFont xssfFont=new XSSFFont(ctFont);
    assertEquals(14,xssfFont.getFontHeightInPoints());
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFontSize

    assertEquals(true,ctFont.getStrikeArray(0).getVal());
  }

  public void testFontHeight() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTFontSize size=ctFont.addNewSz();
    size.setVal(11);
    ctFont.setSzArray(0,size);

    XSSFFont xssfFont=new XSSFFont(ctFont);
    assertEquals(11,xssfFont.getFontHeightInPoints());
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFontSize

    assertEquals(20.0, ctFont.getSzArray(0).getVal(), 0.0);
  }

  public void testFontHeightInPoint() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTFontSize size=ctFont.addNewSz();
    size.setVal(14);
    ctFont.setSzArray(0,size);

    XSSFFont xssfFont=new XSSFFont(ctFont);
    assertEquals(14,xssfFont.getFontHeightInPoints());
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFontSize

    assertEquals(true,ctFont.getStrikeArray(0).getVal());
  }

  public void testFontHeight() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTFontSize size=ctFont.addNewSz();
    size.setVal(11);
    ctFont.setSzArray(0,size);

    XSSFFont xssfFont=new XSSFFont(ctFont);
    assertEquals(11,xssfFont.getFontHeightInPoints());
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.