You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TextAutoNumberSchemeEnum.java 9.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. /*
  2. * ====================================================================
  3. * Licensed to the Apache Software Foundation (ASF) under one or more
  4. * contributor license agreements. See the NOTICE file distributed with
  5. * this work for additional information regarding copyright ownership.
  6. * The ASF licenses this file to You under the Apache License, Version 2.0
  7. * (the "License"); you may not use this file except in compliance with
  8. * the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. * ====================================================================
  18. */
  19. package org.apache.poi.hslf.record;
  20. public enum TextAutoNumberSchemeEnum {
  21. //Name Value Meaning
  22. ANM_AlphaLcPeriod ((short) 0x0000), // "Lowercase Latin character followed by a period. Example: a., b., c., ..."),
  23. ANM_AlphaUcPeriod ((short) 0x0001), // "Uppercase Latin character followed by a period. Example: A., B., C., ..."),
  24. ANM_ArabicParenRight ((short) 0x0002), // "Arabic numeral followed by a closing parenthesis. Example: 1), 2), 3), ..."),
  25. ANM_ArabicPeriod ((short) 0x0003), // "Arabic numeral followed by a period. Example: 1., 2., 3., ..."),
  26. ANM_RomanLcParenBoth ((short) 0x0004), // "Lowercase Roman numeral enclosed in parentheses. Example: (i), (ii), (iii), ..."),
  27. ANM_RomanLcParenRight ((short) 0x0005), // "Lowercase Roman numeral followed by a closing parenthesis. Example: i), ii), iii), ..."),
  28. ANM_RomanLcPeriod ((short) 0x0006), // "Lowercase Roman numeral followed by a period. Example: i., ii., iii., ..."),
  29. ANM_RomanUcPeriod ((short) 0x0007), // "Uppercase Roman numeral followed by a period. Example: I., II., III., ..."),
  30. ANM_AlphaLcParenBoth ((short) 0x0008), // "Lowercase alphabetic character enclosed in parentheses. Example: (a), (b), (c), ..."),
  31. ANM_AlphaLcParenRight ((short) 0x0009), // "Lowercase alphabetic character followed by a closing parenthesis. Example: a), b), c), ..."),
  32. ANM_AlphaUcParenBoth ((short) 0x000A), // "Uppercase alphabetic character enclosed in parentheses. Example: (A), (B), (C), ..."),
  33. ANM_AlphaUcParenRight ((short) 0x000B), // "Uppercase alphabetic character followed by a closing parenthesis. Example: A), B), C), ..."),
  34. ANM_ArabicParenBoth ((short) 0x000C), // "Arabic numeral enclosed in parentheses. Example: (1), (2), (3), ..."),
  35. ANM_ArabicPlain ((short) 0x000D), // "Arabic numeral. Example: 1, 2, 3, ..."),
  36. ANM_RomanUcParenBoth ((short) 0x000E), // "Uppercase Roman numeral enclosed in parentheses. Example: (I), (II), (III), ..."),
  37. ANM_RomanUcParenRight ((short) 0x000F), // "Uppercase Roman numeral followed by a closing parenthesis. Example: I), II), III), ..."),
  38. ANM_ChsPlain ((short) 0x0010), // "Simplified Chinese."),
  39. ANM_ChsPeriod ((short) 0x0011), // "Simplified Chinese with single-byte period."),
  40. ANM_CircleNumDBPlain ((short) 0x0012), // "Double byte circle numbers."),
  41. ANM_CircleNumWDBWhitePlain ((short) 0x0013), // "Wingdings white circle numbers."),
  42. ANM_CircleNumWDBBlackPlain ((short) 0x0014), // "Wingdings black circle numbers."),
  43. ANM_ChtPlain ((short) 0x0015), // "Traditional Chinese."),
  44. ANM_ChtPeriod ((short) 0x0016), // "Traditional Chinese with single-byte period."),
  45. ANM_Arabic1Minus ((short) 0x0017), // "Bidi Arabic 1 (AraAlpha) with ANSI minus symbol."),
  46. ANM_Arabic2Minus ((short) 0x0018), // "Bidi Arabic 2 (AraAbjad) with ANSI minus symbol."),
  47. ANM_Hebrew2Minus ((short) 0x0019), // "Bidi Hebrew 2 with ANSI minus symbol."),
  48. ANM_JpnKorPlain ((short) 0x001A), // "Japanese/Korean."),
  49. ANM_JpnKorPeriod ((short) 0x001B), // "Japanese/Korean with single-byte period."),
  50. ANM_ArabicDbPlain ((short) 0x001C), // "Double-byte Arabic numbers."),
  51. ANM_ArabicDbPeriod ((short) 0x001D), // "Double-byte Arabic numbers with double-byte period."),
  52. ANM_ThaiAlphaPeriod ((short) 0x001E), // "Thai alphabetic character followed by a period."),
  53. ANM_ThaiAlphaParenRight ((short) 0x001F), // "Thai alphabetic character followed by a closing parenthesis."),
  54. ANM_ThaiAlphaParenBoth ((short) 0x0020), // "Thai alphabetic character enclosed by parentheses."),
  55. ANM_ThaiNumPeriod ((short) 0x0021), // "Thai numeral followed by a period."),
  56. ANM_ThaiNumParenRight ((short) 0x0022), // "Thai numeral followed by a closing parenthesis."),
  57. ANM_ThaiNumParenBoth ((short) 0x0023), // "Thai numeral enclosed in parentheses."),
  58. ANM_HindiAlphaPeriod ((short) 0x0024), // "Hindi alphabetic character followed by a period."),
  59. ANM_HindiNumPeriod ((short) 0x0025), // "Hindi numeric character followed by a period."),
  60. ANM_JpnChsDBPeriod ((short) 0x0026), // "Japanese with double-byte period."),
  61. ANM_HindiNumParenRight ((short) 0x0027), // "Hindi numeric character followed by a closing parenthesis."),
  62. ANM_HindiAlpha1Period ((short) 0x0028); // "Hindi alphabetic character followed by a period.");
  63. private final short value;
  64. private TextAutoNumberSchemeEnum(final short code) {
  65. this.value = code;
  66. }
  67. private short getValue() { return value; }
  68. public String getDescription() {
  69. return TextAutoNumberSchemeEnum.getDescription(this);
  70. }
  71. public static String getDescription(final TextAutoNumberSchemeEnum code) {
  72. switch (code) {
  73. case ANM_AlphaLcPeriod : return "Lowercase Latin character followed by a period. Example: a., b., c., ...";
  74. case ANM_AlphaUcPeriod : return "Uppercase Latin character followed by a period. Example: A., B., C., ...";
  75. case ANM_ArabicParenRight : return "Arabic numeral followed by a closing parenthesis. Example: 1), 2), 3), ...";
  76. case ANM_ArabicPeriod : return "Arabic numeral followed by a period. Example: 1., 2., 3., ...";
  77. case ANM_RomanLcParenBoth : return "Lowercase Roman numeral enclosed in parentheses. Example: (i), (ii), (iii), ...";
  78. case ANM_RomanLcParenRight : return "Lowercase Roman numeral followed by a closing parenthesis. Example: i), ii), iii), ...";
  79. case ANM_RomanLcPeriod : return "Lowercase Roman numeral followed by a period. Example: i., ii., iii., ...";
  80. case ANM_RomanUcPeriod : return "Uppercase Roman numeral followed by a period. Example: I., II., III., ...";
  81. case ANM_AlphaLcParenBoth : return "Lowercase alphabetic character enclosed in parentheses. Example: (a), (b), (c), ...";
  82. case ANM_AlphaLcParenRight : return "Lowercase alphabetic character followed by a closing parenthesis. Example: a), b), c), ...";
  83. case ANM_AlphaUcParenBoth : return "Uppercase alphabetic character enclosed in parentheses. Example: (A), (B), (C), ...";
  84. case ANM_AlphaUcParenRight : return "Uppercase alphabetic character followed by a closing parenthesis. Example: A), B), C), ...";
  85. case ANM_ArabicParenBoth : return "Arabic numeral enclosed in parentheses. Example: (1), (2), (3), ...";
  86. case ANM_ArabicPlain : return "Arabic numeral. Example: 1, 2, 3, ...";
  87. case ANM_RomanUcParenBoth : return "Uppercase Roman numeral enclosed in parentheses. Example: (I), (II), (III), ...";
  88. case ANM_RomanUcParenRight : return "Uppercase Roman numeral followed by a closing parenthesis. Example: I), II), III), ...";
  89. case ANM_ChsPlain : return "Simplified Chinese.";
  90. case ANM_ChsPeriod : return "Simplified Chinese with single-byte period.";
  91. case ANM_CircleNumDBPlain : return "Double byte circle numbers.";
  92. case ANM_CircleNumWDBWhitePlain : return "Wingdings white circle numbers.";
  93. case ANM_CircleNumWDBBlackPlain : return "Wingdings black circle numbers.";
  94. case ANM_ChtPlain : return "Traditional Chinese.";
  95. case ANM_ChtPeriod : return "Traditional Chinese with single-byte period.";
  96. case ANM_Arabic1Minus : return "Bidi Arabic 1 (AraAlpha) with ANSI minus symbol.";
  97. case ANM_Arabic2Minus : return "Bidi Arabic 2 (AraAbjad) with ANSI minus symbol.";
  98. case ANM_Hebrew2Minus : return "Bidi Hebrew 2 with ANSI minus symbol.";
  99. case ANM_JpnKorPlain : return "Japanese/Korean.";
  100. case ANM_JpnKorPeriod : return "Japanese/Korean with single-byte period.";
  101. case ANM_ArabicDbPlain : return "Double-byte Arabic numbers.";
  102. case ANM_ArabicDbPeriod : return "Double-byte Arabic numbers with double-byte period.";
  103. case ANM_ThaiAlphaPeriod : return "Thai alphabetic character followed by a period.";
  104. case ANM_ThaiAlphaParenRight : return "Thai alphabetic character followed by a closing parenthesis.";
  105. case ANM_ThaiAlphaParenBoth : return "Thai alphabetic character enclosed by parentheses.";
  106. case ANM_ThaiNumPeriod : return "Thai numeral followed by a period.";
  107. case ANM_ThaiNumParenRight : return "Thai numeral followed by a closing parenthesis.";
  108. case ANM_ThaiNumParenBoth : return "Thai numeral enclosed in parentheses.";
  109. case ANM_HindiAlphaPeriod : return "Hindi alphabetic character followed by a period.";
  110. case ANM_HindiNumPeriod : return "Hindi numeric character followed by a period.";
  111. case ANM_JpnChsDBPeriod : return "Japanese with double-byte period.";
  112. case ANM_HindiNumParenRight : return "Hindi numeric character followed by a closing parenthesis.";
  113. case ANM_HindiAlpha1Period : return "Hindi alphabetic character followed by a period.";
  114. default : return "Unknown Numbered Scheme";
  115. }
  116. }
  117. public static TextAutoNumberSchemeEnum valueOf(short autoNumberScheme) {
  118. for (TextAutoNumberSchemeEnum item: TextAutoNumberSchemeEnum.values()) {
  119. if (autoNumberScheme == item.getValue()) {
  120. return item;
  121. }
  122. }
  123. return null;
  124. }
  125. }