xref: /aoo42x/main/sw/source/core/inc/rowfrm.hxx (revision 1d2dbeb0)
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 _ROWFRM_HXX
24 #define _ROWFRM_HXX
25 
26 #include <tools/mempool.hxx>
27 
28 #include "layfrm.hxx"
29 
30 class SwTableLine;
31 class SwBorderAttrs;
32 
33 class SwRowFrm: public SwLayoutFrm
34 {
35 	virtual void Format( const SwBorderAttrs *pAttrs = 0 );
36 		//Aendern nur die Framesize, nicht die PrtArea-SSize
37     virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
38     virtual SwTwips GrowFrm  ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
39 
40 	const SwTableLine *pTabLine;
41     SwRowFrm* pFollowRow;
42     // --> collapsing borders FME 2005-05-27 #i29550#
43     sal_uInt16 mnTopMarginForLowers;
44     sal_uInt16 mnBottomMarginForLowers;
45     sal_uInt16 mnBottomLineSize;
46     // <-- collapsing
47     bool bIsFollowFlowRow;
48     bool bIsRepeatedHeadline;
49     bool mbIsRowSpanLine;
50 
51 protected:
52 	virtual void MakeAll();
53 	virtual	void  Modify( const SfxPoolItem*, const SfxPoolItem* );
54 
55 public:
56     SwRowFrm( const SwTableLine &, SwFrm*, bool bInsertContent = true );
57 	~SwRowFrm();
58 
59 	virtual void Cut();
60 
61 	//Zum Anmelden der Flys nachdem eine Zeile erzeugt _und_ eingefuegt wurde.
62 	//Muss vom Erzeuger gerufen werden, denn erst nach dem Konstruieren wird
63 	//Das Teil gepastet; mithin ist auch erst dann die Seite zum Anmelden der
64 	//Flys erreichbar.
65 	void RegistFlys( SwPageFrm *pPage = 0 );
66 
GetTabLine() const67 	const SwTableLine *GetTabLine() const { return pTabLine; }
68 
69 	//Passt die Zellen auf die aktuelle Hoehe an, invalidiert die Zellen
70 	//wenn die Direction nicht der Hoehe entspricht.
71 	void AdjustCells( const SwTwips nHeight, const sal_Bool bHeight );
72 
73     //
74     //
GetFollowRow() const75     SwRowFrm* GetFollowRow() const { return pFollowRow; }
SetFollowRow(SwRowFrm * pNew)76     void SetFollowRow( SwRowFrm* pNew ) { pFollowRow = pNew; }
77 
78     // --> collapsing borders FME 2005-05-27 #i29550#
GetTopMarginForLowers() const79     sal_uInt16 GetTopMarginForLowers() const { return mnTopMarginForLowers; }
SetTopMarginForLowers(sal_uInt16 nNew)80     void   SetTopMarginForLowers( sal_uInt16 nNew ) { mnTopMarginForLowers = nNew; }
GetBottomMarginForLowers() const81     sal_uInt16 GetBottomMarginForLowers() const { return mnBottomMarginForLowers; }
SetBottomMarginForLowers(sal_uInt16 nNew)82     void   SetBottomMarginForLowers( sal_uInt16 nNew ) { mnBottomMarginForLowers = nNew; }
GetBottomLineSize() const83     sal_uInt16 GetBottomLineSize() const { return mnBottomLineSize; }
SetBottomLineSize(sal_uInt16 nNew)84     void   SetBottomLineSize( sal_uInt16 nNew ) { mnBottomLineSize = nNew; }
85     // <-- collapsing
86 
IsRepeatedHeadline() const87     bool IsRepeatedHeadline() const { return bIsRepeatedHeadline; }
SetRepeatedHeadline(bool bNew)88     void SetRepeatedHeadline( bool bNew ) { bIsRepeatedHeadline = bNew; }
89 
90     // --> split table rows
91     bool IsRowSplitAllowed() const;
IsFollowFlowRow() const92     bool IsFollowFlowRow() const { return bIsFollowFlowRow; }
SetFollowFlowRow(bool bNew)93     void SetFollowFlowRow( bool bNew ) { bIsFollowFlowRow = bNew; }
94     // <-- split table rows
95 
96     // --> FME 2006-02-10 #131283# Table row keep feature
97     bool ShouldRowKeepWithNext() const;
98     // <--
99 
100     // --> FME 2006-10-30 #i4032# NEW TABLES
IsRowSpanLine() const101     bool IsRowSpanLine() const { return mbIsRowSpanLine; }
SetRowSpanLine(bool bNew)102     void SetRowSpanLine( bool bNew ) { mbIsRowSpanLine = bNew; }
103 
104 	DECL_FIXEDMEMPOOL_NEWDEL(SwRowFrm)
105 };
106 
107 #endif
108