Link Here
|
83 |
protected HSSFFooter(FooterRecord footerRecord) { |
83 |
protected HSSFFooter(FooterRecord footerRecord) { |
84 |
this.footerRecord = footerRecord; |
84 |
this.footerRecord = footerRecord; |
85 |
String foot = footerRecord.getFooter(); |
85 |
String foot = footerRecord.getFooter(); |
|
|
86 |
while (foot != null && foot.length() > 1) { |
87 |
int pos = foot.length(); |
88 |
switch (foot.substring(1, 2).charAt(0)) { |
89 |
case 'L' : |
90 |
if (foot.indexOf("&C") >= 0) { |
91 |
pos = Math.min(pos, foot.indexOf("&C")); |
92 |
} |
93 |
if (foot.indexOf("&R") >= 0) { |
94 |
pos = Math.min(pos, foot.indexOf("&R")); |
95 |
} |
96 |
left = foot.substring(2, pos); |
97 |
foot = foot.substring(pos); |
98 |
break; |
99 |
case 'C' : |
100 |
if (foot.indexOf("&L") >= 0) { |
101 |
pos = Math.min(pos, foot.indexOf("&L")); |
102 |
} |
103 |
if (foot.indexOf("&R") >= 0) { |
104 |
pos = Math.min(pos, foot.indexOf("&R")); |
105 |
} |
106 |
center = foot.substring(2, pos); |
107 |
foot = foot.substring(pos); |
108 |
break; |
109 |
case 'R' : |
110 |
if (foot.indexOf("&C") >= 0) { |
111 |
pos = Math.min(pos, foot.indexOf("&C")); |
112 |
} |
113 |
if (foot.indexOf("&L") >= 0) { |
114 |
pos = Math.min(pos, foot.indexOf("&L")); |
115 |
} |
116 |
right = foot.substring(2, pos); |
117 |
foot = foot.substring(pos); |
118 |
break; |
119 |
default : foot = null; |
120 |
} |
121 |
} |
86 |
} |
122 |
} |
87 |
|
123 |
|
88 |
/** |
124 |
/** |