Package org.odftoolkit.odfdom.incubator.doc.text

Examples of org.odftoolkit.odfdom.incubator.doc.text.OdfTextListStyle


            OdfStyle p2 = styles.newStyle("P2", OdfStyleFamily.Paragraph);
            p2.setProperty(StyleTextPropertiesElement.FontSize, "42pt");
            OdfStyle p3 = styles.newStyle("P3", OdfStyleFamily.Paragraph);
            p3.setProperty(StyleTextPropertiesElement.FontSize, "13pt");

            OdfTextListStyle l1 = styles.newListStyle("L1");
            Assert.assertTrue(p1.equals(p1));
            Assert.assertTrue(p1.equals(p2));
            Assert.assertTrue(p2.equals(p1));
            Assert.assertFalse(p1.equals(p3));
            Assert.assertFalse(p3.equals(p1));
View Full Code Here


      @Test
    public void testBuildFromFormat() {
    int i;
   
        LOG.info("createListStyle");
        OdfTextListStyle instance = null;

        for (i = 0; i < listSpecTest.length; i++)
    {
      LOG.info("List Format: " + listSpecTest[i]);
      instance = new OdfTextListStyle(dom, "list" + i,
        listSpecTest[i], delim[i], "1cm", show[i]);

      Assert.assertNotNull(instance.getFirstChild());

      checkNodes(instance, i);
    }
  }
View Full Code Here

    Assert.assertEquals(content, node.getTextContent());
  }

  private void checkNodes(Node node, int position)
  {
    OdfTextListStyle theStyle;
    OdfTextListLevelStyleBullet bullet;
    OdfTextListLevelStyleNumber number;
    TextListLevelStyleElementBase base;

    int i = 0;
    theStyle = (OdfTextListStyle) node;
    Assert.assertTrue("Style name " +
      theStyle.getStyleNameAttribute() + " incorrect",
      theStyle.getStyleNameAttribute().equals("list" + position));
    node = node.getFirstChild();

    while (node != null)
    {
      Assert.assertTrue("More nodes than specifiers",
View Full Code Here

TOP

Related Classes of org.odftoolkit.odfdom.incubator.doc.text.OdfTextListStyle

Copyright © 2018 www.massapicom. 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.