Examples of OdfTextListStyle


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

      Assert.assertNotNull(parentStyle);
    }
    if (testStyle.hasOdfAttribute(OdfName.newName(OdfDocumentNamespace.STYLE, "list-style-name"))) {
      if (testStyle.getStyleListStyleNameAttribute() != null) {
        OdfTextListStyle listStyle = autoStyles.getListStyle(testStyle.getStyleListStyleNameAttribute());
        if (listStyle == null) {
          listStyle = ((Document) fileDom.getDocument()).getDocumentStyles().getListStyle(testStyle.getStyleListStyleNameAttribute());
        }

        Assert.assertNotNull(listStyle);
View Full Code Here

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

      Assert.assertNotNull(parentStyle);
    }
    if (testStyle.hasOdfAttribute(OdfName.newName(OdfDocumentNamespace.STYLE, "list-style-name"))) {
      if (testStyle.getStyleListStyleNameAttribute() != null) {
        OdfTextListStyle listStyle = autoStyles.getListStyle(testStyle.getStyleListStyleNameAttribute());
        if (listStyle == null) {
          listStyle = ((OdfDocument) fileDom.getDocument()).getDocumentStyles().getListStyle(testStyle.getStyleListStyleNameAttribute());
        }

        Assert.assertNotNull(listStyle);
View Full Code Here

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

     *
     * @param name  The style name
     * @return The code>OdfTextListStyle</code> element
     */
    public OdfTextListStyle newListStyle(String name) {
        OdfTextListStyle newStyle = ((OdfFileDom) this.ownerDocument).newOdfElement(OdfTextListStyle.class);
        newStyle.setStyleNameAttribute(name);
        this.appendChild(newStyle);
        return newStyle;
    }
View Full Code Here

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

   *
   * @return an <code>OdfTextListStyle</code> element
   */
  public OdfTextListStyle newListStyle() {
    OdfFileDom dom = (OdfFileDom) this.ownerDocument;
    OdfTextListStyle newStyle = dom.newOdfElement(OdfTextListStyle.class);

    newStyle.setStyleNameAttribute(newUniqueStyleName(OdfStyleFamily.List));

    this.appendChild(newStyle);

    return newStyle;
  }
View Full Code Here

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

        mStyles.put(style.getFamily(), familyMap);
      }

      familyMap.put(style.getStyleNameAttribute(), style);
    } else if (node instanceof OdfTextListStyle) {
      OdfTextListStyle listStyle = (OdfTextListStyle) node;
      if (mListStyles == null) {
        mListStyles = new HashMap<String, OdfTextListStyle>();
      }

      mListStyles.put(listStyle.getStyleNameAttribute(), listStyle);
    } else if (node instanceof OdfNumberStyle) {
      OdfNumberStyle numberStyle = (OdfNumberStyle) node;

      if (mNumberStyles == null) {
        mNumberStyles = new HashMap<String, OdfNumberStyle>();
View Full Code Here

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

          }
        }
      }
    } else if (node instanceof OdfTextListStyle) {
      if (mListStyles != null) {
        OdfTextListStyle listStyle = (OdfTextListStyle) node;
        mListStyles.remove(listStyle.getStyleNameAttribute());
      }
    } else if (node instanceof OdfNumberStyle) {
      if (mNumberStyles != null) {
        OdfNumberStyle numberStyle = (OdfNumberStyle) node;
        mNumberStyles.remove(numberStyle.getStyleNameAttribute());
View Full Code Here

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

      Assert.assertNotNull(parentStyle);
    }
    if (testStyle.hasOdfAttribute(OdfName.newName(OdfDocumentNamespace.STYLE, "list-style-name"))) {
      if (testStyle.getStyleListStyleNameAttribute() != null) {
        OdfTextListStyle listStyle = autoStyles.getListStyle(testStyle.getStyleListStyleNameAttribute());
        if (listStyle == null) {
          listStyle = ((Document) fileDom.getDocument()).getDocumentStyles().getListStyle(testStyle.getStyleListStyleNameAttribute());
        }

        Assert.assertNotNull(listStyle);
View Full Code Here

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

        String textStyleName = listElement.getTextStyleNameAttribute();
        Document doc = (Document) (((OdfFileDom) listElement.getOwnerDocument()).getDocument());
        OdfContentDom contentDocument = doc.getContentDom();
        OdfOfficeAutomaticStyles styles = contentDocument.getAutomaticStyles();
        OdfOfficeStyles documentStyles = doc.getDocumentStyles();
        OdfTextListStyle listStyle = styles.getListStyle(textStyleName);
        if (listStyle == null) {
          listStyle = documentStyles.getListStyle(textStyleName);
        }
        if (listStyle != null) {
          TextListLevelStyleElementBase listLevelStyle = listStyle.getLevel(1);
          if (listLevelStyle instanceof TextListLevelStyleBulletElement) {
            return ListType.BULLET;
          } else if (listLevelStyle instanceof TextListLevelStyleNumberElement) {
            return ListType.NUMBER;
          } else if (listLevelStyle instanceof TextListLevelStyleImageElement) {
View Full Code Here

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

      Assert.assertNotNull(parentStyle);
    }
    if (testStyle.hasOdfAttribute(OdfName.newName(OdfDocumentNamespace.STYLE, "list-style-name"))) {
      if (testStyle.getStyleListStyleNameAttribute() != null) {
        OdfTextListStyle listStyle = autoStyles.getListStyle(testStyle.getStyleListStyleNameAttribute());
        if (listStyle == null) {
          listStyle = ((OdfDocument) fileDom.getDocument()).getDocumentStyles().getListStyle(testStyle.getStyleListStyleNameAttribute());
        }

        Assert.assertNotNull(listStyle);
View Full Code Here

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

            for (int i = 0; i < lst.getLength(); i++) {
                Node node = lst.item(i);
                Assert.assertTrue(node instanceof OdfTextList);
                OdfTextList le = (OdfTextList) lst.item(i);

                OdfTextListStyle ls = le.getListStyle();
                Assert.assertNotNull(ls);
                OdfElement lvl = ls.getLevel(1);
                Assert.assertNotNull(lvl);

                int level = le.getListLevel();
                OdfElement lvl1 = ls.getLevel(level);
                OdfElement lvl2 = le.getListLevelStyle();
                Assert.assertEquals(lvl1, lvl2);
            }
        } catch (Exception e) {
          Logger.getLogger(ListTest.class.getName()).log(Level.SEVERE, e.getMessage(), e);
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.