Coverage Report

Created: 2026-02-14 09:37

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/include/xmloff/XMLFontAutoStylePool.hxx
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
#ifndef INCLUDED_XMLOFF_XMLFONTAUTOSTYLEPOOL_HXX
21
#define INCLUDED_XMLOFF_XMLFONTAUTOSTYLEPOOL_HXX
22
23
#include <sal/config.h>
24
#include <xmloff/dllapi.h>
25
#include <rtl/ustring.hxx>
26
#include <tools/fontenum.hxx>
27
#include <salhelper/simplereferenceobject.hxx>
28
#include <set>
29
#include <memory>
30
31
namespace com::sun::star {
32
    namespace uno { template<typename T> class Reference; }
33
    namespace beans { class XPropertySet; struct PropertyValue; }
34
}
35
36
class XMLFontAutoStylePool_Impl;
37
class SvXMLExport;
38
39
class XMLOFF_DLLPUBLIC XMLFontAutoStylePool : public salhelper::SimpleReferenceObject
40
{
41
private:
42
    SvXMLExport& m_rExport;
43
44
    std::unique_ptr<XMLFontAutoStylePool_Impl> m_pFontAutoStylePool;
45
    std::set<OUString> m_aNames;
46
47
protected:
48
17
    SvXMLExport& GetExport() { return m_rExport; }
49
50
public:
51
    XMLFontAutoStylePool(SvXMLExport& rExport);
52
    virtual ~XMLFontAutoStylePool() override;
53
54
    OUString Add(
55
            const OUString& rFamilyName,
56
            const OUString& rStyleName,
57
            FontFamily nFamily,
58
            FontPitch nPitch,
59
            rtl_TextEncoding eEnc );
60
61
    OUString Find(
62
            const OUString& rFamilyName,
63
            const OUString& rStyleName,
64
            FontFamily nFamily,
65
            FontPitch nPitch,
66
            rtl_TextEncoding eEnc )const;
67
68
    void exportXML();
69
70
    void addModelFonts(const css::uno::Reference<css::beans::XPropertySet>& xProps);
71
};
72
73
#endif // INCLUDED_XMLOFF_XMLFONTAUTOSTYLEPOOL_HXX
74
75
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */