… | |
… | |
32 | |
32 | |
33 | #ifdef __cplusplus |
33 | #ifdef __cplusplus |
34 | extern "C" { |
34 | extern "C" { |
35 | #endif /* __cplusplus */ |
35 | #endif /* __cplusplus */ |
36 | |
36 | |
|
|
37 | /* Forward declaration (for psiconv_object) */ |
|
|
38 | typedef struct psiconv_file_s *psiconv_file; |
|
|
39 | |
|
|
40 | typedef double psiconv_float_t; |
37 | |
41 | |
38 | typedef enum psiconv_file_type { |
42 | typedef enum psiconv_file_type { |
39 | psiconv_unknown_file, |
43 | psiconv_unknown_file, |
40 | psiconv_word_file, |
44 | psiconv_word_file, |
41 | psiconv_texted_file, |
45 | psiconv_texted_file, |
… | |
… | |
190 | psiconv_size_t space_below; |
194 | psiconv_size_t space_below; |
191 | psiconv_bool_t keep_together; |
195 | psiconv_bool_t keep_together; |
192 | psiconv_bool_t keep_with_next; |
196 | psiconv_bool_t keep_with_next; |
193 | psiconv_bool_t on_next_page; |
197 | psiconv_bool_t on_next_page; |
194 | psiconv_bool_t no_widow_protection; |
198 | psiconv_bool_t no_widow_protection; |
|
|
199 | psiconv_bool_t wrap_to_fit_cell; |
195 | psiconv_length_t border_distance; |
200 | psiconv_length_t border_distance; |
196 | psiconv_bullet bullet; |
201 | psiconv_bullet bullet; |
197 | psiconv_border left_border; |
202 | psiconv_border left_border; |
198 | psiconv_border right_border; |
203 | psiconv_border right_border; |
199 | psiconv_border top_border; |
204 | psiconv_border top_border; |
… | |
… | |
223 | { |
228 | { |
224 | psiconv_u32 id; |
229 | psiconv_u32 id; |
225 | psiconv_string_t name; |
230 | psiconv_string_t name; |
226 | } *psiconv_application_id_section; |
231 | } *psiconv_application_id_section; |
227 | |
232 | |
|
|
233 | typedef struct psiconv_object_icon_section_s |
|
|
234 | { |
|
|
235 | psiconv_length_t icon_width; |
|
|
236 | psiconv_length_t icon_height; |
|
|
237 | psiconv_string_t icon_name; |
|
|
238 | } *psiconv_object_icon_section; |
|
|
239 | |
|
|
240 | typedef struct psiconv_object_display_section_s |
|
|
241 | { |
|
|
242 | psiconv_bool_t show_icon; |
|
|
243 | psiconv_length_t width; |
|
|
244 | psiconv_length_t height; |
|
|
245 | } *psiconv_object_display_section; |
|
|
246 | |
|
|
247 | typedef struct psiconv_object_s |
|
|
248 | { |
|
|
249 | psiconv_object_icon_section icon; |
|
|
250 | psiconv_object_display_section display; |
|
|
251 | psiconv_file object; |
|
|
252 | } *psiconv_object; |
|
|
253 | |
228 | typedef struct psiconv_in_line_layout_s |
254 | typedef struct psiconv_in_line_layout_s |
229 | { |
255 | { |
230 | psiconv_character_layout layout; |
256 | psiconv_character_layout layout; |
231 | int length; |
257 | int length; |
|
|
258 | /* If object is NULL, this does not apply to an object */ |
|
|
259 | psiconv_object object; |
|
|
260 | psiconv_length_t object_width; |
|
|
261 | psiconv_length_t object_height; |
232 | } *psiconv_in_line_layout; |
262 | } *psiconv_in_line_layout; |
233 | |
263 | |
234 | typedef psiconv_list psiconv_in_line_layouts; /* of struct in_line_layout */ |
264 | typedef psiconv_list psiconv_in_line_layouts; /* of struct in_line_layout */ |
235 | |
265 | |
236 | typedef enum psiconv_replacement_type |
266 | typedef enum psiconv_replacement_type |
… | |
… | |
362 | typedef struct psiconv_mbm_f_s |
392 | typedef struct psiconv_mbm_f_s |
363 | { |
393 | { |
364 | psiconv_pictures sections; |
394 | psiconv_pictures sections; |
365 | } *psiconv_mbm_f; |
395 | } *psiconv_mbm_f; |
366 | |
396 | |
367 | /* This is a little intricated. A picture may be embedded in a larger form. |
397 | /* Read the Psiconv file format documentation for a complete discription. |
368 | A form is empty, except for the picture. The form has size form_{x,y}size, |
398 | Basic idea: a picture has a certain display size. Within it, the pixel |
369 | and the picture is at offset picture_{x,y}_offset within the form. The |
399 | data begins at a certain offset. Around it, there is an empty form. |
370 | picture itself has size picture_{x,y}size. |
400 | The first eight values are before magnification and cuts. |
371 | Cuts are always <= 1.0; a cut of 0.0 cuts nothing away, a cut of 1.0 |
401 | Cuts are always <= 1.0; a cut of 0.0 cuts nothing away, a cut of 1.0 |
372 | cuts everything away. */ |
402 | cuts everything away. */ |
373 | typedef struct psiconv_sketch_section_s |
403 | typedef struct psiconv_sketch_section_s |
374 | { |
404 | { |
|
|
405 | psiconv_u16 displayed_xsize; |
|
|
406 | psiconv_u16 displayed_ysize; |
|
|
407 | psiconv_u16 picture_data_x_offset; |
|
|
408 | psiconv_u16 picture_data_y_offset; |
375 | psiconv_u16 form_xsize; |
409 | psiconv_u16 form_xsize; |
376 | psiconv_u16 form_ysize; |
410 | psiconv_u16 form_ysize; |
377 | psiconv_u16 picture_x_offset; |
411 | psiconv_u16 displayed_size_x_offset; |
378 | psiconv_u16 picture_y_offset; |
412 | psiconv_u16 displayed_size_y_offset; |
379 | psiconv_u16 picture_xsize; |
|
|
380 | psiconv_u16 picture_ysize; |
|
|
381 | float magnification_x; /* computed relative to first six values */ |
413 | float magnification_x; /* computed relative to first eight values */ |
382 | float magnification_y; /* computed relative to first six values */ |
414 | float magnification_y; /* computed relative to first eight values */ |
383 | float cut_left; /* computed relative to first six values */ |
415 | float cut_left; /* computed relative to first eight values */ |
384 | float cut_right; /* computed relative to first six values */ |
416 | float cut_right; /* computed relative to first eight values */ |
385 | float cut_top; /* computed relative to first six values */ |
417 | float cut_top; /* computed relative to first eight values */ |
386 | float cut_bottom; /* computed relative to first six values */ |
418 | float cut_bottom; /* computed relative to first eight values */ |
387 | psiconv_paint_data_section picture; |
419 | psiconv_paint_data_section picture; |
388 | } *psiconv_sketch_section; |
420 | } *psiconv_sketch_section; |
389 | |
421 | |
390 | typedef struct psiconv_sketch_f_s |
422 | typedef struct psiconv_sketch_f_s |
391 | { |
423 | { |
… | |
… | |
402 | |
434 | |
403 | typedef struct psiconv_clipart_f_s |
435 | typedef struct psiconv_clipart_f_s |
404 | { |
436 | { |
405 | psiconv_cliparts sections; |
437 | psiconv_cliparts sections; |
406 | } *psiconv_clipart_f; |
438 | } *psiconv_clipart_f; |
|
|
439 | |
|
|
440 | typedef struct psiconv_sheet_ref_s |
|
|
441 | { |
|
|
442 | psiconv_s16 offset; |
|
|
443 | psiconv_bool_t absolute; |
|
|
444 | } psiconv_sheet_ref_t; |
|
|
445 | |
|
|
446 | typedef struct psiconv_sheet_cell_reference_s |
|
|
447 | { |
|
|
448 | psiconv_sheet_ref_t row; |
|
|
449 | psiconv_sheet_ref_t column; |
|
|
450 | } psiconv_sheet_cell_reference_t; |
|
|
451 | |
|
|
452 | typedef struct psiconv_sheet_cell_block_s |
|
|
453 | { |
|
|
454 | psiconv_sheet_cell_reference_t first; |
|
|
455 | psiconv_sheet_cell_reference_t last; |
|
|
456 | } psiconv_sheet_cell_block_t; |
|
|
457 | |
|
|
458 | typedef enum psiconv_cell_type |
|
|
459 | { |
|
|
460 | psiconv_cell_blank, |
|
|
461 | psiconv_cell_int, |
|
|
462 | psiconv_cell_bool, |
|
|
463 | psiconv_cell_error, |
|
|
464 | psiconv_cell_float, |
|
|
465 | psiconv_cell_string |
|
|
466 | } psiconv_cell_type_t; |
|
|
467 | |
|
|
468 | typedef enum psiconv_sheet_errorcode |
|
|
469 | { |
|
|
470 | psiconv_sheet_error_none, |
|
|
471 | psiconv_sheet_error_null, |
|
|
472 | psiconv_sheet_error_divzero, |
|
|
473 | psiconv_sheet_error_value, |
|
|
474 | psiconv_sheet_error_reference, |
|
|
475 | psiconv_sheet_error_name, |
|
|
476 | psiconv_sheet_error_number, |
|
|
477 | psiconv_sheet_error_notavail |
|
|
478 | } psiconv_sheet_errorcode_t; |
|
|
479 | |
|
|
480 | typedef enum psiconv_sheet_numberformat_code |
|
|
481 | { |
|
|
482 | psiconv_numberformat_general, |
|
|
483 | psiconv_numberformat_fixeddecimal, |
|
|
484 | psiconv_numberformat_scientific, |
|
|
485 | psiconv_numberformat_currency, |
|
|
486 | psiconv_numberformat_percent, |
|
|
487 | psiconv_numberformat_triads, |
|
|
488 | psiconv_numberformat_boolean, |
|
|
489 | psiconv_numberformat_text, |
|
|
490 | psiconv_numberformat_date_dmm, |
|
|
491 | psiconv_numberformat_date_mmd, |
|
|
492 | psiconv_numberformat_date_ddmmyy, |
|
|
493 | psiconv_numberformat_date_mmddyy, |
|
|
494 | psiconv_numberformat_date_yymmdd, |
|
|
495 | psiconv_numberformat_date_dmmm, |
|
|
496 | psiconv_numberformat_date_dmmmyy, |
|
|
497 | psiconv_numberformat_date_ddmmmyy, |
|
|
498 | psiconv_numberformat_date_mmm, |
|
|
499 | psiconv_numberformat_date_monthname, |
|
|
500 | psiconv_numberformat_date_mmmyy, |
|
|
501 | psiconv_numberformat_date_monthnameyy, |
|
|
502 | psiconv_numberformat_date_monthnamedyyyy, |
|
|
503 | psiconv_numberformat_datetime_ddmmyyyyhhii, |
|
|
504 | psiconv_numberformat_datetime_ddmmyyyyHHii, |
|
|
505 | psiconv_numberformat_datetime_mmddyyyyhhii, |
|
|
506 | psiconv_numberformat_datetime_mmddyyyyHHii, |
|
|
507 | psiconv_numberformat_datetime_yyyymmddhhii, |
|
|
508 | psiconv_numberformat_datetime_yyyymmddHHii, |
|
|
509 | psiconv_numberformat_time_hhii, |
|
|
510 | psiconv_numberformat_time_hhiiss, |
|
|
511 | psiconv_numberformat_time_HHii, |
|
|
512 | psiconv_numberformat_time_HHiiss |
|
|
513 | } psiconv_sheet_numberformat_code_t; |
|
|
514 | |
|
|
515 | typedef struct psiconv_sheet_numberformat_s |
|
|
516 | { |
|
|
517 | psiconv_sheet_numberformat_code_t code; |
|
|
518 | psiconv_u8 decimal; |
|
|
519 | } *psiconv_sheet_numberformat; |
|
|
520 | |
|
|
521 | typedef struct psiconv_sheet_cell_layout_s |
|
|
522 | { |
|
|
523 | psiconv_character_layout character; |
|
|
524 | psiconv_paragraph_layout paragraph; |
|
|
525 | psiconv_sheet_numberformat numberformat; |
|
|
526 | } * psiconv_sheet_cell_layout; |
|
|
527 | |
|
|
528 | typedef struct psiconv_sheet_cell_s |
|
|
529 | { |
|
|
530 | psiconv_u16 column; |
|
|
531 | psiconv_u16 row; |
|
|
532 | psiconv_cell_type_t type; |
|
|
533 | union { |
|
|
534 | psiconv_u32 dat_int; |
|
|
535 | double dat_float; |
|
|
536 | char *dat_string; |
|
|
537 | psiconv_bool_t dat_bool; |
|
|
538 | psiconv_sheet_errorcode_t dat_error; |
|
|
539 | } data; |
|
|
540 | psiconv_sheet_cell_layout layout; |
|
|
541 | psiconv_bool_t calculated; |
|
|
542 | psiconv_u32 ref_formula; |
|
|
543 | } *psiconv_sheet_cell; |
|
|
544 | |
|
|
545 | typedef psiconv_list psiconv_sheet_cell_list; |
407 | |
546 | |
408 | typedef struct psiconv_sheet_status_section_s |
547 | typedef struct psiconv_sheet_status_section_s |
409 | { |
548 | { |
410 | psiconv_bool_t show_graph; |
549 | psiconv_bool_t show_graph; |
411 | psiconv_u32 cursor_row; |
550 | psiconv_u32 cursor_row; |
… | |
… | |
418 | psiconv_u32 graph_display_size; |
557 | psiconv_u32 graph_display_size; |
419 | psiconv_triple_t show_horizontal_scrollbar; |
558 | psiconv_triple_t show_horizontal_scrollbar; |
420 | psiconv_triple_t show_vertical_scrollbar; |
559 | psiconv_triple_t show_vertical_scrollbar; |
421 | } *psiconv_sheet_status_section; |
560 | } *psiconv_sheet_status_section; |
422 | |
561 | |
|
|
562 | typedef enum psiconv_formula_type |
|
|
563 | { |
|
|
564 | psiconv_formula_unknown, |
|
|
565 | psiconv_formula_op_lt, |
|
|
566 | psiconv_formula_op_le, |
|
|
567 | psiconv_formula_op_gt, |
|
|
568 | psiconv_formula_op_ge, |
|
|
569 | psiconv_formula_op_ne, |
|
|
570 | psiconv_formula_op_eq, |
|
|
571 | psiconv_formula_op_add, |
|
|
572 | psiconv_formula_op_sub, |
|
|
573 | psiconv_formula_op_mul, |
|
|
574 | psiconv_formula_op_div, |
|
|
575 | psiconv_formula_op_pow, |
|
|
576 | psiconv_formula_op_pos, |
|
|
577 | psiconv_formula_op_neg, |
|
|
578 | psiconv_formula_op_not, |
|
|
579 | psiconv_formula_op_and, |
|
|
580 | psiconv_formula_op_or, |
|
|
581 | psiconv_formula_op_con, |
|
|
582 | psiconv_formula_op_bra, |
|
|
583 | psiconv_formula_mark_eof, |
|
|
584 | psiconv_formula_dat_float, |
|
|
585 | psiconv_formula_dat_int, |
|
|
586 | psiconv_formula_dat_var, |
|
|
587 | psiconv_formula_dat_string, |
|
|
588 | psiconv_formula_dat_cellref, |
|
|
589 | psiconv_formula_dat_cellblock, |
|
|
590 | psiconv_formula_dat_vcellblock, |
|
|
591 | psiconv_formula_mark_opsep, |
|
|
592 | psiconv_formula_mark_opend, |
|
|
593 | psiconv_formula_fun_false, |
|
|
594 | psiconv_formula_fun_if, |
|
|
595 | psiconv_formula_fun_true, |
|
|
596 | psiconv_formula_fun_cell, |
|
|
597 | psiconv_formula_fun_errortype, |
|
|
598 | psiconv_formula_fun_isblank, |
|
|
599 | psiconv_formula_fun_iserr, |
|
|
600 | psiconv_formula_fun_iserror, |
|
|
601 | psiconv_formula_fun_islogical, |
|
|
602 | psiconv_formula_fun_isna, |
|
|
603 | psiconv_formula_fun_isnontext, |
|
|
604 | psiconv_formula_fun_isnumber, |
|
|
605 | psiconv_formula_fun_istext, |
|
|
606 | psiconv_formula_fun_n, |
|
|
607 | psiconv_formula_fun_type, |
|
|
608 | psiconv_formula_fun_address, |
|
|
609 | psiconv_formula_fun_column, |
|
|
610 | psiconv_formula_fun_columns, |
|
|
611 | psiconv_formula_fun_hlookup, |
|
|
612 | psiconv_formula_fun_index, |
|
|
613 | psiconv_formula_fun_indirect, |
|
|
614 | psiconv_formula_fun_lookup, |
|
|
615 | psiconv_formula_fun_offset, |
|
|
616 | psiconv_formula_fun_row, |
|
|
617 | psiconv_formula_fun_rows, |
|
|
618 | psiconv_formula_fun_vlookup, |
|
|
619 | psiconv_formula_fun_char, |
|
|
620 | psiconv_formula_fun_code, |
|
|
621 | psiconv_formula_fun_exact, |
|
|
622 | psiconv_formula_fun_find, |
|
|
623 | psiconv_formula_fun_left, |
|
|
624 | psiconv_formula_fun_len, |
|
|
625 | psiconv_formula_fun_lower, |
|
|
626 | psiconv_formula_fun_mid, |
|
|
627 | psiconv_formula_fun_proper, |
|
|
628 | psiconv_formula_fun_replace, |
|
|
629 | psiconv_formula_fun_rept, |
|
|
630 | psiconv_formula_fun_right, |
|
|
631 | psiconv_formula_fun_string, |
|
|
632 | psiconv_formula_fun_t, |
|
|
633 | psiconv_formula_fun_trim, |
|
|
634 | psiconv_formula_fun_upper, |
|
|
635 | psiconv_formula_fun_value, |
|
|
636 | psiconv_formula_fun_date, |
|
|
637 | psiconv_formula_fun_datevalue, |
|
|
638 | psiconv_formula_fun_day, |
|
|
639 | psiconv_formula_fun_hour, |
|
|
640 | psiconv_formula_fun_minute, |
|
|
641 | psiconv_formula_fun_month, |
|
|
642 | psiconv_formula_fun_now, |
|
|
643 | psiconv_formula_fun_second, |
|
|
644 | psiconv_formula_fun_today, |
|
|
645 | psiconv_formula_fun_time, |
|
|
646 | psiconv_formula_fun_timevalue, |
|
|
647 | psiconv_formula_fun_year, |
|
|
648 | psiconv_formula_fun_abs, |
|
|
649 | psiconv_formula_fun_acos, |
|
|
650 | psiconv_formula_fun_asin, |
|
|
651 | psiconv_formula_fun_atan, |
|
|
652 | psiconv_formula_fun_atan2, |
|
|
653 | psiconv_formula_fun_cos, |
|
|
654 | psiconv_formula_fun_degrees, |
|
|
655 | psiconv_formula_fun_exp, |
|
|
656 | psiconv_formula_fun_fact, |
|
|
657 | psiconv_formula_fun_int, |
|
|
658 | psiconv_formula_fun_ln, |
|
|
659 | psiconv_formula_fun_log10, |
|
|
660 | psiconv_formula_fun_mod, |
|
|
661 | psiconv_formula_fun_pi, |
|
|
662 | psiconv_formula_fun_radians, |
|
|
663 | psiconv_formula_fun_rand, |
|
|
664 | psiconv_formula_fun_round, |
|
|
665 | psiconv_formula_fun_sign, |
|
|
666 | psiconv_formula_fun_sin, |
|
|
667 | psiconv_formula_fun_sqrt, |
|
|
668 | psiconv_formula_fun_sumproduct, |
|
|
669 | psiconv_formula_fun_tan, |
|
|
670 | psiconv_formula_fun_trunc, |
|
|
671 | psiconv_formula_fun_cterm, |
|
|
672 | psiconv_formula_fun_ddb, |
|
|
673 | psiconv_formula_fun_fv, |
|
|
674 | psiconv_formula_fun_irr, |
|
|
675 | psiconv_formula_fun_npv, |
|
|
676 | psiconv_formula_fun_pmt, |
|
|
677 | psiconv_formula_fun_pv, |
|
|
678 | psiconv_formula_fun_rate, |
|
|
679 | psiconv_formula_fun_sln, |
|
|
680 | psiconv_formula_fun_syd, |
|
|
681 | psiconv_formula_fun_term, |
|
|
682 | psiconv_formula_fun_combin, |
|
|
683 | psiconv_formula_fun_permut, |
|
|
684 | psiconv_formula_vfn_average, |
|
|
685 | psiconv_formula_vfn_choose, |
|
|
686 | psiconv_formula_vfn_count, |
|
|
687 | psiconv_formula_vfn_counta, |
|
|
688 | psiconv_formula_vfn_countblank, |
|
|
689 | psiconv_formula_vfn_max, |
|
|
690 | psiconv_formula_vfn_min, |
|
|
691 | psiconv_formula_vfn_product, |
|
|
692 | psiconv_formula_vfn_stdevp, |
|
|
693 | psiconv_formula_vfn_stdev, |
|
|
694 | psiconv_formula_vfn_sum, |
|
|
695 | psiconv_formula_vfn_sumsq, |
|
|
696 | psiconv_formula_vfn_varp, |
|
|
697 | psiconv_formula_vfn_var |
|
|
698 | } psiconv_formula_type_t; |
|
|
699 | |
|
|
700 | typedef psiconv_list psiconv_formula_list; /* Of struct psiconv_formula_s */ |
|
|
701 | |
423 | typedef struct psiconv_sheet_formula_s |
702 | typedef struct psiconv_formula_s |
424 | { |
703 | { |
425 | int dummy; |
704 | psiconv_formula_type_t type; |
|
|
705 | union { |
|
|
706 | psiconv_u32 dat_int; |
|
|
707 | double dat_float; |
|
|
708 | char *dat_string; |
|
|
709 | psiconv_sheet_cell_reference_t dat_cellref; |
|
|
710 | psiconv_sheet_cell_block_t dat_cellblock; |
|
|
711 | psiconv_formula_list fun_operands; |
|
|
712 | psiconv_u32 dat_variable; |
|
|
713 | } data; |
426 | } *psiconv_sheet_formula; |
714 | } *psiconv_formula; |
427 | |
715 | |
|
|
716 | typedef struct psiconv_sheet_line_s |
|
|
717 | { |
|
|
718 | psiconv_u32 position; |
|
|
719 | psiconv_sheet_cell_layout layout; |
|
|
720 | } *psiconv_sheet_line; |
|
|
721 | |
|
|
722 | typedef psiconv_list psiconv_sheet_line_list; |
|
|
723 | /* Of struct psiconv_sheet_line_s */ |
|
|
724 | |
|
|
725 | typedef struct psiconv_sheet_grid_size_s |
|
|
726 | { |
|
|
727 | psiconv_u32 line_number; |
|
|
728 | psiconv_length_t size; |
|
|
729 | } *psiconv_sheet_grid_size; |
|
|
730 | |
|
|
731 | typedef psiconv_list psiconv_sheet_grid_size_list; |
|
|
732 | /* Of struct psiconv_sheet_grid_size_s */ |
|
|
733 | |
428 | typedef psiconv_list psiconv_sheet_formula_list; /* Of struct psiconv_formula */ |
734 | typedef psiconv_list psiconv_sheet_grid_break_list; /* of psiconv_u32 */ |
|
|
735 | |
|
|
736 | typedef struct psiconv_sheet_grid_section_s |
|
|
737 | { |
|
|
738 | psiconv_bool_t show_column_titles; |
|
|
739 | psiconv_bool_t show_row_titles; |
|
|
740 | psiconv_bool_t show_vertical_grid; |
|
|
741 | psiconv_bool_t show_horizontal_grid; |
|
|
742 | psiconv_bool_t freeze_rows; |
|
|
743 | psiconv_bool_t freeze_columns; |
|
|
744 | psiconv_u32 frozen_rows; |
|
|
745 | psiconv_u32 frozen_columns; |
|
|
746 | psiconv_u32 first_unfrozen_row_displayed; |
|
|
747 | psiconv_u32 first_unfrozen_column_displayed; |
|
|
748 | psiconv_bool_t show_page_breaks; |
|
|
749 | psiconv_u32 first_row; |
|
|
750 | psiconv_u32 first_column; |
|
|
751 | psiconv_u32 last_row; |
|
|
752 | psiconv_u32 last_column; |
|
|
753 | psiconv_length_t default_row_height; |
|
|
754 | psiconv_length_t default_column_width; |
|
|
755 | psiconv_sheet_grid_size_list row_heights; |
|
|
756 | psiconv_sheet_grid_size_list column_heights; |
|
|
757 | psiconv_sheet_grid_break_list row_page_breaks; |
|
|
758 | psiconv_sheet_grid_break_list column_page_breaks; |
|
|
759 | } *psiconv_sheet_grid_section; |
|
|
760 | |
|
|
761 | typedef struct psiconv_sheet_worksheet_s |
|
|
762 | { |
|
|
763 | psiconv_sheet_cell_layout default_layout; |
|
|
764 | psiconv_sheet_cell_list cells; |
|
|
765 | psiconv_bool_t show_zeros; |
|
|
766 | psiconv_sheet_line_list row_default_layouts; |
|
|
767 | psiconv_sheet_line_list col_default_layouts; |
|
|
768 | psiconv_sheet_grid_section grid; |
|
|
769 | } *psiconv_sheet_worksheet; |
|
|
770 | |
|
|
771 | typedef psiconv_list psiconv_sheet_worksheet_list; |
|
|
772 | /* of struct psiconv_sheet_worksheet_s */ |
|
|
773 | |
|
|
774 | typedef enum psiconv_variable_type |
|
|
775 | { |
|
|
776 | psiconv_var_int, |
|
|
777 | psiconv_var_float, |
|
|
778 | psiconv_var_string, |
|
|
779 | psiconv_var_cellref, |
|
|
780 | psiconv_var_cellblock |
|
|
781 | } psiconv_variable_type_t; |
|
|
782 | |
|
|
783 | typedef struct psiconv_sheet_variable_s |
|
|
784 | { |
|
|
785 | psiconv_u32 number; |
|
|
786 | char *name; |
|
|
787 | psiconv_variable_type_t type; |
|
|
788 | union { |
|
|
789 | psiconv_s32 dat_int; |
|
|
790 | double dat_float; |
|
|
791 | char *dat_string; |
|
|
792 | psiconv_sheet_cell_reference_t dat_cellref; |
|
|
793 | psiconv_sheet_cell_block_t dat_cellblock; |
|
|
794 | } data; |
|
|
795 | } *psiconv_sheet_variable; |
|
|
796 | |
|
|
797 | typedef psiconv_list psiconv_sheet_variable_list; |
|
|
798 | /* of struct psiconv_sheet_variable_s */ |
|
|
799 | |
|
|
800 | typedef struct psiconv_sheet_name_section_s |
|
|
801 | { |
|
|
802 | char *name; |
|
|
803 | } *psiconv_sheet_name_section; |
|
|
804 | |
|
|
805 | typedef struct psiconv_sheet_info_section_s |
|
|
806 | { |
|
|
807 | psiconv_bool_t auto_recalc; |
|
|
808 | } *psiconv_sheet_info_section; |
429 | |
809 | |
430 | typedef struct psiconv_sheet_workbook_section_s |
810 | typedef struct psiconv_sheet_workbook_section_s |
431 | { |
811 | { |
432 | psiconv_sheet_formula_list formulas; |
812 | psiconv_formula_list formulas; |
|
|
813 | psiconv_sheet_worksheet_list worksheets; |
|
|
814 | psiconv_sheet_variable_list variables; |
|
|
815 | psiconv_sheet_info_section info; |
|
|
816 | psiconv_sheet_name_section name; |
433 | } *psiconv_sheet_workbook_section; |
817 | } *psiconv_sheet_workbook_section; |
434 | |
818 | |
435 | typedef struct psiconv_sheet_f_s |
819 | typedef struct psiconv_sheet_f_s |
436 | { |
820 | { |
437 | psiconv_page_layout_section page_sec; |
821 | psiconv_page_layout_section page_sec; |
438 | psiconv_sheet_status_section status_sec; |
822 | psiconv_sheet_status_section status_sec; |
439 | psiconv_sheet_workbook_section workbook_sec; |
823 | psiconv_sheet_workbook_section workbook_sec; |
440 | } *psiconv_sheet_f; |
824 | } *psiconv_sheet_f; |
441 | |
825 | |
|
|
826 | /* NB: psiconv_file is already defined above */ |
442 | typedef struct psiconv_file_s |
827 | struct psiconv_file_s |
443 | { |
828 | { |
444 | psiconv_file_type_t type; |
829 | psiconv_file_type_t type; |
445 | void *file; |
830 | void *file; |
446 | } *psiconv_file; |
831 | }; |
447 | |
832 | |
448 | |
833 | |
449 | /* UID1 */ |
834 | /* UID1 */ |
450 | #define PSICONV_ID_PSION5 0x10000037 |
835 | #define PSICONV_ID_PSION5 0x10000037 |
451 | #define PSICONV_ID_CLIPART 0x10000041 |
836 | #define PSICONV_ID_CLIPART 0x10000041 |
… | |
… | |
467 | #define PSICONV_ID_PAGE_LAYOUT_SECTION 0x10000105 |
852 | #define PSICONV_ID_PAGE_LAYOUT_SECTION 0x10000105 |
468 | #define PSICONV_ID_PASSWORD_SECTION 0x100000CD |
853 | #define PSICONV_ID_PASSWORD_SECTION 0x100000CD |
469 | #define PSICONV_ID_SKETCH_SECTION 0x1000007D |
854 | #define PSICONV_ID_SKETCH_SECTION 0x1000007D |
470 | #define PSICONV_ID_SHEET_STATUS_SECTION 0x1000011F |
855 | #define PSICONV_ID_SHEET_STATUS_SECTION 0x1000011F |
471 | #define PSICONV_ID_SHEET_WORKBOOK_SECTION 0x1000011D |
856 | #define PSICONV_ID_SHEET_WORKBOOK_SECTION 0x1000011D |
|
|
857 | #define PSICONV_ID_SHEET_GRAPH_SECTION 0x10000121 |
472 | |
858 | |
473 | /* Other ids */ |
859 | /* Other ids */ |
474 | #define PSICONV_ID_PAGE_DIMENSIONS1 0x100000fd |
860 | #define PSICONV_ID_PAGE_DIMENSIONS1 0x100000fd |
475 | #define PSICONV_ID_PAGE_DIMENSIONS2 0x1000010e |
861 | #define PSICONV_ID_PAGE_DIMENSIONS2 0x1000010e |
476 | #define PSICONV_ID_TEXTED_BODY 0x1000005c |
862 | #define PSICONV_ID_TEXTED_BODY 0x1000005c |
… | |
… | |
479 | #define PSICONV_ID_TEXTED_LAYOUT 0x10000066 |
865 | #define PSICONV_ID_TEXTED_LAYOUT 0x10000066 |
480 | #define PSICONV_ID_TEXTED_TEXT 0x10000064 |
866 | #define PSICONV_ID_TEXTED_TEXT 0x10000064 |
481 | #define PSICONV_ID_STYLE_REMOVABLE 0x1000004F |
867 | #define PSICONV_ID_STYLE_REMOVABLE 0x1000004F |
482 | #define PSICONV_ID_STYLE_BUILT_IN 0x1000004C |
868 | #define PSICONV_ID_STYLE_BUILT_IN 0x1000004C |
483 | #define PSICONV_ID_CLIPART_ITEM 0x10000040 |
869 | #define PSICONV_ID_CLIPART_ITEM 0x10000040 |
|
|
870 | #define PSICONV_ID_OBJECT 0x10000051 |
|
|
871 | #define PSICONV_ID_OBJECT_DISPLAY_SECTION 0x10000146 |
|
|
872 | #define PSICONV_ID_OBJECT_ICON_SECTION 0x1000012A |
|
|
873 | #define PSICONV_ID_OBJECT_SECTION_TABLE_SECTION 0x10000144 |
484 | |
874 | |
485 | |
875 | |
486 | /* Return a clean layout_status. You can modify it at will. Returns NULL |
876 | /* Return a clean layout_status. You can modify it at will. Returns NULL |
487 | if there is not enough memory. */ |
877 | if there is not enough memory. */ |
488 | extern psiconv_character_layout psiconv_basic_character_layout(void); |
878 | extern psiconv_character_layout psiconv_basic_character_layout(void); |
… | |
… | |
499 | extern psiconv_character_layout psiconv_clone_character_layout |
889 | extern psiconv_character_layout psiconv_clone_character_layout |
500 | (psiconv_character_layout ls); |
890 | (psiconv_character_layout ls); |
501 | |
891 | |
502 | /* Get a numbered style. Returns NULL if the style is unknown. */ |
892 | /* Get a numbered style. Returns NULL if the style is unknown. */ |
503 | extern psiconv_word_style psiconv_get_style (psiconv_word_styles_section ss, int nr); |
893 | extern psiconv_word_style psiconv_get_style (psiconv_word_styles_section ss, int nr); |
|
|
894 | /* Get a numbered formula. Returns NULL if the style is unknown. */ |
|
|
895 | extern psiconv_formula psiconv_get_formula (psiconv_formula_list ss, int nr); |
|
|
896 | |
|
|
897 | /* Return the default layout */ |
|
|
898 | extern psiconv_sheet_cell_layout psiconv_get_default_layout |
|
|
899 | (psiconv_sheet_line_list row_defaults, |
|
|
900 | psiconv_sheet_line_list col_defaults, |
|
|
901 | psiconv_sheet_cell_layout cell_default, |
|
|
902 | int row,int col); |
504 | |
903 | |
505 | extern void psiconv_free_color(psiconv_color color); |
904 | extern void psiconv_free_color(psiconv_color color); |
506 | extern void psiconv_free_border(psiconv_border border); |
905 | extern void psiconv_free_border(psiconv_border border); |
507 | extern void psiconv_free_bullet(psiconv_bullet bullet); |
906 | extern void psiconv_free_bullet(psiconv_bullet bullet); |
508 | extern void psiconv_free_font(psiconv_font font); |
907 | extern void psiconv_free_font(psiconv_font font); |
… | |
… | |
511 | extern void psiconv_free_paragraph_layout(psiconv_paragraph_layout layout); |
910 | extern void psiconv_free_paragraph_layout(psiconv_paragraph_layout layout); |
512 | extern void psiconv_free_character_layout(psiconv_character_layout layout); |
911 | extern void psiconv_free_character_layout(psiconv_character_layout layout); |
513 | extern void psiconv_free_word_style(psiconv_word_style style); |
912 | extern void psiconv_free_word_style(psiconv_word_style style); |
514 | extern void psiconv_free_word_styles_section |
913 | extern void psiconv_free_word_styles_section |
515 | (psiconv_word_styles_section styles); |
914 | (psiconv_word_styles_section styles); |
516 | extern void psiconv_free_sheet_formula(psiconv_sheet_formula formula); |
915 | extern void psiconv_free_formula(psiconv_formula formula); |
517 | extern void psiconv_free_sheet_formula_list(psiconv_sheet_formula_list list); |
916 | extern void psiconv_free_formula_list(psiconv_formula_list list); |
518 | extern void psiconv_free_sheet_status_section |
917 | extern void psiconv_free_sheet_status_section |
519 | (psiconv_sheet_status_section section); |
918 | (psiconv_sheet_status_section section); |
|
|
919 | extern void psiconv_free_sheet_cell_layout(psiconv_sheet_cell_layout layout); |
|
|
920 | extern void psiconv_free_sheet_grid_break_list |
|
|
921 | (psiconv_sheet_grid_break_list list); |
|
|
922 | extern void psiconv_free_sheet_grid_size(psiconv_sheet_grid_size s); |
|
|
923 | extern void psiconv_free_sheet_grid_size_list |
|
|
924 | (psiconv_sheet_grid_size_list list); |
|
|
925 | extern void psiconv_free_sheet_grid_section(psiconv_sheet_grid_section sec); |
|
|
926 | extern void psiconv_free_sheet_worksheet(psiconv_sheet_worksheet sheet); |
|
|
927 | extern void psiconv_free_sheet_worksheet_list |
|
|
928 | (psiconv_sheet_worksheet_list list); |
|
|
929 | |
520 | extern void psiconv_free_sheet_f(psiconv_sheet_f file); |
930 | extern void psiconv_free_sheet_f(psiconv_sheet_f file); |
|
|
931 | extern void psiconv_free_sheet_cell(psiconv_sheet_cell cell); |
|
|
932 | extern void psiconv_free_sheet_cell_list(psiconv_sheet_cell_list list); |
|
|
933 | extern void psiconv_free_sheet_numberformat |
|
|
934 | (psiconv_sheet_numberformat numberformat); |
|
|
935 | extern void psiconv_free_sheet_line_list(psiconv_sheet_line_list list); |
|
|
936 | extern void psiconv_free_sheet_line(psiconv_sheet_line line); |
|
|
937 | extern void psiconv_free_sheet_name_section(psiconv_sheet_name_section section); |
|
|
938 | extern void psiconv_free_sheet_variable(psiconv_sheet_variable list); |
|
|
939 | extern void psiconv_free_sheet_variable_list(psiconv_sheet_variable_list list); |
|
|
940 | extern void psiconv_free_sheet_info_section(psiconv_sheet_info_section section); |
521 | extern void psiconv_free_header_section(psiconv_header_section header); |
941 | extern void psiconv_free_header_section(psiconv_header_section header); |
522 | extern void psiconv_free_section_table_entry(psiconv_section_table_entry entry); |
942 | extern void psiconv_free_section_table_entry(psiconv_section_table_entry entry); |
523 | extern void psiconv_free_section_table_section |
943 | extern void psiconv_free_section_table_section |
524 | (psiconv_section_table_section section); |
944 | (psiconv_section_table_section section); |
525 | extern void psiconv_free_application_id_section |
945 | extern void psiconv_free_application_id_section |
526 | (psiconv_application_id_section section); |
946 | (psiconv_application_id_section section); |
|
|
947 | extern void psiconv_free_object_display_section |
|
|
948 | (psiconv_object_display_section section); |
|
|
949 | extern void psiconv_free_object_icon_section |
|
|
950 | (psiconv_object_icon_section section); |
|
|
951 | extern void psiconv_free_object(psiconv_object object); |
527 | extern void psiconv_free_in_line_layout(psiconv_in_line_layout layout); |
952 | extern void psiconv_free_in_line_layout(psiconv_in_line_layout layout); |
528 | extern void psiconv_free_in_line_layouts(psiconv_in_line_layouts layouts); |
953 | extern void psiconv_free_in_line_layouts(psiconv_in_line_layouts layouts); |
529 | extern void psiconv_free_replacement(psiconv_replacement replacement); |
954 | extern void psiconv_free_replacement(psiconv_replacement replacement); |
530 | extern void psiconv_free_replacements(psiconv_replacements replacements); |
955 | extern void psiconv_free_replacements(psiconv_replacements replacements); |
531 | extern void psiconv_free_paragraph(psiconv_paragraph paragraph); |
956 | extern void psiconv_free_paragraph(psiconv_paragraph paragraph); |