コード例 #1
0
 // @Ignore("manual test only")
 @Test
 public void exportPdfTest() {
   SBook book = importBook("book/PrintSetup.xlsx");
   File temp = Setup.getTempFile("pdfExportTest", ".pdf");
   exportBook(book, temp);
   Util.open(temp);
 }
コード例 #2
0
 @Ignore("not fixed yet")
 @Test
 public void zss529Test() {
   SBook book = importBook("book/taubman-nobreak.xlsx");
   File temp = Setup.getTempFile("pdfExportTest", ".pdf");
   exportBook(book, temp);
   Util.open(temp);
 }
コード例 #3
0
  /** Test render long text that across the cell boundary */
  @Test
  public void exportUnderline() {
    Book book = Util.loadBook(this, "book/789-underline-pdf.xlsx");

    File temp = Setup.getTempFile("Issue789UnderlineTest", ".pdf");

    exportBook(book.getInternalBook(), temp);

    Util.open(temp);
  }
コード例 #4
0
  @Test
  public void richTextTest() {
    SBook book = SBooks.createBook("rich");
    SSheet sheet = book.createSheet("first");
    SCell cell = sheet.getCell(0, 0);

    SRichText rText = cell.setupRichTextValue();
    SFont font1 = book.createFont(true);
    font1.setColor(book.createColor("#0000FF"));
    font1.setStrikeout(true);
    rText.addSegment("abc", font1);

    SFont font2 = book.createFont(true);
    font2.setColor(book.createColor("#FF0000"));
    font2.setBoldweight(Boldweight.BOLD);
    rText.addSegment("123", font2);

    SFont font3 = book.createFont(true);
    font3.setColor(book.createColor("#C78548"));
    font3.setUnderline(Underline.SINGLE);
    rText.addSegment("xyz", font3);

    cell = sheet.getCell(0, 1);
    rText = cell.setupRichTextValue();
    font1 = book.createFont(true);
    font1.setColor(book.createColor("#FFFF00"));
    font1.setItalic(true);
    rText.addSegment("Hello", font1);

    font2 = book.createFont(true);
    font2.setColor(book.createColor("#FF33FF"));
    font2.setBoldweight(Boldweight.BOLD);
    rText.addSegment("World", font2);

    font3 = book.createFont(true);
    font3.setColor(book.createColor("#CCCC99"));
    font3.setName("HGPSoeiKakupoptai");
    rText.addSegment("000", font3);

    File temp = Setup.getTempFile("pdfExportTest", ".pdf");

    exportBook(book, temp);

    Util.open(temp);
  }
コード例 #5
0
 @After
 public void tearDown() throws Exception {
   Setup.popZssLocale();
 }
コード例 #6
0
 @Before
 public void startUp() throws Exception {
   Setup.pushZssLocale(Locale.TAIWAN);
 }
コード例 #7
0
 @BeforeClass
 public static void setUpLibrary() throws Exception {
   Setup.touch();
 }
コード例 #8
0
 @BeforeClass
 public static void init() {
   Setup.touch();
   inputEngine = EngineFactory.getInstance().createInputEngine();
   inputParseContext = new InputParseContext(Locale.US);
 }
コード例 #9
0
 @BeforeClass
 public static void beforeClass() {
   Setup.touch();
 }
コード例 #10
0
 @Test
 public void testHyperLink2007() throws IOException {
   Book book = Util.loadBook(this, "book/blank.xlsx");
   testHyperLink(book, Setup.getTempFile());
 }