summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2019-12-20 15:27:50 +0100
committerJan Holesovsky <kendy@collabora.com>2019-12-20 16:03:50 +0100
commita0b5a544686b57aff17dedd5e08ab05bc16d0fce (patch)
tree215f98c0ce657d75a9d36d695b33e15e543a69db
parentcc20571fcde14814d6b41582f111042c66435a2d (diff)
android: Make the Calc input bar working on the Android device too.
Thanks to Marco Ceccheti! - he's found what was wrong there. Change-Id: I45500f7f55ced60965a42ad6cb8032481594b409 Reviewed-on: https://gerrit.libreoffice.org/85612 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r--vcl/headless/svpgdi.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 73d610d59ebf..8baf93d67693 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -2265,14 +2265,21 @@ GlyphCache& SvpSalGraphics::getPlatformGlyphCache()
void dl_cairo_surface_set_device_scale(cairo_surface_t *surface, double x_scale, double y_scale)
{
+#ifdef ANDROID
+ cairo_surface_set_device_scale(surface, x_scale, y_scale);
+#else
static auto func = reinterpret_cast<void(*)(cairo_surface_t*, double, double)>(
dlsym(nullptr, "cairo_surface_set_device_scale"));
if (func)
func(surface, x_scale, y_scale);
+#endif
}
void dl_cairo_surface_get_device_scale(cairo_surface_t *surface, double* x_scale, double* y_scale)
{
+#ifdef ANDROID
+ cairo_surface_get_device_scale(surface, x_scale, y_scale);
+#else
static auto func = reinterpret_cast<void(*)(cairo_surface_t*, double*, double*)>(
dlsym(nullptr, "cairo_surface_get_device_scale"));
if (func)
@@ -2284,6 +2291,7 @@ void dl_cairo_surface_get_device_scale(cairo_surface_t *surface, double* x_scale
if (y_scale)
*y_scale = 1.0;
}
+#endif
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */