diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-12-04 17:37:17 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-12-04 19:48:12 +0100 |
commit | 75af93817243dbc24dafc2a4829dfbb4abfe6803 (patch) | |
tree | 8c77090337e062fef0667acf1a836a9c840983c0 /desktop/source | |
parent | 23c987dc4e4ccdd2f031b7cb0eb915b7abcdacc3 (diff) |
desktop: fix Android -Werror,-Wunreachable-code
error: code will never be executed [-Werror,-Wunreachable-code]
In the 'old' (JNI-based) Android app case. If clang doesn't like 'if
(false)', then invert the #if condition so we don't need it.
Change-Id: I79818a51cb284519313738ab4272d109171dfcd0
Reviewed-on: https://gerrit.libreoffice.org/84431
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/lib/init.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 042e4adea546..b527f2cdeb92 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2752,13 +2752,12 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, #else ScopedVclPtrInstance< VirtualDevice > pDevice(DeviceFormat::DEFAULT); -#if defined(ANDROID) && !HAVE_FEATURE_ANDROID_LOK +#if !defined(ANDROID) || HAVE_FEATURE_ANDROID_LOK // Don't set the transparent background in the 'old' (JNI-based) Android // app - no idea why it needs avoiding this. - if (false) -#endif // Set background to transparent by default. pDevice->SetBackground(Wallpaper(COL_TRANSPARENT)); +#endif pDevice->SetOutputSizePixelScaleOffsetAndBuffer( Size(nCanvasWidth, nCanvasHeight), Fraction(1.0), Point(), |