Coverage Report

Created: 2025-12-31 10:39

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/oox/inc/drawingml/table/tableproperties.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_TABLE_TABLEPROPERTIES_HXX
21
#define INCLUDED_OOX_DRAWINGML_TABLE_TABLEPROPERTIES_HXX
22
23
#include <drawingml/table/tablerow.hxx>
24
#include <drawingml/table/tablestyle.hxx>
25
#include <oox/drawingml/color.hxx>
26
27
#include <memory>
28
#include <vector>
29
30
namespace oox::drawingml::table {
31
32
class TableProperties
33
{
34
public:
35
36
    TableProperties();
37
38
810
    std::vector< sal_Int32 >&           getTableGrid() { return mvTableGrid; };
39
768
    std::vector< TableRow >&            getTableRows() { return mvTableRows; };
40
41
247
    OUString&                           getStyleId()    { return maStyleId; };
42
0
    std::shared_ptr< TableStyle >&      getTableStyle() { return mpTableStyle; };
43
4.89k
    bool                                isFirstRow() const  { return mbFirstRow; };
44
139
    void                                setFirstRow(bool b) { mbFirstRow = b; };
45
4.89k
    bool                                isFirstCol() const  { return mbFirstCol; };
46
139
    void                                setFirstCol(bool b) { mbFirstCol = b; };
47
3.80k
    bool                                isLastRow() const   { return mbLastRow; };
48
139
    void                                setLastRow(bool b)  { mbLastRow = b; };
49
4.89k
    bool                                isLastCol() const   { return mbLastCol; };
50
139
    void                                setLastCol(bool b)  { mbLastCol = b; };
51
3.07k
    bool                                isBandRow() const   { return mbBandRow; };
52
139
    void                                setBandRow(bool b)  { mbBandRow = b; };
53
3.07k
    bool                                isBandCol() const   { return mbBandCol; };
54
139
    void                                setBandCol(bool b)  { mbBandCol = b; };
55
3.07k
    Color&                              getBgColor(){ return maBgColor; };
56
57
    void pushToPropSet( const ::oox::core::XmlFilterBase& rFilterBase,
58
        const css::uno::Reference < css::beans::XPropertySet > & xPropSet,
59
        const ::oox::drawingml::TextListStylePtr& pMasterTextListStyle );
60
61
private:
62
63
    const TableStyle&                   getUsedTableStyle(const ::oox::core::XmlFilterBase& rFilterBase, std::unique_ptr<TableStyle>& rTableStyleToDelete);
64
65
    OUString                            maStyleId;              // either StyleId is available
66
    std::shared_ptr< TableStyle >       mpTableStyle;           // or the complete TableStyle
67
    std::vector< sal_Int32 >            mvTableGrid;
68
    std::vector< TableRow >             mvTableRows;
69
    Color                               maBgColor;
70
71
    bool                                mbFirstRow;
72
    bool                                mbFirstCol;
73
    bool                                mbLastRow;
74
    bool                                mbLastCol;
75
    bool                                mbBandRow;
76
    bool                                mbBandCol;
77
};
78
79
}
80
81
#endif // INCLUDED_OOX_DRAWINGML_TABLE_TABLEPROPERTIES_HXX
82
83
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */