xref: /AOO41X/main/sw/source/ui/inc/swtablerep.hxx (revision 5fa474865bd1ef366a21e2477014a2b707635425)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _SWTABLEREP_HXX
24 #define _SWTABLEREP_HXX
25 
26 
27 #include <sfx2/tabdlg.hxx>
28 #include "swdllapi.h"
29 #include "swtypes.hxx"
30 
31 class SwTabCols;
32 struct TColumn;
33 class SW_DLLPUBLIC SwTableRep
34 {
35 	TColumn* 	pTColumns;
36 
37 	SwTwips		nTblWidth;
38 	SwTwips		nSpace;
39 	SwTwips		nLeftSpace;
40 	SwTwips 	nRightSpace;
41 	sal_uInt16 		nAlign;
42 	sal_uInt16		nColCount;
43 	sal_uInt16		nAllCols;
44 	sal_uInt16 		nWidthPercent;
45 	sal_Bool 		bComplex : 1;
46 	sal_Bool 		bLineSelected : 1;
47 	sal_Bool		bWidthChanged : 1;
48 	sal_Bool		bColsChanged : 1;
49 
50 public:
51 	SwTableRep( const SwTabCols& rTabCol, sal_Bool bComplex );
52 	~SwTableRep();
53 
54 	sal_Bool		FillTabCols( SwTabCols& rTabCol ) const;
55 
56 	SwTwips 	GetLeftSpace() const			{return nLeftSpace;}
57 	void 		SetLeftSpace(SwTwips nSet) 		{nLeftSpace = nSet;}
58 
59 	SwTwips		GetRightSpace() const			{return nRightSpace;}
60 	void 		SetRightSpace(SwTwips nSet) 	{nRightSpace = nSet;}
61 
62 	SwTwips		GetWidth() const				{return nTblWidth;}
63 	void 		SetWidth(SwTwips nSet) 			{nTblWidth = nSet;}
64 
65 	sal_uInt16		GetWidthPercent() const			{return nWidthPercent;}
66 	void 		SetWidthPercent(sal_uInt16 nSet) 	{nWidthPercent = nSet;}
67 
68 	sal_uInt16		GetAlign() const				{return nAlign;}
69 	void 		SetAlign(sal_uInt16 nSet) 			{nAlign = nSet;}
70 
71 	sal_Bool		IsComplex() const 				{return bComplex;}
72 	sal_uInt16 		GetColCount() const 			{return nColCount;}
73 	sal_uInt16 		GetAllColCount() const 			{return nAllCols;}
74 
75 	sal_Bool		HasColsChanged() const 			{return bColsChanged;}
76 	void		SetColsChanged() 				{bColsChanged = sal_True;}
77 
78 	sal_Bool		HasWidthChanged() const 		{return bWidthChanged;}
79 	void 		SetWidthChanged() 				{bWidthChanged  = sal_True;}
80 
81 	sal_Bool 		IsLineSelected() const			{return bLineSelected;}
82 	void		SetLineSelected(sal_Bool bSet) 		{bLineSelected = bSet;}
83 
84 	SwTwips		GetSpace() const				{ return nSpace;}
85 	void 		SetSpace(SwTwips nSet) 			{nSpace = nSet;}
86 
87 	TColumn* 	GetColumns() const				{return pTColumns;}
88 };
89 #endif
90 
91