@@ -106,7 +106,7 @@ Java_at_tomtasche_reader_background_CoreWrapper_parseNative(JNIEnv *env, jclass
106106 try {
107107 odr::FileType fileType;
108108 try {
109- const auto types = odr::types (inputPathCpp);
109+ const auto types = odr::list_file_types (inputPathCpp);
110110 if (types.empty ()) {
111111 env->SetIntField (result, errorField, -5 );
112112 return result;
@@ -117,7 +117,7 @@ Java_at_tomtasche_reader_background_CoreWrapper_parseNative(JNIEnv *env, jclass
117117 fileType = e.file_type ;
118118 }
119119
120- std::string extensionCpp = odr::type_to_string (fileType);
120+ std::string extensionCpp = odr::file_type_to_string (fileType);
121121 jstring extension = env->NewStringUTF (extensionCpp.c_str ());
122122 jfieldID extensionField = env->GetFieldID (resultClass, " extension" ,
123123 " Ljava/lang/String;" );
@@ -142,10 +142,10 @@ Java_at_tomtasche_reader_background_CoreWrapper_parseNative(JNIEnv *env, jclass
142142
143143 if (file.is_document_file ()) {
144144 // TODO this will cause a second load
145- s_document = file.document_file ().document ();
145+ s_document = file.as_document_file ().document ();
146146 }
147147
148- extensionCpp = odr::type_to_string (file.file_type ());
148+ extensionCpp = odr::file_type_to_string (file.file_type ());
149149 extension = env->NewStringUTF (extensionCpp.c_str ());
150150 env->SetObjectField (result, extensionField, extension);
151151
@@ -216,7 +216,7 @@ Java_at_tomtasche_reader_background_CoreWrapper_backtranslateNative(JNIEnv *env,
216216 jboolean isCopy;
217217 const auto htmlDiffC = env->GetStringUTFChars (htmlDiff, &isCopy);
218218
219- const auto extension = odr::type_to_string (s_document->file_type ());
219+ const auto extension = odr::file_type_to_string (s_document->file_type ());
220220 const auto outputPathCpp = outputPathPrefixCpp + " ." + extension;
221221 const char *outputPathC = outputPathCpp.c_str ();
222222 jstring outputPath = env->NewStringUTF (outputPathC);
@@ -337,7 +337,7 @@ Java_at_tomtasche_reader_background_CoreWrapper_hostFile(JNIEnv *env, jclass cla
337337
338338 if (file.is_document_file ()) {
339339 // TODO this will cause a second load
340- s_document = file.document_file ().document ();
340+ s_document = file.as_document_file ().document ();
341341 }
342342
343343 odr::HtmlConfig htmlConfig;
@@ -353,10 +353,10 @@ Java_at_tomtasche_reader_background_CoreWrapper_hostFile(JNIEnv *env, jclass cla
353353 for (const auto &view: htmlViews) {
354354 __android_log_print (ANDROID_LOG_INFO, " smn" , " view name=%s path=%s" , view.name ().c_str (), view.path ().c_str ());
355355 if (file.is_document_file () && (
356- (((file.document_file ().document_type () == odr::DocumentType::presentation) ||
357- (file.document_file ().document_type () == odr::DocumentType::drawing)) &&
356+ (((file.as_document_file ().document_type () == odr::DocumentType::presentation) ||
357+ (file.as_document_file ().document_type () == odr::DocumentType::drawing)) &&
358358 (view.name () != " document" )) ||
359- ((file.document_file ().document_type () == odr::DocumentType::spreadsheet) &&
359+ ((file.as_document_file ().document_type () == odr::DocumentType::spreadsheet) &&
360360 (view.name () == " document" )))) {
361361 continue ;
362362 }
0 commit comments