Package org.odftoolkit.simple

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


     
      Node nod = odfEle.getFirstChild();
      Assert.assertEquals("table:table", nod.getNodeName());

      //save
      doc.save(ResourceUtilities.newTestOutputFile("headerTableOutput.odt"));
    } catch (Exception e) {
      Logger.getLogger(HeaderTest.class.getName()).log(Level.SEVERE, null, e);
      Assert.fail(e.getMessage());
    }
  }
View Full Code Here


      NamedNodeMap nameMap = nod.getAttributes();
      Node nodtext = nameMap.getNamedItem("text:name");
      Assert.assertEquals("headername", nodtext.getNodeValue());

      //save
      doc.save(ResourceUtilities.newTestOutputFile("headerTableOutput.odt"));
    } catch (Exception e) {
      Logger.getLogger(HeaderTest.class.getName()).log(Level.SEVERE, null, e);
      Assert.fail(e.getMessage());
    }
  }
View Full Code Here

      NamedNodeMap nameMap = nod.getAttributes();
      Node nodtext = nameMap.getNamedItem("text:name");
      Assert.assertEquals(vName, nodtext.getNodeValue());

      //save
      doc.save(ResourceUtilities.newTestOutputFile("headerTableOutput.odt"));
    } catch (Exception e) {
      Logger.getLogger(HeaderTest.class.getName()).log(Level.SEVERE, null, e);
      Assert.fail(e.getMessage());
    }
  }
View Full Code Here

        Assert.fail();
      } catch (Exception e) {
//        LOG.log(Level.SEVERE, null, e);
        Assert.assertTrue(true);
      }
      doc.save(ResourceUtilities.newTestOutputFile("DefaultTOC.odt"));
    } catch (Exception e) {
      LOG.log(Level.SEVERE, null, e);
      Assert.fail();
    }
  }
View Full Code Here

        Assert.fail();
      } catch (Exception e) {
//        LOG.log(Level.SEVERE, null, e);
        Assert.assertTrue(true);
      }
      doc.save(ResourceUtilities.newTestOutputFile("TOC_Styles.odt"));
    } catch (Exception e) {
      LOG.log(Level.SEVERE, null, e);
      Assert.fail();
    }
View Full Code Here

      //first page
      footer = doc.getFooter(true);
      Assert.assertNotNull(footer);
      table = footer.addTable(1, 2);
      table.setTableName("footerFTable");
      doc.save(ResourceUtilities.newTestOutputFile(footerDocumentPath));

      // load the document again.
      doc = TextDocument.loadDocument(ResourceUtilities.getTestResourceAsStream(footerDocumentPath));
      footer = doc.getFooter();
      table = footer.getTableByName("footerTable");
View Full Code Here

      TextDocument doc = TextDocument.loadDocument(ResourceUtilities.getTestResourceAsStream("headerFooterHidden.odt"));
      Footer footer = doc.getFooter();
      Assert.assertEquals(true, footer.isVisible());
      footer.setVisible(false);
      Assert.assertEquals(false, footer.isVisible());
      doc.save(ResourceUtilities.newTestOutputFile("footerHiddenOutput.odt"));
    } catch (Exception e) {
      Logger.getLogger(FooterTest.class.getName()).log(Level.SEVERE, null, e);
      Assert.fail(e.getMessage());
    }
  }
View Full Code Here

      Assert.assertNotNull(tab);
      Assert.assertTrue(2 == tab.getRowCount());
      Assert.assertTrue(5 == tab.getColumnCount());
     
      //save
      doc.save(ResourceUtilities.newTestOutputFile("footerOutput.odt"));
    } catch (Exception e) {
      Logger.getLogger(FooterTest.class.getName()).log(Level.SEVERE, null, e);
      Assert.fail(e.getMessage());
    }
  }
View Full Code Here

     
      Node nod = odfEle.getFirstChild();
      Assert.assertEquals("table:table", nod.getNodeName());
     
      //save
      doc.save(ResourceUtilities.newTestOutputFile("footerOutput.odt"));
    } catch (Exception e) {
      Logger.getLogger(FooterTest.class.getName()).log(Level.SEVERE, null, e);
      Assert.fail(e.getMessage());
    }
  }
View Full Code Here

      NamedNodeMap nameMap = nod.getAttributes();
      Node nodtext = nameMap.getNamedItem("text:name");
      Assert.assertEquals("footername", nodtext.getNodeValue());
     
      //save
      doc.save(ResourceUtilities.newTestOutputFile("footerOutput.odt"));
    } catch (Exception e) {
      Logger.getLogger(FooterTest.class.getName()).log(Level.SEVERE, null, e);
      Assert.fail(e.getMessage());
    }
  }
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.