Coverage Report

Created: 2026-03-31 11:00

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/oox/inc/drawingml/textliststyle.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_OOX_DRAWINGML_TEXTLISTSTYLE_HXX
21
#define INCLUDED_OOX_DRAWINGML_TEXTLISTSTYLE_HXX
22
23
#include <com/sun/star/container/XIndexReplace.hpp>
24
25
#include <drawingml/textparagraphproperties.hxx>
26
#include <array>
27
28
namespace oox::drawingml
29
{
30
constexpr int NUM_TEXT_LIST_STYLE_ENTRIES = 9;
31
typedef std::array<TextParagraphProperties, NUM_TEXT_LIST_STYLE_ENTRIES>
32
    TextParagraphPropertiesArray;
33
34
class TextListStyle
35
{
36
public:
37
    TextListStyle();
38
    ~TextListStyle();
39
40
    TextListStyle(const TextListStyle& rStyle);
41
    TextListStyle& operator=(const TextListStyle& rStyle);
42
43
    void apply(const TextListStyle& rTextListStyle);
44
45
935k
    const TextParagraphPropertiesArray& getListStyle() const { return maListStyle; };
46
1.17M
    TextParagraphPropertiesArray& getListStyle() { return maListStyle; };
47
48
    const TextParagraphPropertiesArray& getAggregationListStyle() const
49
481k
    {
50
481k
        return maAggregationListStyle;
51
481k
    };
52
481k
    TextParagraphPropertiesArray& getAggregationListStyle() { return maAggregationListStyle; };
53
54
    /// Flags ListStyle as having a non-empty lstStyle tag on import
55
160k
    void setHasListStyleOnImport() { mbHasListStyleOnImport = true; }
56
    /** Returns whether the lstStyle tag was non-empty on import
57
     *
58
     *  @return true if list style has its own noninherited properties.
59
     */
60
0
    bool hasListStyleOnImport() const { return mbHasListStyleOnImport; }
61
62
    /// Set properties on xNumRules based on maListStyle, for all levels except nIgnoreLevel.
63
    void pushToNumberingRules(const css::uno::Reference<css::container::XIndexReplace>& xNumRules,
64
                              std::optional<size_t> nIgnoreLevel);
65
66
#ifdef DBG_UTIL
67
    void dump() const;
68
#endif
69
70
private:
71
    TextParagraphPropertiesArray maListStyle;
72
    TextParagraphPropertiesArray maAggregationListStyle;
73
    /// Set if ListStyle has a non-empty lstStyle tag on import
74
    bool mbHasListStyleOnImport;
75
};
76
}
77
78
#endif // INCLUDED_OOX_DRAWINGML_TEXTLISTSTYLE_HXX
79
80
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */