/[public]/psiconv/trunk/program/psiconv/gen_html4.c
ViewVC logotype

Diff of /psiconv/trunk/program/psiconv/gen_html4.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 58 Revision 67
210/* Paragraph formats */ 210/* Paragraph formats */
211static int paragraph_layouts_different( 211static int paragraph_layouts_different(
212 const psiconv_paragraph_layout old, 212 const psiconv_paragraph_layout old,
213 const psiconv_paragraph_layout new) 213 const psiconv_paragraph_layout new)
214{ 214{
215 return ((old->top_space != new->top_space) || 215 return ((old->space_above != new->space_above) ||
216 (old->indent_right != new->indent_right) || 216 (old->indent_right != new->indent_right) ||
217 (old->bottom_space != new->bottom_space) || 217 (old->space_below != new->space_below) ||
218 (old->indent_left != new->indent_left) || 218 (old->indent_left != new->indent_left) ||
219 (old->indent_first != new->indent_first) || 219 (old->indent_first != new->indent_first) ||
220 (old->justify_hor != new->justify_hor) || 220 (old->justify_hor != new->justify_hor) ||
221 (old->interline_exact != new->interline_exact) || 221 (old->linespacing_exact != new->linespacing_exact) ||
222 borders_different(old->left_border, new->left_border) || 222 borders_different(old->left_border, new->left_border) ||
223 borders_different(old->right_border, new->right_border) || 223 borders_different(old->right_border, new->right_border) ||
224 borders_different(old->top_border, new->top_border) || 224 borders_different(old->top_border, new->top_border) ||
225 borders_different(old->bottom_border, new->bottom_border)); 225 borders_different(old->bottom_border, new->bottom_border));
226} 226}
227 227
228static void fput_paragraph_layout(FILE * of, 228static void fput_paragraph_layout(FILE * of,
229 const psiconv_paragraph_layout old, 229 const psiconv_paragraph_layout old,
230 const psiconv_paragraph_layout new) 230 const psiconv_paragraph_layout new)
231{ 231{
232 if (!old || (old->top_space != new->top_space)) 232 if (!old || (old->space_above != new->space_above))
233 fprintf(of, "margin-top:%.1fpt;", new->top_space); 233 fprintf(of, "margin-top:%.1fpt;", new->space_above);
234 if (!old || (old->indent_right != new->indent_right)) 234 if (!old || (old->indent_right != new->indent_right))
235 fprintf(of, "margin-right:%.2fcm;", new->indent_right); 235 fprintf(of, "margin-right:%.2fcm;", new->indent_right);
236 if (!old || (old->bottom_space != new->bottom_space)) 236 if (!old || (old->space_below != new->space_below))
237 fprintf(of, "margin-bottom:%.1fpt;", new->bottom_space); 237 fprintf(of, "margin-bottom:%.1fpt;", new->space_below);
238 if (!old || 238 if (!old ||
239 (old->bullet->on != new->bullet->on) || 239 (old->bullet->on != new->bullet->on) ||
240 (old->bullet->indent != new->bullet->indent) || 240 (old->bullet->indent != new->bullet->indent) ||
241 (old->indent_left != new->indent_left) || 241 (old->indent_left != new->indent_left) ||
242 (old->indent_first != new->indent_first)) { 242 (old->indent_first != new->indent_first)) {
252 fprintf(of, "margin-left:%.2fcm;", margin); 252 fprintf(of, "margin-left:%.2fcm;", margin);
253 fprintf(of, "text-indent:%.2fcm;", indent); 253 fprintf(of, "text-indent:%.2fcm;", indent);
254 } 254 }
255 if (!old || (old->justify_hor != new->justify_hor)) 255 if (!old || (old->justify_hor != new->justify_hor))
256 fprintf(of, "text-align:%s;", justify_strings[new->justify_hor]); 256 fprintf(of, "text-align:%s;", justify_strings[new->justify_hor]);
257 if (!old || (old->interline_exact != new->interline_exact)) { 257 if (!old || (old->linespacing_exact != new->linespacing_exact)) {
258 if (!old || old->interline_exact) 258 if (!old || old->linespacing_exact)
259 fputs("line-height:normal;", of); 259 fputs("line-height:normal;", of);
260 else 260 else
261 fprintf(of, "line-height:%.1fpt;", new->interline); 261 fprintf(of, "line-height:%.1fpt;", new->linespacing);
262 } 262 }
263 fput_border(of, "left", old ? old->left_border : NULL, 263 fput_border(of, "left", old ? old->left_border : NULL,
264 new->left_border); 264 new->left_border);
265 fput_border(of, "right", old ? old->right_border : NULL, 265 fput_border(of, "right", old ? old->right_border : NULL,
266 new->right_border); 266 new->right_border);
286 (old->back_color->blue != new->back_color->blue) || 286 (old->back_color->blue != new->back_color->blue) ||
287 (old->italic != new->italic) || 287 (old->italic != new->italic) ||
288 (old->bold != new->bold) || 288 (old->bold != new->bold) ||
289 (old->super_sub != new->super_sub) || 289 (old->super_sub != new->super_sub) ||
290 (old->underline != new->underline) || 290 (old->underline != new->underline) ||
291 (old->strike_out != new->strike_out)); 291 (old->strikethrough != new->strikethrough));
292} 292}
293 293
294static void fput_character_layout(FILE * of, 294static void fput_character_layout(FILE * of,
295 const psiconv_character_layout old, 295 const psiconv_character_layout old,
296 const psiconv_character_layout new, 296 const psiconv_character_layout new,
315 fprintf(of, "background-color:#%02x%02x%02x;", 315 fprintf(of, "background-color:#%02x%02x%02x;",
316 new->back_color->red, new->back_color->green, new->back_color->blue); 316 new->back_color->red, new->back_color->green, new->back_color->blue);
317 if (!old || (old->super_sub != new->super_sub)) 317 if (!old || (old->super_sub != new->super_sub))
318 fprintf(of, "vertical-align:%s;", vertical_strings[new->super_sub]); 318 fprintf(of, "vertical-align:%s;", vertical_strings[new->super_sub]);
319 if (!old || (old->underline != new->underline) || 319 if (!old || (old->underline != new->underline) ||
320 (old->strike_out != new->strike_out)) { 320 (old->strikethrough != new->strikethrough)) {
321 fputs("text-decoration:", of); 321 fputs("text-decoration:", of);
322 if (new->strike_out) 322 if (new->strikethrough)
323 fputs("line-through ", of); 323 fputs("line-through ", of);
324 if (new->underline) 324 if (new->underline)
325 fputs("underline", of); 325 fputs("underline", of);
326 else if (!new->strike_out) 326 else if (!new->strikethrough)
327 fputs("none", of); 327 fputs("none", of);
328 fputs(";", of); 328 fputs(";", of);
329 } 329 }
330} 330}
331 331

Legend:
Removed from v.58  
changed lines
  Added in v.67

frodo@frodo.looijaard.name
ViewVC Help
Powered by ViewVC 1.1.26