Coverage Report

Created: 2026-03-31 11:00

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/vcl/unx/generic/app/gendata.cxx
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
#ifdef IOS
21
#include <ios/iosinst.hxx>
22
#endif
23
24
#include <unx/gendata.hxx>
25
26
#include <unx/fontmanager.hxx>
27
28
#ifndef IOS
29
30
#include <unx/glyphcache.hxx>
31
#include <printerinfomanager.hxx>
32
33
106
SalData::SalData() {}
34
35
0
SalData::~SalData() {}
36
37
#endif
38
39
106
GenericUnixSalData::GenericUnixSalData() {}
40
41
GenericUnixSalData::~GenericUnixSalData()
42
0
{
43
0
#ifndef IOS
44
    // at least for GetPrintFontManager the sequence is important
45
0
    m_pPrintFontManager.reset();
46
0
    m_pFreetypeManager.reset();
47
0
    m_pPrinterInfoManager.reset();
48
0
#endif
49
0
}
50
51
#ifndef IOS
52
FreetypeManager* GenericUnixSalData::GetFreetypeManager()
53
210k
{
54
210k
    if (!m_pFreetypeManager)
55
106
        m_pFreetypeManager.reset(new FreetypeManager);
56
210k
    return m_pFreetypeManager.get();
57
210k
}
58
59
psp::PrintFontManager* GenericUnixSalData::GetPrintFontManager()
60
145
{
61
145
    if (!m_pPrintFontManager)
62
106
    {
63
106
        GetFreetypeManager();
64
106
        m_pPrintFontManager.reset(new psp::PrintFontManager);
65
106
    }
66
    // PrintFontManager needs the FreetypeManager
67
    assert(m_pFreetypeManager);
68
145
    return m_pPrintFontManager.get();
69
145
}
70
#endif
71
72
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */