LCOV - code coverage report
Current view: top level - sw/source/core/inc - ftnfrm.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 26 0.0 %
Date: 2014-04-14 Functions: 0 23 0.0 %
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             : 
      20             : #ifndef INCLUDED_SW_SOURCE_CORE_INC_FTNFRM_HXX
      21             : #define INCLUDED_SW_SOURCE_CORE_INC_FTNFRM_HXX
      22             : 
      23             : #include "layfrm.hxx"
      24             : 
      25             : class SwCntntFrm;
      26             : class SwTxtFtn;
      27             : class SwBorderAttrs;
      28             : class SwFtnFrm;
      29             : 
      30             : // There exists a special section on a page for footnotes. It's called
      31             : // SwFtnContFrm. Each footnote is separated by a SwFtnFrm which contains
      32             : // the paragraphs of a footnote. SwFtnFrm can be splitted and will then
      33             : // continue on another page.
      34           0 : class SwFtnContFrm: public SwLayoutFrm
      35             : {
      36             : public:
      37             :     SwFtnContFrm( SwFrmFmt*, SwFrm* );
      38             : 
      39             :     const SwFtnFrm* FindFootNote() const;
      40             : 
      41             :     virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False ) SAL_OVERRIDE;
      42             :     virtual SwTwips GrowFrm  ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False ) SAL_OVERRIDE;
      43             :     virtual void    Format( const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
      44             :     virtual void    PaintBorder( const SwRect &, const SwPageFrm *pPage,
      45             :                                  const SwBorderAttrs & ) const SAL_OVERRIDE;
      46             :     virtual void PaintSubsidiaryLines( const SwPageFrm*, const SwRect& ) const SAL_OVERRIDE;
      47             :             void    PaintLine( const SwRect &, const SwPageFrm * ) const;
      48             : };
      49             : 
      50           0 : class SwFtnFrm: public SwLayoutFrm
      51             : {
      52             :     // Pointer to FtnFrm in which the footnote will be continued:
      53             :     //  - 0     no following existent
      54             :     //  - this  for the last one
      55             :     //  - otherwise the following FtnFrm
      56             :     SwFtnFrm     *pFollow;
      57             :     SwFtnFrm     *pMaster;      // FtnFrm from which I am the following
      58             :     SwCntntFrm   *pRef;         // in this CntntFrm is the footnote reference
      59             :     SwTxtFtn     *pAttr;        // footnote attribute (for recognition)
      60             : 
      61             :     // if true paragraphs in this footnote are NOT permitted to flow backwards
      62             :     sal_Bool bBackMoveLocked : 1;
      63             :     // #i49383# - control unlock of position of lower anchored objects.
      64             :     bool mbUnlockPosOfLowerObjs : 1;
      65             : #ifdef DBG_UTIL
      66             : protected:
      67             :     virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False ) SAL_OVERRIDE;
      68             :     virtual SwTwips GrowFrm  ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False ) SAL_OVERRIDE;
      69             : #endif
      70             : 
      71             : public:
      72             :     SwFtnFrm( SwFrmFmt*, SwFrm*, SwCntntFrm*, SwTxtFtn* );
      73             : 
      74             :     virtual void Cut() SAL_OVERRIDE;
      75             :     virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 ) SAL_OVERRIDE;
      76             : 
      77             :     virtual void PaintSubsidiaryLines( const SwPageFrm*, const SwRect& ) const SAL_OVERRIDE;
      78             : 
      79             :     sal_Bool operator<( const SwTxtFtn* pTxtFtn ) const;
      80             : 
      81             : #ifdef DBG_UTIL
      82             :     const SwCntntFrm *GetRef() const;
      83             :          SwCntntFrm  *GetRef();
      84             : #else
      85           0 :     const SwCntntFrm *GetRef() const    { return pRef; }
      86           0 :          SwCntntFrm  *GetRef()          { return pRef; }
      87             : #endif
      88             :     const SwCntntFrm *GetRefFromAttr()  const;
      89             :           SwCntntFrm *GetRefFromAttr();
      90             : 
      91           0 :     const SwFtnFrm *GetFollow() const   { return pFollow; }
      92           0 :           SwFtnFrm *GetFollow()         { return pFollow; }
      93             : 
      94           0 :     const SwFtnFrm *GetMaster() const   { return pMaster; }
      95           0 :           SwFtnFrm *GetMaster()         { return pMaster; }
      96             : 
      97           0 :     const SwTxtFtn   *GetAttr() const   { return pAttr; }
      98           0 :           SwTxtFtn   *GetAttr()         { return pAttr; }
      99             : 
     100           0 :     void SetFollow( SwFtnFrm *pNew ) { pFollow = pNew; }
     101           0 :     void SetMaster( SwFtnFrm *pNew ) { pMaster = pNew; }
     102           0 :     void SetRef   ( SwCntntFrm *pNew ) { pRef = pNew; }
     103             : 
     104             :     void InvalidateNxtFtnCnts( SwPageFrm* pPage );
     105             : 
     106           0 :     void LockBackMove()     { bBackMoveLocked = sal_True; }
     107           0 :     void UnlockBackMove()   { bBackMoveLocked = sal_False;}
     108           0 :     sal_Bool IsBackMoveLocked() { return bBackMoveLocked; }
     109             : 
     110             :     // prevents that the last content deletes the SwFtnFrm as well (Cut())
     111           0 :     inline void ColLock()       { mbColLocked = sal_True; }
     112           0 :     inline void ColUnlock()     { mbColLocked = sal_False; }
     113             : 
     114             :     // #i49383#
     115           0 :     inline void UnlockPosOfLowerObjs()
     116             :     {
     117           0 :         mbUnlockPosOfLowerObjs = true;
     118           0 :     }
     119           0 :     inline void KeepLockPosOfLowerObjs()
     120             :     {
     121           0 :         mbUnlockPosOfLowerObjs = false;
     122           0 :     }
     123           0 :     inline bool IsUnlockPosOfLowerObjs()
     124             :     {
     125           0 :         return mbUnlockPosOfLowerObjs;
     126             :     }
     127             : 
     128             :     /** search for last content in the current footnote frame
     129             : 
     130             :         OD 2005-12-02 #i27138#
     131             : 
     132             :         @return SwCntntFrm*
     133             :         pointer to found last content frame. NULL, if none is found.
     134             :     */
     135             :     SwCntntFrm* FindLastCntnt();
     136             : };
     137             : 
     138             : #endif
     139             : 
     140             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10