private String formatNum(int lvlNum, boolean isLegal, LevelTuple[] overrideLevelTuples) {

            int numFmtStyle = 0;
            String numFmt = getNumFormat(lvlNum, isLegal, overrideLevelTuples);

            int count = getCount(lvlNum);
            if (count < 0) {
                count = 1;
            }
            if ("lowerLetter".equals(numFmt)) {
                numFmtStyle = 4;
            } else if ("lowerRoman".equals(numFmt)) {
                numFmtStyle = 2;
            } else if ("decimal".equals(numFmt)) {
                numFmtStyle = 0;
            } else if ("upperLetter".equals(numFmt)) {
                numFmtStyle = 3;
            } else if ("upperRoman".equals(numFmt)) {
                numFmtStyle = 1;
            } else if ("bullet".equals(numFmt)) {
                return "";
                //not yet handled by NumberFormatter...TODO: add to NumberFormatter?
            } else if ("ordinal".equals(numFmt)) {
                return ordinalize(count);
            } else if ("decimalZero".equals(numFmt)) {
                return "0" + NumberFormatter.getNumber(count, 0);
            } else if ("none".equals(numFmt)) {
                return "";
            }
            try {
                return NumberFormatter.getNumber(count, numFmtStyle);
            } catch (IllegalArgumentException e) {
                return "";
            }
        }
@param level which level to format
@return the string that represents the number and the surrounding text for this paragraph
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/AbstractListManager.java