Package org.odftoolkit.simple

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


      Assert.assertEquals(chart.getChartType(), ChartType.RADAR);
      doc.save(ResourceUtilities.newTestOutputFile(CHART_FILE_ODT));

      PresentationDocument pDoc = PresentationDocument.newPresentationDocument();
      pDoc.createChart(title, lables, legends, data, rect);
      pDoc.save(ResourceUtilities.newTestOutputFile(CHART_FILE_ODP));

    } catch (Exception e) {
      Logger.getLogger(DataSetTest.class.getName()).log(Level.SEVERE, null, e);
      Assert.fail("Failed with " + e.getClass().getName() + ": '" + e.getMessage() + "'");
    }
View Full Code Here


      // new image in presentation
      PresentationDocument pDoc = PresentationDocument.newPresentationDocument();
      Slide slide = pDoc.newSlide(0, "test", SlideLayout.TITLE_OUTLINE);
      Textbox box = slide.getTextboxByUsage(PresentationDocument.PresentationClass.TITLE).get(0);
      box.setImage(ResourceUtilities.getURI("image_list_item.png"));
      pDoc.save(ResourceUtilities.newTestOutputFile("imagep.odp"));

      // new image in a table
      TextDocument sDoc = TextDocument.newTextDocument();
      Table table1 = sDoc.addTable(2, 2);
      Cell cell1 = table1.getCellByPosition(0, 0);
View Full Code Here

     
      Textbox tbox1 = slide.getTextboxByName("title");
      Assert.assertNull(tbox1);

      //save
      pDoc.save(ResourceUtilities.newTestOutputFile("imagep.odp"));
    } catch (Exception e) {
      Logger.getLogger(AbstractTextboxContainerTest.class.getName()).log(Level.SEVERE, null, e);
      Assert.fail();
    }
View Full Code Here

      Textbox leftTextbox = boxList.get(0);
      List list1 = leftTextbox.addList();
      list1.addItem("Test outline1");
      list1.addItem("Test outline2");

      presentDoc.save(ResourceUtilities.newTestOutputFile("abc.odp"));
    } catch (Exception e) {
      Logger.getLogger(TextBoxTest.class.getName()).log(Level.SEVERE, null, e);
      Assert.fail();
    }
  }
View Full Code Here

      list2.addItem("test one");
      list2.addItem("test two");
      list2.addItem("test three");
     
      //save
      presentDoc.save(ResourceUtilities.newTestOutputFile("abc.odp"));
    } catch (Exception e) {
      Logger.getLogger(TextBoxTest.class.getName()).log(Level.SEVERE, null, e);
      Assert.fail();
    }
  }
View Full Code Here

      rightTextbox.clearList();
      Iterator iterator = rightTextbox.getListIterator();
      Assert.assertEquals(false, iterator.hasNext());
     
      //save
      presentDoc.save(ResourceUtilities.newTestOutputFile("abc.odp"));
    } catch (Exception e) {
      Logger.getLogger(TextBoxTest.class.getName()).log(Level.SEVERE, null, e);
      Assert.fail();
    }
  }
View Full Code Here

        Node node = nodes.item(i);
        Assert.assertEquals("test AAA", node.getTextContent());
      }
     
      //save
      presentDoc.save(ResourceUtilities.newTestOutputFile("abc.odp"));
    } catch (Exception e) {
      Logger.getLogger(TextBoxTest.class.getName()).log(Level.SEVERE, null, e);
      Assert.fail();
    }
   
View Full Code Here

        Assert.assertEquals("test AAA", list.getItem(0).toString());
        Assert.assertEquals("test BBB", list.getItem(1).toString());
      }
     
      //save
      presentDoc.save(ResourceUtilities.newTestOutputFile("abc.odp"));
    } catch (Exception e) {
      Logger.getLogger(TextBoxTest.class.getName()).log(Level.SEVERE, null, e);
      Assert.fail();
    }
   
View Full Code Here

      rightTextbox.removeList(list2);
      Iterator iterator = rightTextbox.getListIterator();
      Assert.assertFalse(iterator.hasNext());
     
      //save
      presentDoc.save(ResourceUtilities.newTestOutputFile("abc.odp"));
    } catch (Exception e) {
      Logger.getLogger(TextBoxTest.class.getName()).log(Level.SEVERE, null, e);
      Assert.fail();
    }
   
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.