Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
5 : : * This Source Code Form is subject to the terms of the Mozilla Public
6 : : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
11 : : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : : * contributor license agreements. See the NOTICE file distributed
13 : : * with this work for additional information regarding copyright
14 : : * ownership. The ASF licenses this file to you under the Apache
15 : : * License, Version 2.0 (the "License"); you may not use this file
16 : : * except in compliance with the License. You may obtain a copy of
17 : : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : : */
19 : : #ifndef _ROWFRM_HXX
20 : : #define _ROWFRM_HXX
21 : :
22 : : #include <tools/mempool.hxx>
23 : :
24 : : #include "layfrm.hxx"
25 : :
26 : : class SwTableLine;
27 : : class SwBorderAttrs;
28 : :
29 : : class SwRowFrm: public SwLayoutFrm
30 : : {
31 : : virtual void Format( const SwBorderAttrs *pAttrs = 0 );
32 : : //Aendern nur die Framesize, nicht die PrtArea-SSize
33 : : virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
34 : : virtual SwTwips GrowFrm ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
35 : :
36 : : const SwTableLine *pTabLine;
37 : : SwRowFrm* pFollowRow;
38 : : // #i29550#
39 : : sal_uInt16 mnTopMarginForLowers;
40 : : sal_uInt16 mnBottomMarginForLowers;
41 : : sal_uInt16 mnBottomLineSize;
42 : : // <-- collapsing
43 : : bool bIsFollowFlowRow;
44 : : bool bIsRepeatedHeadline;
45 : : bool mbIsRowSpanLine;
46 : :
47 : : protected:
48 : : virtual void MakeAll();
49 : : virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
50 : :
51 : : public:
52 : : SwRowFrm( const SwTableLine &, SwFrm*, bool bInsertContent = true );
53 : : ~SwRowFrm();
54 : :
55 : : virtual void Cut();
56 : :
57 : : //Zum Anmelden der Flys nachdem eine Zeile erzeugt _und_ eingefuegt wurde.
58 : : //Muss vom Erzeuger gerufen werden, denn erst nach dem Konstruieren wird
59 : : //Das Teil gepastet; mithin ist auch erst dann die Seite zum Anmelden der
60 : : //Flys erreichbar.
61 : : void RegistFlys( SwPageFrm *pPage = 0 );
62 : :
63 : 14125 : const SwTableLine *GetTabLine() const { return pTabLine; }
64 : :
65 : : //Passt die Zellen auf die aktuelle Hoehe an, invalidiert die Zellen
66 : : //wenn die Direction nicht der Hoehe entspricht.
67 : : void AdjustCells( const SwTwips nHeight, const sal_Bool bHeight );
68 : :
69 : : //
70 : : //
71 : 0 : SwRowFrm* GetFollowRow() const { return pFollowRow; }
72 : 0 : void SetFollowRow( SwRowFrm* pNew ) { pFollowRow = pNew; }
73 : :
74 : : // #i29550#
75 : 21142 : sal_uInt16 GetTopMarginForLowers() const { return mnTopMarginForLowers; }
76 : 1993 : void SetTopMarginForLowers( sal_uInt16 nNew ) { mnTopMarginForLowers = nNew; }
77 : 21142 : sal_uInt16 GetBottomMarginForLowers() const { return mnBottomMarginForLowers; }
78 : 1993 : void SetBottomMarginForLowers( sal_uInt16 nNew ) { mnBottomMarginForLowers = nNew; }
79 : 2763 : sal_uInt16 GetBottomLineSize() const { return mnBottomLineSize; }
80 : 1993 : void SetBottomLineSize( sal_uInt16 nNew ) { mnBottomLineSize = nNew; }
81 : : // <-- collapsing
82 : :
83 : 1334 : bool IsRepeatedHeadline() const { return bIsRepeatedHeadline; }
84 : 0 : void SetRepeatedHeadline( bool bNew ) { bIsRepeatedHeadline = bNew; }
85 : :
86 : : // --> split table rows
87 : : bool IsRowSplitAllowed() const;
88 : 0 : bool IsFollowFlowRow() const { return bIsFollowFlowRow; }
89 : 0 : void SetFollowFlowRow( bool bNew ) { bIsFollowFlowRow = bNew; }
90 : : // <-- split table rows
91 : :
92 : : // #131283# Table row keep feature
93 : : bool ShouldRowKeepWithNext() const;
94 : :
95 : : // #i4032# NEW TABLES
96 : 8695 : bool IsRowSpanLine() const { return mbIsRowSpanLine; }
97 : 0 : void SetRowSpanLine( bool bNew ) { mbIsRowSpanLine = bNew; }
98 : :
99 [ + - ][ + - ]: 1014 : DECL_FIXEDMEMPOOL_NEWDEL(SwRowFrm)
100 : : };
101 : :
102 : : #endif
103 : :
104 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|