Package org.odftoolkit.simple

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


      NodeList tablelist = dom.getElementsByTagNameNS(OdfDocumentNamespace.TABLE.getUri(), "table");
      for (int i = 0; i < tablelist.getLength(); i++) {
        mOdsTable = (TableTableElement) tablelist.item(i);
        testAppendRow(mOdsTable);
      }
      odsDoc.save(ResourceUtilities.newTestOutputFile("TestODSAppendRowOutput.ods"));

      TextDocument odtDoc = TextDocument.loadDocument(ResourceUtilities
          .getTestResourceAsStream("TestODTAppendRow.odt"));
      dom = odtDoc.getContentDom();
      tablelist = dom.getElementsByTagNameNS(OdfDocumentNamespace.TABLE.getUri(), "table");
View Full Code Here


      cell2.setFont(font2);
      Font font22 = cell2.getFont();
      System.out.println(font22);
      if (!font22.equals(font2))
        Assert.fail();
      document.save(ResourceUtilities.newTestOutputFile("TestSetGetFont.ods"));
    } catch (Exception e) {
      Logger.getLogger(TableCellTest.class.getName()).log(Level.SEVERE, e.getMessage(), e);
      Assert.fail();
    }
  }
View Full Code Here

      cell2.setBorders(CellBordersType.TOP_BOTTOM, border2);
      Border bottomBorder2 = cell2.getStyleHandler().getBorder(CellBordersType.BOTTOM);
      Assert.assertEquals(border2, bottomBorder2);
      Border bottomBorder22 = cell2.getStyleHandler().getBorder(CellBordersType.LEFT);
      Assert.assertEquals(Border.NONE, bottomBorder22);
      document.save(ResourceUtilities.newTestOutputFile("TestSetGetBorder.ods"));
    } catch (Exception e) {
      Logger.getLogger(TableCellTest.class.getName()).log(Level.SEVERE, e.getMessage(), e);
      Assert.fail();
    }
  }
View Full Code Here

        checkCellWidth(table.getCellByPosition(2, 2), font2Base, 49.7414, contentStr);
      }
      if (isFontAvailable(font3Base.getFamilyName())) {
        checkCellWidth(table.getCellByPosition(3, 3), font3Base, 88.899, contentStr);
      }
      doc.save(ResourceUtilities.newTestOutputFile("testCellSizeOptimal.ods"));
    } catch (Exception e) {
      Logger.getLogger(TableCellTest.class.getName()).log(Level.SEVERE, null, e);
      Assert.fail(e.getMessage());
    }
  }
View Full Code Here

      //validate
      String country = cellHandler.getCountry(Document.ScriptType.CJK);
      Assert.assertEquals("English", country);
     
      //save
      doc.save(ResourceUtilities.newTestOutputFile("testSupportedLinearMeasure.ods"));
    } catch (Exception e) {
      LOGGER.log(Level.SEVERE, e.getMessage(), e);
      Assert.fail(e.getMessage());
    }
   
View Full Code Here

      String language = cellHandler.getLanguage(Document.ScriptType.WESTERN);
      System.out.println(language);
      Assert.assertEquals("English", language);
     
      //save
      doc.save(ResourceUtilities.newTestOutputFile("testSupportedLinearMeasure.ods"));
    } catch (Exception e) {
      LOGGER.log(Level.SEVERE, e.getMessage(), e);
      Assert.fail(e.getMessage());
    }
   
View Full Code Here

      //validate
      Color red = cellHandler.getBackgroundColor();
      Assert.assertEquals(Color.RED.toString(), red.toString());
     
      //save
      doc.save(ResourceUtilities.newTestOutputFile("testSupportedLinearMeasure.ods"));
    } catch (Exception e) {
      LOGGER.log(Level.SEVERE, e.getMessage(), e);
      Assert.fail(e.getMessage());
    }
   
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

      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

      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

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.