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