LCOV - code coverage report
Current view: top level - sw/source/core/inc - rowfrm.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 13 16 81.2 %
Date: 2015-06-13 12:38:46 Functions: 14 17 82.4 %
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 * m_pTabLine;
      38             :     SwRowFrm * m_pFollowRow;
      39             :     // #i29550#
      40             :     sal_uInt16 mnTopMarginForLowers;
      41             :     sal_uInt16 mnBottomMarginForLowers;
      42             :     sal_uInt16 mnBottomLineSize;
      43             :     // <-- collapsing
      44             :     bool m_bIsFollowFlowRow;
      45             :     bool m_bIsRepeatedHeadline;
      46             :     bool m_bIsRowSpanLine;
      47             : 
      48             :     virtual void DestroyImpl() SAL_OVERRIDE;
      49             :     virtual ~SwRowFrm();
      50             : 
      51             : protected:
      52             :     virtual void MakeAll() SAL_OVERRIDE;
      53             :     virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) SAL_OVERRIDE;
      54             : 
      55             : public:
      56             :     SwRowFrm( const SwTableLine &, SwFrm*, bool bInsertContent = true );
      57             : 
      58             :     virtual void Cut() SAL_OVERRIDE;
      59             : 
      60             :     /**
      61             :      * Register Flys after a line was created _AND_ inserted
      62             :      * Must be called by the creator; the Fly is inserted _after_ it has
      63             :      * been created; the same holds true for the Page at which the Flys
      64             :      * are to be registered at.
      65             :      */
      66             :     void RegistFlys( SwPageFrm *pPage = 0 );
      67             : 
      68      708375 :     const SwTableLine *GetTabLine() const { return m_pTabLine; }
      69             : 
      70             :     /**
      71             :      * Adapts the Cells to the current height; invalidates the Cells if
      72             :      * the Direction does not match the height
      73             :      */
      74             :     void AdjustCells( const SwTwips nHeight, const bool bHeight );
      75             : 
      76          30 :     SwRowFrm* GetFollowRow() const { return m_pFollowRow; }
      77           0 :     void SetFollowRow( SwRowFrm* pNew ) { m_pFollowRow = pNew; }
      78             : 
      79             :     // #i29550#
      80      102522 :     sal_uInt16 GetTopMarginForLowers() const { return mnTopMarginForLowers; }
      81       14952 :     void   SetTopMarginForLowers( sal_uInt16 nNew ) { mnTopMarginForLowers = nNew; }
      82      102526 :     sal_uInt16 GetBottomMarginForLowers() const { return mnBottomMarginForLowers; }
      83       14952 :     void   SetBottomMarginForLowers( sal_uInt16 nNew ) { mnBottomMarginForLowers = nNew; }
      84       22089 :     sal_uInt16 GetBottomLineSize() const { return mnBottomLineSize; }
      85       14952 :     void   SetBottomLineSize( sal_uInt16 nNew ) { mnBottomLineSize = nNew; }
      86             :     // <-- collapsing
      87             : 
      88       23380 :     bool IsRepeatedHeadline() const { return m_bIsRepeatedHeadline; }
      89           2 :     void SetRepeatedHeadline( bool bNew ) { m_bIsRepeatedHeadline = bNew; }
      90             : 
      91             :     // --> split table rows
      92             :     bool IsRowSplitAllowed() const;
      93           0 :     bool IsFollowFlowRow() const { return m_bIsFollowFlowRow; }
      94           0 :     void SetFollowFlowRow( bool bNew ) { m_bIsFollowFlowRow = bNew; }
      95             :     // <-- split table rows
      96             : 
      97             :     // #131283# Table row keep feature
      98             :     bool ShouldRowKeepWithNext() const;
      99             : 
     100             :     // #i4032# NEW TABLES
     101       20949 :     bool IsRowSpanLine() const { return m_bIsRowSpanLine; }
     102          83 :     void SetRowSpanLine( bool bNew ) { m_bIsRowSpanLine = bNew; }
     103             : 
     104        7118 :     DECL_FIXEDMEMPOOL_NEWDEL(SwRowFrm)
     105             : };
     106             : 
     107             : #endif
     108             : 
     109             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11