summaryrefslogtreecommitdiff
path: root/vcl/headless/svpvd.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-04-04 09:38:47 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-04-04 12:12:12 +0200
commitcb7ff6bc57b542a27f6bdcfcaacc2cdf66cdb456 (patch)
treea72127f386b460c481243c8e40f7bce955b7b112 /vcl/headless/svpvd.cxx
parent7aa14e80d2d9d94ba468b83db32fc1049d1d8b65 (diff)
Resolves: tdf#124219 check at runtime for availability of cairo functions
Change-Id: I0ab3055760d8be690bdfff560212db368a0fa261 Reviewed-on: https://gerrit.libreoffice.org/70240 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/headless/svpvd.cxx')
-rw-r--r--vcl/headless/svpvd.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/vcl/headless/svpvd.cxx b/vcl/headless/svpvd.cxx
index 875f22a5d7fc..eeccf2c014a9 100644
--- a/vcl/headless/svpvd.cxx
+++ b/vcl/headless/svpvd.cxx
@@ -89,7 +89,6 @@ bool SvpSalVirtualDevice::SetSizeUsingBuffer( long nNewDX, long nNewDY,
}
else if (pBuffer)
{
-#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0)
double fXScale, fYScale;
if (comphelper::LibreOfficeKit::isActive())
{
@@ -98,18 +97,15 @@ bool SvpSalVirtualDevice::SetSizeUsingBuffer( long nNewDX, long nNewDY,
}
else
{
- cairo_surface_get_device_scale(m_pRefSurface, &fXScale, &fYScale);
+ dl_cairo_surface_get_device_scale(m_pRefSurface, &fXScale, &fYScale);
nNewDX *= fXScale;
nNewDY *= fYScale;
}
-#endif
m_pSurface = cairo_image_surface_create_for_data(pBuffer, CAIRO_FORMAT_ARGB32,
nNewDX, nNewDY, cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, nNewDX));
-#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0)
- cairo_surface_set_device_scale(m_pSurface, fXScale, fYScale);
-#endif
+ dl_cairo_surface_set_device_scale(m_pSurface, fXScale, fYScale);
}
else
{