xref: /trunk/main/sw/source/ui/inc/swtablerep.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef _SWTABLEREP_HXX
28 #define _SWTABLEREP_HXX
29 
30 
31 #include <sfx2/tabdlg.hxx>
32 #include "swdllapi.h"
33 #include "swtypes.hxx"
34 
35 class SwTabCols;
36 struct TColumn;
37 class SW_DLLPUBLIC SwTableRep
38 {
39     TColumn*    pTColumns;
40 
41     SwTwips     nTblWidth;
42     SwTwips     nSpace;
43     SwTwips     nLeftSpace;
44     SwTwips     nRightSpace;
45     sal_uInt16      nAlign;
46     sal_uInt16      nColCount;
47     sal_uInt16      nAllCols;
48     sal_uInt16      nWidthPercent;
49     sal_Bool        bComplex : 1;
50     sal_Bool        bLineSelected : 1;
51     sal_Bool        bWidthChanged : 1;
52     sal_Bool        bColsChanged : 1;
53 
54 public:
55     SwTableRep( const SwTabCols& rTabCol, sal_Bool bComplex );
56     ~SwTableRep();
57 
58     sal_Bool        FillTabCols( SwTabCols& rTabCol ) const;
59 
60     SwTwips     GetLeftSpace() const            {return nLeftSpace;}
61     void        SetLeftSpace(SwTwips nSet)      {nLeftSpace = nSet;}
62 
63     SwTwips     GetRightSpace() const           {return nRightSpace;}
64     void        SetRightSpace(SwTwips nSet)     {nRightSpace = nSet;}
65 
66     SwTwips     GetWidth() const                {return nTblWidth;}
67     void        SetWidth(SwTwips nSet)          {nTblWidth = nSet;}
68 
69     sal_uInt16      GetWidthPercent() const         {return nWidthPercent;}
70     void        SetWidthPercent(sal_uInt16 nSet)    {nWidthPercent = nSet;}
71 
72     sal_uInt16      GetAlign() const                {return nAlign;}
73     void        SetAlign(sal_uInt16 nSet)           {nAlign = nSet;}
74 
75     sal_Bool        IsComplex() const               {return bComplex;}
76     sal_uInt16      GetColCount() const             {return nColCount;}
77     sal_uInt16      GetAllColCount() const          {return nAllCols;}
78 
79     sal_Bool        HasColsChanged() const          {return bColsChanged;}
80     void        SetColsChanged()                {bColsChanged = sal_True;}
81 
82     sal_Bool        HasWidthChanged() const         {return bWidthChanged;}
83     void        SetWidthChanged()               {bWidthChanged  = sal_True;}
84 
85     sal_Bool        IsLineSelected() const          {return bLineSelected;}
86     void        SetLineSelected(sal_Bool bSet)      {bLineSelected = bSet;}
87 
88     SwTwips     GetSpace() const                { return nSpace;}
89     void        SetSpace(SwTwips nSet)          {nSpace = nSet;}
90 
91     TColumn*    GetColumns() const              {return pTColumns;}
92 };
93 #endif
94 
95