LCOV - code coverage report
Current view: top level - sw/source/core/inc - rowfrm.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 12 16 75.0 %
Date: 2014-11-03 Functions: 13 17 76.5 %
Legend: Lines: hit not hit

          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 INCLUDED_SW_SOURCE_CORE_INC_ROWFRM_HXX
      20             : #define INCLUDED_SW_SOURCE_CORE_INC_ROWFRM_HXX
      21             : 
      22             : #include <tools/mempool.hxx>
      23             : 
      24             : #include "layfrm.hxx"
      25             : 
      26             : class SwTableLine;
      27             : class SwBorderAttrs;
      28             : 
      29             : /// SwRowFrm is one table row in the document layout.
      30             : class SwRowFrm: public SwLayoutFrm
      31             : {
      32             :     virtual void Format( const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
      33             :     /// Only change the Frame size, not the PrtArea SSize
      34             :     virtual SwTwips ShrinkFrm( SwTwips, bool bTst = false, bool bInfo = false ) SAL_OVERRIDE;
      35             :     virtual SwTwips GrowFrm  ( SwTwips, bool bTst = false, bool bInfo = false ) SAL_OVERRIDE;
      36             : 
      37             :     const SwTableLine *pTabLine;
      38             :     SwRowFrm* pFollowRow;
      39             :     // #i29550#
      40             :     sal_uInt16 mnTopMarginForLowers;
      41             :     sal_uInt16 mnBottomMarginForLowers;
      42             :     sal_uInt16 mnBottomLineSize;
      43             :     // <-- collapsing
      44             :     bool bIsFollowFlowRow;
      45             :     bool bIsRepeatedHeadline;
      46             :     bool mbIsRowSpanLine;
      47             : 
      48             : protected:
      49             :     virtual void MakeAll() SAL_OVERRIDE;
      50             :     virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) SAL_OVERRIDE;
      51             : 
      52             : public:
      53             :     SwRowFrm( const SwTableLine &, SwFrm*, bool bInsertContent = true );
      54             :     virtual ~SwRowFrm();
      55             : 
      56             :     virtual void Cut() SAL_OVERRIDE;
      57             : 
      58             :     /**
      59             :      * Register Flys after a line was created _AND_ inserted
      60             :      * Must be called by the creator; the Fly is inserted _after_ it has
      61             :      * been created; the same holds true for the Page at which the Flys
      62             :      * are to be registered at.
      63             :      */
      64             :     void RegistFlys( SwPageFrm *pPage = 0 );
      65             : 
      66     2051348 :     const SwTableLine *GetTabLine() const { return pTabLine; }
      67             : 
      68             :     /**
      69             :      * Adapts the Cells to the current height; invalidates the Cells if
      70             :      * the Direction does not match the height
      71             :      */
      72             :     void AdjustCells( const SwTwips nHeight, const bool bHeight );
      73             : 
      74           0 :     SwRowFrm* GetFollowRow() const { return pFollowRow; }
      75           0 :     void SetFollowRow( SwRowFrm* pNew ) { pFollowRow = pNew; }
      76             : 
      77             :     // #i29550#
      78      202260 :     sal_uInt16 GetTopMarginForLowers() const { return mnTopMarginForLowers; }
      79       33038 :     void   SetTopMarginForLowers( sal_uInt16 nNew ) { mnTopMarginForLowers = nNew; }
      80      202260 :     sal_uInt16 GetBottomMarginForLowers() const { return mnBottomMarginForLowers; }
      81       33038 :     void   SetBottomMarginForLowers( sal_uInt16 nNew ) { mnBottomMarginForLowers = nNew; }
      82       54040 :     sal_uInt16 GetBottomLineSize() const { return mnBottomLineSize; }
      83       33038 :     void   SetBottomLineSize( sal_uInt16 nNew ) { mnBottomLineSize = nNew; }
      84             :     // <-- collapsing
      85             : 
      86       55476 :     bool IsRepeatedHeadline() const { return bIsRepeatedHeadline; }
      87           2 :     void SetRepeatedHeadline( bool bNew ) { bIsRepeatedHeadline = bNew; }
      88             : 
      89             :     // --> split table rows
      90             :     bool IsRowSplitAllowed() const;
      91           0 :     bool IsFollowFlowRow() const { return bIsFollowFlowRow; }
      92           0 :     void SetFollowFlowRow( bool bNew ) { bIsFollowFlowRow = bNew; }
      93             :     // <-- split table rows
      94             : 
      95             :     // #131283# Table row keep feature
      96             :     bool ShouldRowKeepWithNext() const;
      97             : 
      98             :     // #i4032# NEW TABLES
      99       51373 :     bool IsRowSpanLine() const { return mbIsRowSpanLine; }
     100         312 :     void SetRowSpanLine( bool bNew ) { mbIsRowSpanLine = bNew; }
     101             : 
     102       13088 :     DECL_FIXEDMEMPOOL_NEWDEL(SwRowFrm)
     103             : };
     104             : 
     105             : #endif
     106             : 
     107             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10