Example #1
0
 /**
  * Supports most common bullet styles. Should be extend to support anything potentially
  * @see settings for lists of values
  * @param Integer number of the bullet
  * @param PpNumberedBulletStyle from a numbered bullet type, from a textrange
  * @return String representing how the bullet should look
  */
 private String numberedBullet(int number,MsoNumberedBulletStyle style)
 {
     String text = "";
     if((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletAlphaLCParenBoth)
         text = "(" + Settings.aToz[number-1] + ")";
     else if((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletAlphaLCParenRight)
         text = Settings.aToz[number - 1] + ")";
     else if((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletAlphaLCPeriod)
         text = Settings.aToz[number - 1] + ".";
     else if((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletAlphaUCParenBoth)
         text = "(" + Settings.AToZ[number - 1] + ")";
     else if((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletAlphaUCParenRight)
         text = Settings.AToZ[number - 1] + ")";
     else if((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletAlphaUCPeriod)
         text = Settings.AToZ[number - 1] + ".";
     else if((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletArabicParenBoth)
         text = "("+ number + ")";
     else if((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletArabicParenRight)
         text = number + ")";
     else if((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletArabicPeriod || (PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletArabicDBPeriod)
         text = number + ".";
     else if((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletArabicPlain || (PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletArabicDBPlain)
         text = number + ".";
     else if((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletRomanLCParenBoth)
         text = "(" + Settings.romanNumeralsLC[number - 1] + ")";
     else if((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletRomanLCParenRight)
         text = Settings.romanNumeralsLC[number - 1] + ")";
     else if((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletRomanLCPeriod)
         text = Settings.romanNumeralsLC[number - 1] + ".";
     else if((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletRomanUCParenBoth)
         text = "(" + Settings.romanNumeralsUC[number - 1] + ")";
     else if((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletRomanUCParenRight)
         text = Settings.romanNumeralsUC[number - 1] + ")";
     else if((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletRomanUCPeriod)
         text = Settings.romanNumeralsUC[number - 1] + ".";
     else
         text = number + ".";
     return text;
 }
Example #2
0
        /**
         * Supports most common bullet styles. Should be extend to support anything potentially
         * @see settings for lists of values
         * @param Integer number of the bullet
         * @param PpNumberedBulletStyle from a numbered bullet type, from a textrange
         * @return String representing how the bullet should look
         */
        private String numberedBullet(int number, MsoNumberedBulletStyle style)
        {
            String text = "";

            if ((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletAlphaLCParenBoth)
            {
                text = "(" + Settings.aToz[number - 1] + ")";
            }
            else if ((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletAlphaLCParenRight)
            {
                text = Settings.aToz[number - 1] + ")";
            }
            else if ((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletAlphaLCPeriod)
            {
                text = Settings.aToz[number - 1] + ".";
            }
            else if ((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletAlphaUCParenBoth)
            {
                text = "(" + Settings.AToZ[number - 1] + ")";
            }
            else if ((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletAlphaUCParenRight)
            {
                text = Settings.AToZ[number - 1] + ")";
            }
            else if ((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletAlphaUCPeriod)
            {
                text = Settings.AToZ[number - 1] + ".";
            }
            else if ((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletArabicParenBoth)
            {
                text = "(" + number + ")";
            }
            else if ((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletArabicParenRight)
            {
                text = number + ")";
            }
            else if ((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletArabicPeriod || (PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletArabicDBPeriod)
            {
                text = number + ".";
            }
            else if ((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletArabicPlain || (PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletArabicDBPlain)
            {
                text = number + ".";
            }
            else if ((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletRomanLCParenBoth)
            {
                text = "(" + Settings.romanNumeralsLC[number - 1] + ")";
            }
            else if ((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletRomanLCParenRight)
            {
                text = Settings.romanNumeralsLC[number - 1] + ")";
            }
            else if ((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletRomanLCPeriod)
            {
                text = Settings.romanNumeralsLC[number - 1] + ".";
            }
            else if ((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletRomanUCParenBoth)
            {
                text = "(" + Settings.romanNumeralsUC[number - 1] + ")";
            }
            else if ((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletRomanUCParenRight)
            {
                text = Settings.romanNumeralsUC[number - 1] + ")";
            }
            else if ((PpNumberedBulletStyle)style == PpNumberedBulletStyle.ppBulletRomanUCPeriod)
            {
                text = Settings.romanNumeralsUC[number - 1] + ".";
            }
            else
            {
                text = number + ".";
            }
            return(text);
        }