Examples of TOCStyle


Examples of org.odftoolkit.simple.style.TOCStyle

  public void testCreateStyleTOC() {
    try {
      TextDocument doc = buildSample();
      Assert.assertNotNull(doc);

      TOCStyle tocstyle = new TOCStyle();
      tocstyle.addStyle("User_20_Index_20_1", 1);
      tocstyle.addStyle("User_20_Index_20_2", 2);
      tocstyle.addStyle("User_20_Index_20_3", 3);
      tocstyle.addStyle("User_20_Index_20_4", 4);
      tocstyle.addStyle("User_20_Index_20_5", 5);
      tocstyle.addStyle("User_20_Index_20_6", 6);
      tocstyle.addStyle("User_20_Index_20_7", 7);
      tocstyle.addStyle("User_20_Index_20_8", 8);
      tocstyle.addStyle("User_20_Index_20_9", 9);
      tocstyle.addStyle("User_20_Index_20_10", 10);
      LOG.info(tocstyle.toString());

      Paragraph paragraph1 = doc.getParagraphByIndex(0, true);
      TextTableOfContentElement textTableOfContentElement = doc
          .createTOCwithStyle(paragraph1, tocstyle, true);
      Assert.assertNotNull(textTableOfContentElement);
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.