Skip to content

Commit 5b36c67

Browse files
committed
bump core; fix decryption; fix pages
1 parent ac5eb0c commit 5b36c67

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

OpenDocumentReader/CoreWrapper.mm

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include <odr/document_element.hpp>
1515
#include <odr/file.hpp>
1616
#include <odr/html.hpp>
17-
#include <odr/html_service.hpp>
1817
#include <odr/odr.hpp>
1918
#include <odr/exceptions.hpp>
2019
#include <odr/global_params.hpp>
@@ -94,9 +93,21 @@ - (bool)translate:(NSString *)inputPath cache:(NSString *)cachePath into:(NSStri
9493

9594
NSMutableArray *pageNames = [[NSMutableArray alloc] init];
9695
NSMutableArray *pagePaths = [[NSMutableArray alloc] init];
97-
for (auto &&page : html->pages()) {
96+
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+
101+
if (file.is_document_file() && (
102+
(((file.document_file().document_type() == odr::DocumentType::presentation) ||
103+
(file.document_file().document_type() == odr::DocumentType::drawing)) &&
104+
(page.name != "document")) ||
105+
((file.document_file().document_type() == odr::DocumentType::spreadsheet) &&
106+
(page.name == "document")))) {
107+
continue;
108+
}
109+
98110
[pageNames addObject:[NSString stringWithCString:page.name.c_str() encoding:[NSString defaultCStringEncoding]]];
99-
100111
[pagePaths addObject:[NSString stringWithCString:page.path.c_str() encoding:[NSString defaultCStringEncoding]]];
101112
}
102113

conan/conanfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Pkg(ConanFile):
1010
"odrcore/*:with_pdf2htmlEX": False,
1111
"odrcore/*:with_wvWare": False,
1212
}
13-
requires = "odrcore/5.0.0-pre12"
13+
requires = "odrcore/5.0.0-pre14"
1414

1515
def generate(self):
1616
xcode = XcodeDeps(self)

0 commit comments

Comments
 (0)