@@ -53,7 +53,7 @@ - (bool)translate:(NSString *)inputPath cache:(NSString *)cachePath into:(NSStri
5353
5454 std::vector<odr::FileType> fileTypes;
5555 try {
56- fileTypes = odr::types (inputPathCpp);
56+ fileTypes = odr::list_file_types (inputPathCpp);
5757 if (fileTypes.empty ()) {
5858 _errorCode = @(-5 );
5959 return false ;
@@ -87,22 +87,18 @@ - (bool)translate:(NSString *)inputPath cache:(NSString *)cachePath into:(NSStri
8787 _errorCode = @(-5 );
8888 return false ;
8989 }
90- document = file.document_file ().document ();
90+ document = file.as_document_file ().document ();
9191
9292 html = odr::html::translate (*document, cachePathCpp, config).bring_offline (outputPathCpp);
9393
9494 NSMutableArray *pageNames = [[NSMutableArray alloc ] init ];
9595 NSMutableArray *pagePaths = [[NSMutableArray alloc ] init ];
9696 for (const auto &page : html->pages ()) {
97- std::cout << " !!!!!!!!!!! " << (int )file.document_file ().document_type () << std::endl;
98- std::cout << " !!!!!!!!!!! " << (int )document->document_type () << std::endl;
99- std::cout << " !!!!!!!!!!! " << page.name << std::endl;
100-
10197 if (file.is_document_file () && (
102- (((file.document_file ().document_type () == odr::DocumentType::presentation) ||
103- (file.document_file ().document_type () == odr::DocumentType::drawing)) &&
98+ (((file.as_document_file ().document_type () == odr::DocumentType::presentation) ||
99+ (file.as_document_file ().document_type () == odr::DocumentType::drawing)) &&
104100 (page.name != " document" )) ||
105- ((file.document_file ().document_type () == odr::DocumentType::spreadsheet) &&
101+ ((file.as_document_file ().document_type () == odr::DocumentType::spreadsheet) &&
106102 (page.name == " document" )))) {
107103 continue ;
108104 }
0 commit comments