Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docx4J.toHTML(htmlSettings, os, Docx4J.FLAG_NONE) #593

Open
QAQqwe opened this issue Sep 9, 2024 · 0 comments
Open

Docx4J.toHTML(htmlSettings, os, Docx4J.FLAG_NONE) #593

QAQqwe opened this issue Sep 9, 2024 · 0 comments

Comments

@QAQqwe
Copy link

QAQqwe commented Sep 9, 2024

public ListLevel(Lvl levelNode)
{
this.jaxbAbstractLvl = levelNode;

    this.id = levelNode.getIlvl().toString(); 
    
    counter = new Counter();

    Lvl.Start startValueNode = levelNode.getStart();
    if (startValueNode != null)
    {
    	this.startValue = startValueNode.getVal().subtract(BigInteger.ONE);
    		// Start value is one less than the user set it to,
    		// since whenever we fetch the number, we first increment it.
        counter.setCurrentValue(this.startValue);                        
    }

    Lvl.LvlText levelTextNode = levelNode.getLvlText();
    if (levelTextNode != null)
    {
        this.levelText = levelTextNode.getVal(); 
    }

    org.docx4j.wml.RFonts fontNode = null;
    if (levelNode.getRPr() != null) {
        //XmlNode fontNode = levelNode.SelectSingleNode(".//w:rFonts", nsm);
    	fontNode = levelNode.getRPr().getRFonts();
    }
    if (fontNode != null)
    {
        this.font = fontNode.getHAnsi(); //getAttributeValue(fontNode, "w:hAnsi");
    }

    //XmlNode enumTypeNode = levelNode.SelectSingleNode("w:numFmt", nsm);
    
    NumFmt enumTypeNode = levelNode.getNumFmt();
    if (enumTypeNode != null)
    {
    	this.numFmt =  enumTypeNode.getVal(); 

        // w:numFmt="bullet" indicates a bulleted list
    	this.isBullet = numFmt.equals( NumberFormat.BULLET ); 
    	
        // this.isBullet = String.Compare(type, "bullet", StringComparison.OrdinalIgnoreCase) == 0;
    }

}

 this.id = levelNode.getIlvl().toString();   java.lang.NullPointerException
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant