Skip to content

Commit 748f6f5

Browse files
authored
Merge branch 'main' into replace-magic
2 parents cb1f723 + 774494a commit 748f6f5

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools"
44
android:installLocation="auto"
5-
android:versionCode="195"
6-
android:versionName="3.40"
5+
android:versionCode="196"
6+
android:versionName="4.0"
77
tools:ignore="GoogleAppIndexingWarning">
88

99
<uses-permission android:name="android.permission.INTERNET" />

app/src/main/cpp/core_wrapper.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,8 @@ Java_at_tomtasche_reader_background_CoreWrapper_parseNative(JNIEnv *env, jclass
198198
}
199199
}
200200

201-
if (file.is_document_file()) {
201+
// .doc-files are not real documents in core
202+
if (file.is_document_file() && fileType != odr::FileType::legacy_word_document) {
202203
// TODO this will cause a second load
203204
s_document = file.as_document_file().document();
204205
}
@@ -412,7 +413,11 @@ Java_at_tomtasche_reader_background_CoreWrapper_hostFileNative(JNIEnv *env, jcla
412413
}
413414
}
414415

415-
if (file.is_document_file()) {
416+
__android_log_print(ANDROID_LOG_INFO, "smn", "type=%s",
417+
file_type_to_string(file.file_type()).c_str());
418+
419+
// .doc-files are not real documents in core
420+
if (file.is_document_file() && file.file_type() != odr::FileType::legacy_word_document) {
416421
// TODO this will cause a second load
417422
s_document = file.as_document_file().document();
418423
}

app/src/main/java/at/tomtasche/reader/background/CoreLoader.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public boolean isSupported(Options options) {
6060
return options.fileType.startsWith("application/vnd.oasis.opendocument") ||
6161
options.fileType.startsWith("application/x-vnd.oasis.opendocument") ||
6262
options.fileType.startsWith("application/vnd.oasis.opendocument.text-master") ||
63+
options.fileType.startsWith("application/msword") ||
6364
(this.doOoxml && (
6465
options.fileType.startsWith("application/vnd.openxmlformats-officedocument.wordprocessingml.document")
6566
// TODO: enable xlsx and pptx too

0 commit comments

Comments
 (0)