From b00782f142334dffd37663b3eeed4544789703bd Mon Sep 17 00:00:00 2001 From: Glen Mazza Date: Sat, 25 Dec 2004 15:29:18 +0000 Subject: [PATCH] PR: Obtained from: Submitted by: Reviewed by: "End of Year" constant cleanup. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198210 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/fo/Constants.java | 409 +++++++++---------- src/java/org/apache/fop/fo/PropertySets.java | 4 +- 2 files changed, 206 insertions(+), 207 deletions(-) diff --git a/src/java/org/apache/fop/fo/Constants.java b/src/java/org/apache/fop/fo/Constants.java index e2c19e780..bebc81ac0 100644 --- a/src/java/org/apache/fop/fo/Constants.java +++ b/src/java/org/apache/fop/fo/Constants.java @@ -113,7 +113,7 @@ public interface Constants { int FO_TABLE_ROW = 54; int FO_TITLE = 55; int FO_WRAPPER = 56; - int ELEMENT_COUNT = 56; + int FRM_OBJ_COUNT = 56; // Masks int COMPOUND_SHIFT = 9; @@ -326,52 +326,51 @@ public interface Constants { int PR_SPACE_BEFORE = 201; int PR_SPACE_END = 202; int PR_SPACE_START = 203; - // space-treatment was removed. TODO: re-number properties. - int PR_SPAN = 205; - int PR_SPEAK = 206; - int PR_SPEAK_HEADER = 207; - int PR_SPEAK_NUMERAL = 208; - int PR_SPEAK_PUNCTUATION = 209; - int PR_SPEECH_RATE = 210; - int PR_SRC = 211; - int PR_START_INDENT = 212; - int PR_STARTING_STATE = 213; - int PR_STARTS_ROW = 214; - int PR_STRESS = 215; - int PR_SUPPRESS_AT_LINE_BREAK = 216; - int PR_SWITCH_TO = 217; - int PR_TABLE_LAYOUT = 218; - int PR_TABLE_OMIT_FOOTER_AT_BREAK = 219; - int PR_TABLE_OMIT_HEADER_AT_BREAK = 220; - int PR_TARGET_PRESENTATION_CONTEXT = 221; - int PR_TARGET_PROCESSING_CONTEXT = 222; - int PR_TARGET_STYLESHEET = 223; - int PR_TEXT_ALIGN = 224; - int PR_TEXT_ALIGN_LAST = 225; - int PR_TEXT_ALTITUDE = 226; - int PR_TEXT_DECORATION = 227; - int PR_TEXT_DEPTH = 228; - int PR_TEXT_INDENT = 229; - int PR_TEXT_SHADOW = 230; - int PR_TEXT_TRANSFORM = 231; - int PR_TOP = 232; - int PR_TREAT_AS_WORD_SPACE = 233; - int PR_UNICODE_BIDI = 234; - int PR_VERTICAL_ALIGN = 235; - int PR_VISIBILITY = 236; - int PR_VOICE_FAMILY = 237; - int PR_VOLUME = 238; - int PR_WHITE_SPACE_COLLAPSE = 239; - int PR_WHITE_SPACE_TREATMENT = 240; - int PR_WIDOWS = 241; - int PR_WIDTH = 242; - int PR_WORD_SPACING = 243; - int PR_WRAP_OPTION = 244; - int PR_WRITING_MODE = 245; - int PR_XML_LANG = 246; - int PR_Z_INDEX = 247; - int PR_INTRUSION_DISPLACE = 248; - int PROPERTY_COUNT = 248; + int PR_SPAN = 204; + int PR_SPEAK = 205; + int PR_SPEAK_HEADER = 206; + int PR_SPEAK_NUMERAL = 207; + int PR_SPEAK_PUNCTUATION = 208; + int PR_SPEECH_RATE = 209; + int PR_SRC = 210; + int PR_START_INDENT = 211; + int PR_STARTING_STATE = 212; + int PR_STARTS_ROW = 213; + int PR_STRESS = 214; + int PR_SUPPRESS_AT_LINE_BREAK = 215; + int PR_SWITCH_TO = 216; + int PR_TABLE_LAYOUT = 217; + int PR_TABLE_OMIT_FOOTER_AT_BREAK = 218; + int PR_TABLE_OMIT_HEADER_AT_BREAK = 219; + int PR_TARGET_PRESENTATION_CONTEXT = 220; + int PR_TARGET_PROCESSING_CONTEXT = 221; + int PR_TARGET_STYLESHEET = 222; + int PR_TEXT_ALIGN = 223; + int PR_TEXT_ALIGN_LAST = 224; + int PR_TEXT_ALTITUDE = 225; + int PR_TEXT_DECORATION = 226; + int PR_TEXT_DEPTH = 227; + int PR_TEXT_INDENT = 228; + int PR_TEXT_SHADOW = 229; + int PR_TEXT_TRANSFORM = 230; + int PR_TOP = 231; + int PR_TREAT_AS_WORD_SPACE = 232; + int PR_UNICODE_BIDI = 233; + int PR_VERTICAL_ALIGN = 234; + int PR_VISIBILITY = 235; + int PR_VOICE_FAMILY = 236; + int PR_VOLUME = 237; + int PR_WHITE_SPACE_COLLAPSE = 238; + int PR_WHITE_SPACE_TREATMENT = 239; + int PR_WIDOWS = 240; + int PR_WIDTH = 241; + int PR_WORD_SPACING = 242; + int PR_WRAP_OPTION = 243; + int PR_WRITING_MODE = 244; + int PR_XML_LANG = 245; + int PR_Z_INDEX = 246; + int PR_INTRUSION_DISPLACE = 247; + int PROPERTY_COUNT = 247; // compound property constants @@ -391,163 +390,163 @@ public interface Constants { int EN_ABSOLUTE = 1; int EN_ABSOLUTE_COLORMETRIC = 2; int EN_AFTER = 3; - int EN_ALL = 4; - int EN_ALPHABETIC = 5; - int EN_ALWAYS = 6; - int EN_ANY = 7; - int EN_AUTO = 8; - int EN_BASELINE = 9; - int EN_BEFORE = 10; - int EN_BLANK = 11; - int EN_BLINK = 12; - int EN_BOTTOM = 13; - int EN_CAPITALIZE = 14; - int EN_CENTER = 15; - int EN_COLLAPSE = 16; - int EN_COLUMN = 17; - int EN_DASHED = 18; - int EN_DISCARD = 19; - int EN_DOCUMENT = 20; - int EN_DOTS = 21; - int EN_DOTTED = 22; - int EN_DOUBLE = 23; - int EN_END = 24; - int EN_END_ON_EVEN = 25; - int EN_END_ON_ODD = 26; - int EN_ERROR_IF_OVERFLOW = 27; - int EN_EVEN = 28; - int EN_EVEN_PAGE = 29; - int EN_FALSE = 30; - int EN_FIC = 31; - int EN_FIRST = 32; - int EN_FIXED = 33; - int EN_FORCE = 34; - int EN_FSWP = 35; - int EN_GROOVE = 36; - int EN_HIDDEN = 37; - int EN_IGNORE = 38; - int EN_IGNORE_IF_AFTER_LINEFEED = 39; - int EN_IGNORE_IF_BEFORE_LINEFEED = 40; - int EN_IGNORE_IF_SURROUNDING_LINEFEED = 41; - int EN_INSET = 42; - int EN_JUSTIFY = 43; - int EN_LAST = 44; - int EN_LEFT = 45; - int EN_LEWP = 46; - int EN_LINE_THROUGH = 47; - int EN_LOWERCASE = 48; - int EN_LR_TB = 49; - int EN_LSWP = 50; - int EN_MIDDLE = 51; - int EN_NO_BLINK = 52; - int EN_NO_FORCE = 53; - int EN_NO_LINE_THROUGH = 54; - int EN_NO_OVERLINE = 55; - int EN_NO_UNDERLINE = 56; - int EN_NO_WRAP = 57; - int EN_NON_UNIFORM = 58; - int EN_NONE = 59; - int EN_NOREPEAT = 60; - int EN_NORMAL = 61; - int EN_NOT_BLANK = 62; - int EN_ODD = 63; - int EN_ODD_PAGE = 64; - int EN_OUTSET = 65; - int EN_OVERLINE = 66; - int EN_PAGE = 67; - int EN_PAGE_SEQUENCE = 68; - int EN_PERCEPTUAL = 69; - int EN_PRESERVE = 70; - int EN_REFERENCE_AREA = 71; - int EN_RELATIVE = 72; - int EN_RELATIVE_COLOMETRIC = 73; - int EN_REPEAT = 74; - int EN_REPEATX = 75; - int EN_REPEATY = 76; - int EN_REST = 77; - int EN_RETAIN = 78; - int EN_RIDGE = 79; - int EN_RIGHT = 80; - int EN_RL_TB = 81; - int EN_RULE = 82; - int EN_SATURATION = 83; - int EN_SCROLL = 84; - int EN_SEPARATE = 85; - int EN_SMALL_CAPS = 86; - int EN_SOLID = 87; - int EN_SPACE = 88; - int EN_START = 89; - int EN_STATIC = 90; - int EN_SUB = 91; - int EN_SUPER = 92; - int EN_TB_RL = 93; - int EN_TEXT_BOTTOM = 94; - int EN_TEXT_TOP = 95; - int EN_TOP = 96; - int EN_TRADITIONAL = 97; - int EN_TREAT_AS_SPACE = 98; - int EN_TREAT_AS_ZERO_WIDTH_SPACE = 99; - int EN_TRUE = 100; - int EN_UNDERLINE = 101; - int EN_UNIFORM = 102; - int EN_UPPERCASE = 103; - int EN_USECONTENT = 104; - int EN_VISIBLE = 105; - int EN_WRAP = 106; - int EN_FONT_HEIGHT = 107; - int EN_LINE_HEIGHT = 108; - int EN_MAX_HEIGHT = 109; - int EN_NO_LIMIT = 110; - int EN_AUTO_ODD = 111; - int EN_AUTO_EVEN = 112; - int EN_BEFORE_EDGE = 113; - int EN_TEXT_BEFORE_EDGE = 114; - int EN_CENTRAL = 115; - int EN_AFTER_EDGE = 116; - int EN_TEXT_AFTER_EDGE = 117; - int EN_IDEOGRAPHIC = 118; - int EN_HANGING = 119; - int EN_MATHEMATICAL = 120; - int EN_SCALE_TO_FIT = 121; - int EN_USE_FONT_METRICS = 122; - int EN_INDEFINITE = 123; - int EN_LARGER = 124; - int EN_SMALLER = 125; - int EN_INSIDE = 126; - int EN_OUTSIDE = 127; - int EN_CONSIDER_SHIFTS = 128; - int EN_DISREGARD_SHIFTS = 129; - int EN_INTEGER_PIXELS = 130; - int EN_RESAMPLE_ANY_METHOD = 131; - int EN_USE_SCRIPT = 132; - int EN_NO_CHANGE = 133; - int EN_RESET_SIZE = 134; - int EN_WIDER = 135; - int EN_NARROWER = 136; - int EN_ULTRA_CONDENSED = 137; - int EN_EXTRA_CONDENSED = 138; - int EN_CONDENSED = 139; - int EN_SEMI_CONDENSED = 140; - int EN_SEMI_EXPANDED = 141; - int EN_EXPANDED = 142; - int EN_EXTRA_EXPANDED = 143; - int EN_ULTRA_EXPANDED = 144; - int EN_LINE = 145; - int EN_INDENT = 146; - int EN_BLOCK = 147; - int EN_BOTH = 148; - int EN_COLLAPSE_WITH_PRECEDENCE = 149; - int EN_SHOW = 150; - int EN_HIDE = 151; - int EN_EMBED = 152; - int EN_BIDI_OVERRIDE = 153; - int EN_LTR = 154; - int EN_RTL = 155; - int EN_CHARACTER_BY_CHARACTER = 156; - int EN_SUPPRESS = 157; - int EN_PAGINATE = 158; - int EN_BOUNDED_IN_ONE_DIMENSION = 159; - int EN_UNBOUNDED = 160; - int EN_INHERIT = 161; + int EN_AFTER_EDGE = 4; + int EN_ALL = 5; + int EN_ALPHABETIC = 6; + int EN_ALWAYS = 7; + int EN_ANY = 8; + int EN_AUTO = 9; + int EN_AUTO_EVEN = 10; + int EN_AUTO_ODD = 11; + int EN_BASELINE = 12; + int EN_BEFORE = 13; + int EN_BEFORE_EDGE = 14; + int EN_BIDI_OVERRIDE = 15; + int EN_BLANK = 16; + int EN_BLINK = 17; + int EN_BLOCK = 18; + int EN_BOTH = 19; + int EN_BOTTOM = 20; + int EN_BOUNDED_IN_ONE_DIMENSION = 21; + int EN_CAPITALIZE = 22; + int EN_CENTER = 23; + int EN_CENTRAL = 24; + int EN_CHARACTER_BY_CHARACTER = 25; + int EN_COLLAPSE = 26; + int EN_COLLAPSE_WITH_PRECEDENCE = 27; + int EN_COLUMN = 28; + int EN_CONDENSED = 29; + int EN_CONSIDER_SHIFTS = 30; + int EN_DASHED = 31; + int EN_DISCARD = 32; + int EN_DISREGARD_SHIFTS = 33; + int EN_DOCUMENT = 34; + int EN_DOTS = 35; + int EN_DOTTED = 36; + int EN_DOUBLE = 37; + int EN_EMBED = 38; + int EN_END = 39; + int EN_END_ON_EVEN = 40; + int EN_END_ON_ODD = 41; + int EN_ERROR_IF_OVERFLOW = 42; + int EN_EVEN = 43; + int EN_EVEN_PAGE = 44; + int EN_EXPANDED = 45; + int EN_EXTRA_CONDENSED = 46; + int EN_EXTRA_EXPANDED = 47; + int EN_FALSE = 48; + int EN_FIC = 49; + int EN_FIRST = 50; + int EN_FIXED = 51; + int EN_FONT_HEIGHT = 52; + int EN_FORCE = 53; + int EN_FSWP = 54; + int EN_GROOVE = 55; + int EN_HANGING = 56; + int EN_HIDDEN = 57; + int EN_HIDE = 58; + int EN_IDEOGRAPHIC = 59; + int EN_IGNORE = 60; + int EN_IGNORE_IF_AFTER_LINEFEED = 61; + int EN_IGNORE_IF_BEFORE_LINEFEED = 62; + int EN_IGNORE_IF_SURROUNDING_LINEFEED = 63; + int EN_INDEFINITE = 64; + int EN_INDENT = 65; + int EN_INHERIT = 66; + int EN_INSET = 67; + int EN_INSIDE = 68; + int EN_INTEGER_PIXELS = 69; + int EN_JUSTIFY = 70; + int EN_LARGER = 71; + int EN_LAST = 72; + int EN_LEFT = 73; + int EN_LEWP = 74; + int EN_LINE = 75; + int EN_LINE_HEIGHT = 76; + int EN_LINE_THROUGH = 77; + int EN_LOWERCASE = 78; + int EN_LR_TB = 79; + int EN_LTR = 80; + int EN_LSWP = 81; + int EN_MATHEMATICAL = 82; + int EN_MAX_HEIGHT = 83; + int EN_MIDDLE = 84; + int EN_NARROWER = 85; + int EN_NO_BLINK = 86; + int EN_NO_CHANGE = 87; + int EN_NO_FORCE = 88; + int EN_NO_LIMIT = 89; + int EN_NO_LINE_THROUGH = 90; + int EN_NO_OVERLINE = 91; + int EN_NO_UNDERLINE = 92; + int EN_NO_WRAP = 93; + int EN_NON_UNIFORM = 94; + int EN_NONE = 95; + int EN_NOREPEAT = 96; + int EN_NORMAL = 97; + int EN_NOT_BLANK = 98; + int EN_ODD = 99; + int EN_ODD_PAGE = 100; + int EN_OUTSET = 101; + int EN_OUTSIDE = 102; + int EN_OVERLINE = 103; + int EN_PAGE = 104; + int EN_PAGE_SEQUENCE = 105; + int EN_PAGINATE = 106; + int EN_PERCEPTUAL = 107; + int EN_PRESERVE = 108; + int EN_REFERENCE_AREA = 109; + int EN_RELATIVE = 110; + int EN_RELATIVE_COLOMETRIC = 111; + int EN_REPEAT = 112; + int EN_REPEATX = 113; + int EN_REPEATY = 114; + int EN_RESAMPLE_ANY_METHOD = 115; + int EN_RESET_SIZE = 116; + int EN_REST = 117; + int EN_RETAIN = 118; + int EN_RIDGE = 119; + int EN_RIGHT = 120; + int EN_RL_TB = 121; + int EN_RTL = 122; + int EN_RULE = 123; + int EN_SATURATION = 124; + int EN_SCALE_TO_FIT = 125; + int EN_SCROLL = 126; + int EN_SEMI_CONDENSED = 127; + int EN_SEMI_EXPANDED = 128; + int EN_SEPARATE = 129; + int EN_SHOW = 130; + int EN_SMALL_CAPS = 131; + int EN_SMALLER = 132; + int EN_SOLID = 133; + int EN_SPACE = 134; + int EN_START = 135; + int EN_STATIC = 136; + int EN_SUB = 137; + int EN_SUPER = 138; + int EN_SUPPRESS = 139; + int EN_TB_RL = 140; + int EN_TEXT_AFTER_EDGE = 141; + int EN_TEXT_BEFORE_EDGE = 142; + int EN_TEXT_BOTTOM = 143; + int EN_TEXT_TOP = 144; + int EN_TOP = 145; + int EN_TRADITIONAL = 146; + int EN_TREAT_AS_SPACE = 147; + int EN_TREAT_AS_ZERO_WIDTH_SPACE = 148; + int EN_TRUE = 149; + int EN_ULTRA_CONDENSED = 150; + int EN_ULTRA_EXPANDED = 151; + int EN_UNBOUNDED = 152; + int EN_UNDERLINE = 153; + int EN_UNIFORM = 154; + int EN_UPPERCASE = 155; + int EN_USE_FONT_METRICS = 156; + int EN_USE_SCRIPT = 157; + int EN_USECONTENT = 158; + int EN_VISIBLE = 159; + int EN_WIDER = 160; + int EN_WRAP = 161; int ENUM_COUNT = 161; } diff --git a/src/java/org/apache/fop/fo/PropertySets.java b/src/java/org/apache/fop/fo/PropertySets.java index ebb340991..3f12d1866 100644 --- a/src/java/org/apache/fop/fo/PropertySets.java +++ b/src/java/org/apache/fop/fo/PropertySets.java @@ -29,7 +29,7 @@ public class PropertySets { private static BitSet can_have_id = null; private static BitSet no_inline_areas = null; - private Element[] elements = new Element[Constants.ELEMENT_COUNT+1]; + private Element[] elements = new Element[Constants.FRM_OBJ_COUNT+1]; private BitSet block_elems = new BitSet(); private BitSet inline_elems = new BitSet(); @@ -1001,7 +1001,7 @@ public class PropertySets { public static short[] getPropertySet(int elementId) { if (mapping == null) { - mapping = new short[Constants.ELEMENT_COUNT+1][]; + mapping = new short[Constants.FRM_OBJ_COUNT+1][]; PropertySets ps = new PropertySets(); ps.initializeElements(); ps.initializeCommon(); -- 2.39.5