Changeset 2684
- Timestamp:
- 2001-08-02T12:13:43+12:00 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/hlistbrowserclass.cpp
r1610 r2684 118 118 119 119 text_t icon, link; 120 int num_chars=0; // see note below - jrm21 120 121 while (tsibling != esibling) { 121 122 122 123 bool highlight = false; 123 textout << "<td>";124 124 text_t &doctype = (*tsibling).metadata["doctype"].values[0]; 125 125 … … 135 135 } 136 136 137 textout << outconvert << disp 138 << get_formatted_string (collection, collectproto, 139 *tsibling, disp, formatlistptr, link, icon, highlight, 140 logout); 137 text_t fmt_str=get_formatted_string (collection, collectproto, 138 *tsibling, disp, formatlistptr, 139 link, icon, highlight, logout); 141 140 142 textout << "</td>\n"; 141 /* this is awful. Someone please come up with a better way to prevent 142 the table of contents when browsing metadata from becoming too wide. 143 This is an attempt to add new rows when the number of characters in 144 the current row becomes too high. It doesn't know about macros in the 145 string, though... -- jrm21 */ 146 147 char *tmp_str=fmt_str.getcstr(); 148 char *end_str=tmp_str+strlen(tmp_str); 149 while (tmp_str<end_str) { 150 if (*tmp_str=='<') { // for html tags 151 while (*tmp_str!='>') tmp_str++; 152 } else if (*tmp_str=='&') { // for html entities 153 while (*tmp_str!=';') tmp_str++; 154 num_chars++; 155 } else num_chars++; 156 tmp_str++; 157 } 158 159 if (num_chars>100) { // this is fairly arbitrary... 160 textout << "</tr>\n<tr>"; 161 num_chars=0; 162 } 163 164 textout << "<td>" << outconvert << disp << fmt_str << "</td>\n"; 143 165 tsibling ++; 144 166 }
Note:
See TracChangeset
for help on using the changeset viewer.