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

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

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

Revision 94 Revision 95
684 char *temp_str; 684 char *temp_str;
685 psiconv_u32 pwd_sec = 0; 685 psiconv_u32 pwd_sec = 0;
686 psiconv_u32 status_sec = 0; 686 psiconv_u32 status_sec = 0;
687 psiconv_u32 page_sec = 0; 687 psiconv_u32 page_sec = 0;
688 psiconv_u32 applid_sec = 0; 688 psiconv_u32 applid_sec = 0;
689 psiconv_u32 workbook_sec = 0;
689 psiconv_section_table_entry entry; 690 psiconv_section_table_entry entry;
690 psiconv_u32 sto; 691 psiconv_u32 sto;
691 int i; 692 int i;
692 693
693 psiconv_progress(lev+1,off,"Going to read a sheet file"); 694 psiconv_progress(lev+1,off,"Going to read a sheet file");
724 "Found the Password section at %08x",pwd_sec); 725 "Found the Password section at %08x",pwd_sec);
725 psiconv_warn(lev+3,sto, 726 psiconv_warn(lev+3,sto,
726 "Password section found - can't read encrypted data"); 727 "Password section found - can't read encrypted data");
727 res = -PSICONV_E_PARSE; 728 res = -PSICONV_E_PARSE;
728 goto ERROR3; 729 goto ERROR3;
730 } else if (entry->id == PSICONV_ID_SHEET_WORKBOOK_SECTION) {
731 workbook_sec = entry->offset;
732 psiconv_debug(lev+3,sto,
733 "Found the Sheet Workbook section at %08x",workbook_sec);
729 } else if (entry->id == PSICONV_ID_SHEET_STATUS_SECTION) { 734 } else if (entry->id == PSICONV_ID_SHEET_STATUS_SECTION) {
730 status_sec = entry->offset; 735 status_sec = entry->offset;
731 psiconv_debug(lev+3,sto, 736 psiconv_debug(lev+3,sto,
732 "Found the Sheet Status section at %08x",status_sec); 737 "Found the Sheet Status section at %08x",status_sec);
733 } else { 738 } else {
772 psiconv_debug(lev+2,applid_sec,"ID: %08x expected, %08x found", 777 psiconv_debug(lev+2,applid_sec,"ID: %08x expected, %08x found",
773 PSICONV_ID_SHEET,appl_id->id); 778 PSICONV_ID_SHEET,appl_id->id);
774 if (!(temp_str = psiconv_make_printable(appl_id->name))) 779 if (!(temp_str = psiconv_make_printable(appl_id->name)))
775 goto ERROR5; 780 goto ERROR5;
776 psiconv_debug(lev+2,applid_sec,"Name: `%s' expected, `%s' found", 781 psiconv_debug(lev+2,applid_sec,"Name: `%s' expected, `%s' found",
777 "Word.app",temp_str); 782 "Sheet.app",temp_str);
778 free(temp_str); 783 free(temp_str);
779 res = -PSICONV_E_PARSE; 784 res = -PSICONV_E_PARSE;
780 goto ERROR5; 785 goto ERROR5;
781 } 786 }
782 787
793 if ((res = psiconv_parse_page_layout_section(buf,lev+2,page_sec,NULL, 798 if ((res = psiconv_parse_page_layout_section(buf,lev+2,page_sec,NULL,
794 &(*result)->page_sec))) 799 &(*result)->page_sec)))
795 goto ERROR5; 800 goto ERROR5;
796 } 801 }
797 802
803 psiconv_progress(lev+2,sto,
804 "Looking for the Sheet Workbook section");
805 if (! workbook_sec) {
806 psiconv_warn(lev+2,sto,
807 "Sheet workbook section not found in the section table");
808 res = -PSICONV_E_PARSE;
809 goto ERROR6;
810 } else {
811 psiconv_debug(lev+2,sto,
812 "Sheet workbook section at offset %08x",page_sec);
813 if ((res = psiconv_parse_sheet_workbook_section(buf,lev+2,workbook_sec,NULL,
814 &(*result)->workbook_sec)))
815 goto ERROR6;
816 }
817
798 psiconv_free_application_id_section(appl_id); 818 psiconv_free_application_id_section(appl_id);
799 psiconv_free_section_table_section(table); 819 psiconv_free_section_table_section(table);
800 820
801 psiconv_progress(lev+1,off,"End of Sheet file"); 821 psiconv_progress(lev+1,off,"End of Sheet file");
802 return 0; 822 return 0;
803 823
804 824ERROR6:
825 psiconv_free_page_layout_section((*result)->page_sec);
805ERROR5: 826ERROR5:
806 psiconv_free_application_id_section(appl_id); 827 psiconv_free_application_id_section(appl_id);
807ERROR4: 828ERROR4:
808 psiconv_free_sheet_status_section((*result)->status_sec); 829 psiconv_free_sheet_status_section((*result)->status_sec);
809ERROR3: 830ERROR3:

Legend:
Removed from v.94  
changed lines
  Added in v.95

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