Coverage Report

Created: 2026-10-14 09:33

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/include/vcl/font/Variation.hxx
Line
Count
Source
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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
10
#pragma once
11
12
#include <cstdint>
13
#include <rtl/ustring.hxx>
14
#include <vcl/dllapi.h>
15
#include <vector>
16
17
namespace vcl::font
18
{
19
struct VCL_DLLPUBLIC Variation
20
{
21
    uint32_t nTag = 0;
22
    float fValue = 0;
23
24
    bool operator==(const Variation& rOther) const
25
0
    {
26
0
        return nTag == rOther.nTag && fValue == rOther.fValue;
27
0
    }
28
};
29
30
struct VCL_DLLPUBLIC VariationAxis
31
{
32
    uint32_t nTag = 0;
33
    OUString aName;
34
    float fMinValue = 0;
35
    float fDefaultValue = 0;
36
    float fMaxValue = 0;
37
};
38
39
VCL_DLLPUBLIC std::vector<Variation> VariationsFromString(std::u16string_view rString);
40
VCL_DLLPUBLIC OUString VariationsToString(const std::vector<Variation>& rVariations);
41
42
} // namespace vcl::font
43
44
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */