Package org.odftoolkit.simple

Examples of org.odftoolkit.simple.SpreadsheetDocument.save()


      Cell cell = table.getCellByPosition("A1");
      cell.setFont(font);
      cell.setStringValue("Hello world .");
     
      //save
      document.save(ResourceUtilities.newTestOutputFile("testFontOutput1.ods"));
     
      //validate
      SpreadsheetDocument doc = SpreadsheetDocument.loadDocument(ResourceUtilities
          .getTestResourceAsStream("testFontOutput1.ods"));
      Table table1 = doc.getTableByName("Sheet1");
View Full Code Here


      Cell cell = table.getCellByPosition("A1");
      cell.setFont(font);
      cell.setStringValue("Hi World.");
     
      //save
      document.save(ResourceUtilities.newTestOutputFile("testFontOutput1.ods"));
     
      //validate
      SpreadsheetDocument doc = SpreadsheetDocument.loadDocument(ResourceUtilities
          .getTestResourceAsStream("testFontOutput1.ods"));
      Table table1 = doc.getTableByName("Sheet1");
View Full Code Here

      //validate
      Double fontInPoint = textProperties.getFontSizeInPoint();
      Assert.assertEquals(3.32, fontInPoint);
     
      //save
      document.save(ResourceUtilities.newTestOutputFile("testFontOutput89.ods"));
    } catch (Exception e) {
      LOGGER.log(Level.SEVERE, e.getMessage(), e);
      Assert.fail(e.getMessage());
    }
  }
View Full Code Here

      //validate
      String lan = textProperties.getLanguage();
      Assert.assertEquals("Chinese", lan);
     
      //save
      document.save(ResourceUtilities.newTestOutputFile("testFontOutput1.ods"));
    } catch (Exception e) {
      LOGGER.log(Level.SEVERE, e.getMessage(), e);
      Assert.fail(e.getMessage());
    }
  }
View Full Code Here

      //validate
      String lan4 = textProperties.getLanguage(Document.ScriptType.CJK);
      Assert.assertEquals(null, lan4);
     
      //save
      document.save(ResourceUtilities.newTestOutputFile("testFontOutput1.ods"));
    } catch (Exception e) {
      LOGGER.log(Level.SEVERE, e.getMessage(), e);
      Assert.fail(e.getMessage());
    }
  }
View Full Code Here

      //validate
      String country = textProperties.getCountry();
      Assert.assertEquals("china", country);
     
      //save
      document.save(ResourceUtilities.newTestOutputFile("testFontOutput1.ods"));
    } catch (Exception e) {
      LOGGER.log(Level.SEVERE, e.getMessage(), e);
      Assert.fail(e.getMessage());
    }
  }
View Full Code Here

      //validate
      String country = textProperties.getCountry(Document.ScriptType.WESTERN);
      Assert.assertEquals("china", country);
     
      //save
      document.save(ResourceUtilities.newTestOutputFile("testFontOutput1.ods"));
    } catch (Exception e) {
      LOGGER.log(Level.SEVERE, e.getMessage(), e);
      Assert.fail(e.getMessage());
    }
  }
View Full Code Here

      //validate
      Color green = textProperties.getFontColor();
      Assert.assertEquals(Color.GREEN.toString(), green.toString());
     
      //save
      document.save(ResourceUtilities.newTestOutputFile("testFontOutput1.ods"));
    } catch (Exception e) {
      LOGGER.log(Level.SEVERE, e.getMessage(), e);
      Assert.fail(e.getMessage());
    }
  }
View Full Code Here

      //validate
      String fontName = textProperties.getFontName();
      Assert.assertEquals("fontname", fontName);
     
      //save
      document.save(ResourceUtilities.newTestOutputFile("testFontOutput1.ods"));
    } catch (Exception e) {
      LOGGER.log(Level.SEVERE, e.getMessage(), e);
      Assert.fail(e.getMessage());
    }
  }
View Full Code Here

      SpreadsheetDocument sheet = SpreadsheetDocument.newSpreadsheetDocument();
      Table table2 = sheet.getTableList().get(0);
      Cell cell2 = table2.getCellByPosition(1, 1);
      Image image4 = cell2.setImage(ResourceUtilities.getURI("image_list_item.png"));
      sheet.save(ResourceUtilities.newTestOutputFile("imgesheet.ods"));
      Image aImage4 = cell2.getImage();
      Assert.assertEquals(image4, aImage4);

    } catch (Exception e) {
      Logger.getLogger(ImageTest.class.getName()).log(Level.SEVERE, null, e);
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.