/[public]/psiconv/trunk/lib/psiconv/parse_layout.c
ViewVC logotype

Diff of /psiconv/trunk/lib/psiconv/parse_layout.c

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

Revision 86 Revision 143
23#include <stdlib.h> 23#include <stdlib.h>
24#include <math.h> 24#include <math.h>
25 25
26#include "parse_routines.h" 26#include "parse_routines.h"
27#include "error.h" 27#include "error.h"
28
29#ifdef DMALLOC
30#include <dmalloc.h>
31#endif
32
28 33
29int psiconv_parse_color(const psiconv_buffer buf, int lev, psiconv_u32 off, 34int psiconv_parse_color(const psiconv_buffer buf, int lev, psiconv_u32 off,
30 int *length, psiconv_color *result) 35 int *length, psiconv_color *result)
31{ 36{
32 int res = 0; 37 int res = 0;
449 "in paragraph layout codes list"); 454 "in paragraph layout codes list");
450 result->justify_ver = psiconv_justify_bottom; 455 result->justify_ver = psiconv_justify_bottom;
451 } 456 }
452 psiconv_debug(lev+3,off+len,"Justify: %02x",temp); 457 psiconv_debug(lev+3,off+len,"Justify: %02x",temp);
453 len ++; 458 len ++;
459 break;
454 case 0x07: 460 case 0x07:
455 psiconv_progress(lev+3,off+len,"Going to read linespacing distance"); 461 psiconv_progress(lev+3,off+len,"Going to read linespacing distance");
456 result->linespacing = psiconv_read_size(buf,lev+3,off+len,&leng,&res); 462 result->linespacing = psiconv_read_size(buf,lev+3,off+len,&leng,&res);
457 if (res) 463 if (res)
458 goto ERROR1; 464 goto ERROR1;
505 if ((res = psiconv_parse_bool(buf,lev+3,off+len,&leng, 511 if ((res = psiconv_parse_bool(buf,lev+3,off+len,&leng,
506 &result->no_widow_protection))) 512 &result->no_widow_protection)))
507 goto ERROR1; 513 goto ERROR1;
508 len += leng; 514 len += leng;
509 break; 515 break;
516 case 0x0f:
517 psiconv_progress(lev+3,off+len,"Going to read wrap to fit cell limits");
518 if ((res = psiconv_parse_bool(buf,lev+3,off+len,&leng,
519 &result->wrap_to_fit_cell)))
520 goto ERROR1;
521 len += leng;
522 break;
510 case 0x10: 523 case 0x10:
511 psiconv_progress(lev+3,off+len,"Going to read border distance to text"); 524 psiconv_progress(lev+3,off+len,"Going to read border distance to text");
512 result->border_distance = psiconv_read_length(buf,lev+3, 525 result->border_distance = psiconv_read_length(buf,lev+3,
513 off+len,&leng,&res); 526 off+len,&leng,&res);
514 if (res) 527 if (res)
569 goto ERROR1; 582 goto ERROR1;
570 if ((res = psiconv_list_add(result->tabs->extras,temp_tab))) { 583 if ((res = psiconv_list_add(result->tabs->extras,temp_tab))) {
571 psiconv_free_tab(temp_tab); 584 psiconv_free_tab(temp_tab);
572 goto ERROR1; 585 goto ERROR1;
573 } 586 }
587 psiconv_free_tab(temp_tab);
574 len += leng; 588 len += leng;
575 break; 589 break;
576 default: 590 default:
577 psiconv_warn(lev+3,off+len, 591 psiconv_warn(lev+3,off+len,
578 "Unknown code in paragraph layout codes list"); 592 "Unknown code in paragraph layout codes list");

Legend:
Removed from v.86  
changed lines
  Added in v.143

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