Coverage Report

Created: 2026-04-09 11:41

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/sw/source/uibase/inc/swtablerep.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
#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_SWTABLEREP_HXX
20
#define INCLUDED_SW_SOURCE_UIBASE_INC_SWTABLEREP_HXX
21
22
#include <swdllapi.h>
23
#include <swtypes.hxx>
24
25
class SwTabCols;
26
27
struct TColumn
28
{
29
    SwTwips nWidth;
30
    bool    bVisible;
31
};
32
33
class SW_DLLPUBLIC SwTableRep
34
{
35
    std::vector<TColumn> m_aTColumns;
36
37
    SwTwips     m_nTableWidth;
38
    SwTwips     m_nSpace;
39
    SwTwips     m_nLeftSpace;
40
    SwTwips     m_nRightSpace;
41
    sal_uInt16      m_nAlign;
42
    sal_uInt16      m_nColCount;
43
    sal_uInt16      m_nAllCols;
44
    sal_uInt16      m_nWidthPercent;
45
    bool        m_bLineSelected : 1;
46
    bool        m_bWidthChanged : 1;
47
    bool        m_bColsChanged : 1;
48
49
public:
50
    SwTableRep( const SwTabCols& rTabCol );
51
    ~SwTableRep();
52
53
    SwTableRep( const SwTableRep& rCopy ) = default;
54
    SwTableRep( SwTableRep&& rCopy ) = default;
55
    SwTableRep& operator=(const SwTableRep& rCopy) = default;
56
    SwTableRep& operator=(SwTableRep&& rCopy) = default;
57
58
    bool        FillTabCols( SwTabCols& rTabCol ) const;
59
60
0
    SwTwips     GetLeftSpace() const            {return m_nLeftSpace;}
61
0
    void        SetLeftSpace(SwTwips nSet)      {m_nLeftSpace = nSet;}
62
63
0
    SwTwips     GetRightSpace() const           {return m_nRightSpace;}
64
0
    void        SetRightSpace(SwTwips nSet)     {m_nRightSpace = nSet;}
65
66
0
    SwTwips     GetWidth() const                {return m_nTableWidth;}
67
0
    void        SetWidth(SwTwips nSet)          {m_nTableWidth = nSet;}
68
69
0
    sal_uInt16      GetWidthPercent() const         {return m_nWidthPercent;}
70
0
    void        SetWidthPercent(sal_uInt16 nSet)    {m_nWidthPercent = nSet;}
71
72
0
    sal_uInt16      GetAlign() const                {return m_nAlign;}
73
0
    void        SetAlign(sal_uInt16 nSet)           {m_nAlign = nSet;}
74
75
0
    sal_uInt16      GetColCount() const             {return m_nColCount;}
76
0
    sal_uInt16      GetAllColCount() const          {return m_nAllCols;}
77
78
0
    bool        HasColsChanged() const          {return m_bColsChanged;}
79
0
    void        SetColsChanged()                {m_bColsChanged = true;}
80
81
0
    bool        HasWidthChanged() const         {return m_bWidthChanged;}
82
0
    void        SetWidthChanged()               {m_bWidthChanged  = true;}
83
84
0
    bool        IsLineSelected() const          {return m_bLineSelected;}
85
0
    void        SetLineSelected(bool bSet)      {m_bLineSelected = bSet;}
86
87
0
    SwTwips     GetSpace() const                { return m_nSpace;}
88
0
    void        SetSpace(SwTwips nSet)          {m_nSpace = nSet;}
89
90
0
    TColumn*    GetColumns()                    {return m_aTColumns.data();}
91
};
92
#endif
93
94
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */