desktop/source/lib/init.cxx | 21 ++++++--------------- sal/android/libreofficekit-jni.c | 8 +++----- 2 files changed, 9 insertions(+), 20 deletions(-)
New commits: commit 668b03284c4b0df56d5a000cc38dd1144ec33bbe Author: Jan Holesovsky <ke...@collabora.com> AuthorDate: Wed Nov 20 17:55:43 2019 +0100 Commit: Jan Holesovsky <ke...@collabora.com> CommitDate: Mon Dec 2 11:13:54 2019 +0100 android: Get rid of the 'old' vs. Online-based runtime distinction. No need for this when we have a compile-time distinction now anyway. Change-Id: Ic86c8cce38a86635ea3efb4229c08f63059c9ee6 Reviewed-on: https://gerrit.libreoffice.org/83719 Reviewed-by: Jan Holesovsky <ke...@collabora.com> Tested-by: Jenkins diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 8f05cc487672..7fb08f0bec15 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -7,6 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include <config_features.h> #include <config_folders.h> #include <stdio.h> @@ -2712,13 +2713,6 @@ static void doc_setPartMode(LibreOfficeKitDocument* pThis, } } -#if defined(ANDROID) -/// For the distinction if the LOK is used for the 'old' (JNI-based) or the -/// 'new' (loolwsd-based) app. Default to the 'new', ie. not used from JNI as -/// implemented in sal/android/libreofficekit-jni.c. -bool android_lok_from_jni = false; -#endif - static void doc_paintTile(LibreOfficeKitDocument* pThis, unsigned char* pBuffer, const int nCanvasWidth, const int nCanvasHeight, @@ -2756,15 +2750,12 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, #else ScopedVclPtrInstance< VirtualDevice > pDevice(DeviceFormat::DEFAULT); -#if defined(ANDROID) - if (!android_lok_from_jni) +#if HAVE_FEATURE_ANDROID_LOK + // Set background to transparent by default. + // [Unless it is the 'old' (JNI-based) Android app - no idea why it + // needs avoiding this.] + pDevice->SetBackground(Wallpaper(COL_TRANSPARENT)); #endif - { - // Set background to transparent by default. - // [Unless it is the 'old' (JNI-based) Android app - no idea why it - // needs avoiding this.] - pDevice->SetBackground(Wallpaper(COL_TRANSPARENT)); - } pDevice->SetOutputSizePixelScaleOffsetAndBuffer( Size(nCanvasWidth, nCanvasHeight), Fraction(1.0), Point(), diff --git a/sal/android/libreofficekit-jni.c b/sal/android/libreofficekit-jni.c index e4d7f4828a54..08827df54f07 100644 --- a/sal/android/libreofficekit-jni.c +++ b/sal/android/libreofficekit-jni.c @@ -37,7 +37,6 @@ extern const char* data_dir; extern const char* cache_dir; extern void* apk_file; extern int apk_file_size; -extern bool android_lok_from_jni; ///< for the distinction if the LOK is used for the 'old' (JNI-based) or the 'new' (loolwsd-based) app AAssetManager* native_asset_manager; extern void Java_org_libreoffice_android_Bootstrap_putenv(JNIEnv* env, jobject clazz, jstring string); @@ -164,10 +163,6 @@ jboolean Java_org_libreoffice_kit_LibreOfficeKit_initializeNative (void) clazz; - // the 'old' app needs to avoid setting the virtual device to transparent - // in paintTile(), so indicate we are using the 'old' app - android_lok_from_jni = true; - libreofficekit_initialize(env, dataDir, cacheDir, apkFile, assetManager); // LibreOfficeKit expects a path to the program/ directory commit b648e36c775e8707e7f6a49b264951916cf4092d Author: Jan Holesovsky <ke...@collabora.com> AuthorDate: Wed Nov 27 15:28:59 2019 +0100 Commit: Jan Holesovsky <ke...@collabora.com> CommitDate: Mon Dec 2 11:13:38 2019 +0100 android: Hint how to enable fontconfig logging. Change-Id: I8901780fa29c6d27bb53e44b07d95259b5bd02df Reviewed-on: https://gerrit.libreoffice.org/83920 Reviewed-by: Jan Holesovsky <ke...@collabora.com> Tested-by: Jan Holesovsky <ke...@collabora.com> (cherry picked from commit f3af7708e3535d3171832aa2308d1e7f6193def4) Reviewed-on: https://gerrit.libreoffice.org/84189 Tested-by: Jenkins diff --git a/sal/android/libreofficekit-jni.c b/sal/android/libreofficekit-jni.c index 1307ab6a5fbb..e4d7f4828a54 100644 --- a/sal/android/libreofficekit-jni.c +++ b/sal/android/libreofficekit-jni.c @@ -104,6 +104,9 @@ jboolean libreofficekit_initialize(JNIEnv* env, close(fd); LOGI("Setting FONTCONFIG_FILE to %s", fontsConfPath); setenv("FONTCONFIG_FILE", fontsConfPath, 1); + // DEBUG: + //setenv("FC_DEBUG", "8191", 1); // log everything + //Java_org_libreoffice_android_Bootstrap_redirect_1stdio(NULL, NULL, JNI_TRUE); } free(fontsConfPath); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits