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

         return (short)index;
     }


    public short getFontHeight() {
         CTFontSize size=ctFont.sizeOfSzArray()==0?null: ctFont.getSzArray(0);
         if(size!=null){
             double fontHeight= size.getVal()/20;
            return (short)fontHeight;
        }
        else
            return DEFAULT_FONT_SIZE/20;
    }
View Full Code Here

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

        else
            return DEFAULT_FONT_SIZE/20;
    }

    public short getFontHeightInPoints() {
         CTFontSize size=ctFont.sizeOfSzArray()==0?null: ctFont.getSzArray(0);
         if(size!=null){
             double fontHeight= size.getVal();
             return (short)fontHeight;
          }
        else
            return DEFAULT_FONT_SIZE;
    }
View Full Code Here

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

    }



    public void setFontHeight(short height) {
        CTFontSize fontSize=ctFont.sizeOfSzArray()==0?ctFont.addNewSz():ctFont.getSzArray(0);
          fontSize.setVal(height*20);
    }
View Full Code Here

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

          fontSize.setVal(height*20);
    }


    public void setFontHeightInPoints(short 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

  }


  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/20,xssfFont.getFontHeight());
View Full Code Here

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

  }


  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
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.