summaryrefslogtreecommitdiff
path: root/vcl/headless
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-01-11 09:22:40 +0000
committerCaolán McNamara <caolanm@redhat.com>2023-01-12 11:33:24 +0000
commit4557bd79fe323af6b192e40ba6a035fe06d6adcf (patch)
treed8a7d00c25c8c87a267e4aade050adbcf5b2f42a /vcl/headless
parent4160be791daaef1a0c059a248f678cbad6408a69 (diff)
merge duplicate CairoTextRender impls
drop getSurfaceOffset because both impls just set these to 0, so its a no opt Change-Id: Ie4f28d57fb8a170c7a46d3cafceef3e049c26e2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145325 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/headless')
-rw-r--r--vcl/headless/svpcairotextrender.cxx34
-rw-r--r--vcl/headless/svpgdi.cxx2
2 files changed, 1 insertions, 35 deletions
diff --git a/vcl/headless/svpcairotextrender.cxx b/vcl/headless/svpcairotextrender.cxx
deleted file mode 100644
index c64bafae0969..000000000000
--- a/vcl/headless/svpcairotextrender.cxx
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#include <headless/svpcairotextrender.hxx>
-#include <headless/svpgdi.hxx>
-#include <cairo.h>
-
-SvpCairoTextRender::SvpCairoTextRender(SvpSalGraphics& rParent)
- : mrParent(rParent)
-{
-}
-
-cairo_t* SvpCairoTextRender::getCairoContext() { return mrParent.getCairoContext(); }
-
-void SvpCairoTextRender::getSurfaceOffset(double& nDX, double& nDY)
-{
- nDX = 0;
- nDY = 0;
-}
-
-void SvpCairoTextRender::clipRegion(cairo_t* cr) { mrParent.clipRegion(cr); }
-
-void SvpCairoTextRender::releaseCairoContext(cairo_t* cr)
-{
- mrParent.releaseCairoContext(cr, basegfx::B2DRange());
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index a7ce0e3c769e..c9edd7e9a19c 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -26,7 +26,7 @@
#include <comphelper/lok.hxx>
SvpSalGraphics::SvpSalGraphics()
- : m_aTextRenderImpl(*this)
+ : m_aTextRenderImpl(m_aCairoCommon)
, m_pBackend(new SvpGraphicsBackend(m_aCairoCommon))
{
bool bLOKActive = comphelper::LibreOfficeKit::isActive();