xref: /AOO41X/main/sw/source/ui/inc/swtablerep.hxx (revision 1d2dbeb0b7301723c6d13094e87a8714ef81a328)
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 
GetLeftSpace() const56     SwTwips     GetLeftSpace() const            {return nLeftSpace;}
SetLeftSpace(SwTwips nSet)57     void        SetLeftSpace(SwTwips nSet)      {nLeftSpace = nSet;}
58 
GetRightSpace() const59     SwTwips     GetRightSpace() const           {return nRightSpace;}
SetRightSpace(SwTwips nSet)60     void        SetRightSpace(SwTwips nSet)     {nRightSpace = nSet;}
61 
GetWidth() const62     SwTwips     GetWidth() const                {return nTblWidth;}
SetWidth(SwTwips nSet)63     void        SetWidth(SwTwips nSet)          {nTblWidth = nSet;}
64 
GetWidthPercent() const65     sal_uInt16      GetWidthPercent() const         {return nWidthPercent;}
SetWidthPercent(sal_uInt16 nSet)66     void        SetWidthPercent(sal_uInt16 nSet)    {nWidthPercent = nSet;}
67 
GetAlign() const68     sal_uInt16      GetAlign() const                {return nAlign;}
SetAlign(sal_uInt16 nSet)69     void        SetAlign(sal_uInt16 nSet)           {nAlign = nSet;}
70 
IsComplex() const71     sal_Bool        IsComplex() const               {return bComplex;}
GetColCount() const72     sal_uInt16      GetColCount() const             {return nColCount;}
GetAllColCount() const73     sal_uInt16      GetAllColCount() const          {return nAllCols;}
74 
HasColsChanged() const75     sal_Bool        HasColsChanged() const          {return bColsChanged;}
SetColsChanged()76     void        SetColsChanged()                {bColsChanged = sal_True;}
77 
HasWidthChanged() const78     sal_Bool        HasWidthChanged() const         {return bWidthChanged;}
SetWidthChanged()79     void        SetWidthChanged()               {bWidthChanged  = sal_True;}
80 
IsLineSelected() const81     sal_Bool        IsLineSelected() const          {return bLineSelected;}
SetLineSelected(sal_Bool bSet)82     void        SetLineSelected(sal_Bool bSet)      {bLineSelected = bSet;}
83 
GetSpace() const84     SwTwips     GetSpace() const                { return nSpace;}
SetSpace(SwTwips nSet)85     void        SetSpace(SwTwips nSet)          {nSpace = nSet;}
86 
GetColumns() const87     TColumn*    GetColumns() const              {return pTColumns;}
88 };
89 #endif
90 
91