1010
1111#import " CoreWrapper.h"
1212
13- #include " TranslationHelper .h"
13+ #include " OpenDocumentReader .h"
1414#include " TranslationConfig.h"
1515#include " FileMeta.h"
1616
1717@implementation CoreWrapper {
18- odr::TranslationHelper translator;
18+ odr::OpenDocumentReader translator;
1919 bool initialized;
2020}
2121
@@ -25,15 +25,15 @@ - (bool)translate:(NSString *)inputPath into:(NSString *)outputPath at:(NSNumber
2525 _errorCode = 0 ;
2626
2727 if (!initialized) {
28- bool opened = translator.openOpenDocument ([inputPath cStringUsingEncoding: NSUTF8StringEncoding]);
28+ bool opened = translator.open ([inputPath cStringUsingEncoding: NSUTF8StringEncoding]);
2929 if (!opened) {
3030 _errorCode = @(-1 );
3131 return false ;
3232 }
3333
3434 const auto meta = translator.getMeta ();
3535
36- bool decrypted = !meta-> encrypted ;
36+ bool decrypted = !meta. encrypted ;
3737 if (password != nil ) {
3838 decrypted = translator.decrypt ([password cStringUsingEncoding: NSUTF8StringEncoding]);
3939 }
@@ -44,10 +44,10 @@ - (bool)translate:(NSString *)inputPath into:(NSString *)outputPath at:(NSNumber
4444 }
4545
4646 NSMutableArray *pageNames = [[NSMutableArray alloc ] init ];
47- if (meta-> type == odr::FileType::OPENDOCUMENT_TEXT) {
47+ if (meta. type == odr::FileType::OPENDOCUMENT_TEXT) {
4848 [pageNames addObject: @" Text document" ];
4949 } else {
50- for (auto page = meta-> entries .begin (); page != meta-> entries .end (); page++) {
50+ for (auto page = meta. entries .begin (); page != meta. entries .end (); page++) {
5151 auto pageName = page->name ;
5252
5353 [pageNames addObject: [NSString stringWithCString: pageName.c_str () encoding: [NSString defaultCStringEncoding ]]];
0 commit comments