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