Coverage Report

Created: 2026-04-09 11:41

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/vcl/inc/unx/genpspgraphics.h
Line
Count
Source
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
 * This file is part of the LibreOffice project.
4
 *
5
 * This Source Code Form is subject to the terms of the Mozilla Public
6
 * License, v. 2.0. If a copy of the MPL was not distributed with this
7
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
 *
9
 * This file incorporates work covered by the following license notice:
10
 *
11
 *   Licensed to the Apache Software Foundation (ASF) under one or more
12
 *   contributor license agreements. See the NOTICE file distributed
13
 *   with this work for additional information regarding copyright
14
 *   ownership. The ASF licenses this file to you under the Apache
15
 *   License, Version 2.0 (the "License"); you may not use this file
16
 *   except in compliance with the License. You may obtain a copy of
17
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
18
 */
19
20
#pragma once
21
22
#include <sal/config.h>
23
24
#include <config_cairo_canvas.h>
25
26
#include <salgdi.hxx>
27
#include <sallayout.hxx>
28
29
#include <unx/cairotextrender.hxx>
30
31
#include <headless/SvpGraphicsBackend.hxx>
32
#include <headless/CairoCommon.hxx>
33
34
namespace psp { struct JobData; }
35
36
class VCL_DLLPUBLIC GenPspGraphics final : public SalGraphicsAutoDelegateToImpl
37
{
38
39
    psp::JobData*           m_pJobData;
40
41
    CairoCommon             m_aCairoCommon;
42
    CairoTextRender         m_aTextRenderImpl;
43
    std::unique_ptr<SvpGraphicsBackend> m_pBackend;
44
45
public:
46
                            GenPspGraphics();
47
    SAL_DLLPRIVATE virtual ~GenPspGraphics() override;
48
49
    SAL_DLLPRIVATE void     Init(psp::JobData* pJob);
50
51
    // override all pure virtual methods
52
    virtual SalGraphicsImpl* GetImpl() const override
53
0
    {
54
0
        return m_pBackend.get();
55
0
    }
56
57
    SAL_DLLPRIVATE virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) override;
58
59
    SAL_DLLPRIVATE virtual void SetTextColor( Color nColor ) override;
60
    SAL_DLLPRIVATE virtual void SetFont(LogicalFontInstance*, int nFallbackLevel) override;
61
    SAL_DLLPRIVATE virtual void GetFontMetric( FontMetricDataRef&, int nFallbackLevel ) override;
62
    SAL_DLLPRIVATE virtual FontCharMapRef GetFontCharMap() const override;
63
    SAL_DLLPRIVATE virtual bool GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const override;
64
    SAL_DLLPRIVATE virtual void GetDevFontList( vcl::font::PhysicalFontCollection* ) override;
65
    // graphics must drop any cached font info
66
    SAL_DLLPRIVATE virtual void ClearDevFontCache() override;
67
    SAL_DLLPRIVATE virtual bool AddTempDevFont( vcl::font::PhysicalFontCollection*,
68
                                            const OUString& rFileURL,
69
                                            const OUString& rFontName ) override;
70
    SAL_DLLPRIVATE virtual bool RemoveTempDevFont(const OUString& rFileURL,
71
                                                  const OUString& rFontName) override;
72
73
    SAL_DLLPRIVATE virtual std::unique_ptr<GenericSalLayout>
74
                            GetTextLayout(int nFallbackLevel) override;
75
    SAL_DLLPRIVATE virtual void DrawTextLayout( const GenericSalLayout& ) override;
76
77
    SAL_DLLPRIVATE virtual SystemGraphicsData GetGraphicsData() const override;
78
};
79
80
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */