LCOV - code coverage report
Current view: top level - sw/source/core/inc - frame.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 244 250 97.6 %
Date: 2015-06-13 12:38:46 Functions: 116 118 98.3 %
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_FRAME_HXX
      21             : #define INCLUDED_SW_SOURCE_CORE_INC_FRAME_HXX
      22             : 
      23             : #include <vector>
      24             : #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
      25             : #include <drawinglayer/processor2d/baseprocessor2d.hxx>
      26             : #include <editeng/borderline.hxx>
      27             : #include "swtypes.hxx"
      28             : #include "swrect.hxx"
      29             : #include "calbck.hxx"
      30             : #include <svl/SfxBroadcaster.hxx>
      31             : #include "IDocumentDrawModelAccess.hxx"
      32             : 
      33             : #include <com/sun/star/style/TabStop.hpp>
      34             : 
      35             : class SwLayoutFrm;
      36             : class SwRootFrm;
      37             : class SwPageFrm;
      38             : class SwFlyFrm;
      39             : class SwSectionFrm;
      40             : class SwFootnoteFrm;
      41             : class SwFootnoteBossFrm;
      42             : class SwTabFrm;
      43             : class SwRowFrm;
      44             : class SwFlowFrm;
      45             : class SwContentFrm;
      46             : class SfxPoolItem;
      47             : class SwAttrSet;
      48             : class SwViewShell;
      49             : class Color;
      50             : class SwBorderAttrs;
      51             : class SwCache;
      52             : class SvxBrushItem;
      53             : class XFillStyleItem;
      54             : class XFillGradientItem;
      55             : class SwSelectionList;
      56             : struct SwPosition;
      57             : struct SwCrsrMoveState;
      58             : class SwFormat;
      59             : class SwPrintData;
      60             : class SwSortedObjs;
      61             : class SwAnchoredObject;
      62             : typedef struct _xmlTextWriter *xmlTextWriterPtr;
      63             : 
      64             : // Each FrmType is represented here as a bit.
      65             : // The bits must be set in a way that it can be determined with masking of
      66             : // which kind of FrmType an instance is _and_ from what classes it was derived.
      67             : // Each frame has in its base class a member that must be set by the
      68             : // constructors accordingly.
      69             : #define FRM_ROOT        0x0001
      70             : #define FRM_PAGE        0x0002
      71             : #define FRM_COLUMN      0x0004
      72             : #define FRM_HEADER      0x0008
      73             : #define FRM_FOOTER      0x0010
      74             : #define FRM_FTNCONT     0x0020
      75             : #define FRM_FTN         0x0040
      76             : #define FRM_BODY        0x0080
      77             : #define FRM_FLY         0x0100
      78             : #define FRM_SECTION     0x0200
      79             : #define FRM_UNUSED      0x0400
      80             : #define FRM_TAB         0x0800
      81             : #define FRM_ROW         0x1000
      82             : #define FRM_CELL        0x2000
      83             : #define FRM_TXT         0x4000
      84             : #define FRM_NOTXT       0x8000
      85             : 
      86             : // for internal use some common combinations
      87             : #define FRM_LAYOUT      0x3FFF
      88             : #define FRM_CNTNT       0xC000
      89             : #define FRM_FTNBOSS     0x0006
      90             : #define FRM_ACCESSIBLE (FRM_HEADER|FRM_FOOTER|FRM_FTN|FRM_TXT|FRM_ROOT|FRM_FLY|FRM_TAB|FRM_CELL|FRM_PAGE)
      91             : 
      92             : #define FRM_NEIGHBOUR   0x2004
      93             : #define FRM_NOTE_VERT   0x7a60
      94             : #define FRM_HEADFOOT    0x0018
      95             : #define FRM_BODYFTNC    0x00a0
      96             : 
      97             : class SwFrm;
      98             : typedef long (SwFrm:: *SwFrmGet)() const;
      99             : typedef bool (SwFrm:: *SwFrmMax)( long );
     100             : typedef void (SwFrm:: *SwFrmMakePos)( const SwFrm*, const SwFrm*, bool );
     101             : typedef long (*SwOperator)( long, long );
     102             : typedef void (SwFrm:: *SwFrmSet)( long, long );
     103             : 
     104             : struct SwRectFnCollection
     105             : {
     106             :     SwRectGet     fnGetTop;
     107             :     SwRectGet     fnGetBottom;
     108             :     SwRectGet     fnGetLeft;
     109             :     SwRectGet     fnGetRight;
     110             :     SwRectGet     fnGetWidth;
     111             :     SwRectGet     fnGetHeight;
     112             :     SwRectPoint   fnGetPos;
     113             :     SwRectSize    fnGetSize;
     114             : 
     115             :     SwRectSet     fnSetTop;
     116             :     SwRectSet     fnSetBottom;
     117             :     SwRectSet     fnSetLeft;
     118             :     SwRectSet     fnSetRight;
     119             :     SwRectSet     fnSetWidth;
     120             :     SwRectSet     fnSetHeight;
     121             : 
     122             :     SwRectSet     fnSubTop;
     123             :     SwRectSet     fnAddBottom;
     124             :     SwRectSet     fnSubLeft;
     125             :     SwRectSet     fnAddRight;
     126             :     SwRectSet     fnAddWidth;
     127             :     SwRectSet     fnAddHeight;
     128             : 
     129             :     SwRectSet     fnSetPosX;
     130             :     SwRectSet     fnSetPosY;
     131             : 
     132             :     SwFrmGet      fnGetTopMargin;
     133             :     SwFrmGet      fnGetBottomMargin;
     134             :     SwFrmGet      fnGetLeftMargin;
     135             :     SwFrmGet      fnGetRightMargin;
     136             :     SwFrmSet      fnSetXMargins;
     137             :     SwFrmSet      fnSetYMargins;
     138             :     SwFrmGet      fnGetPrtTop;
     139             :     SwFrmGet      fnGetPrtBottom;
     140             :     SwFrmGet      fnGetPrtLeft;
     141             :     SwFrmGet      fnGetPrtRight;
     142             :     SwRectDist    fnTopDist;
     143             :     SwRectDist    fnBottomDist;
     144             :     SwRectDist    fnLeftDist;
     145             :     SwRectDist    fnRightDist;
     146             :     SwFrmMax      fnSetLimit;
     147             :     SwRectMax     fnOverStep;
     148             : 
     149             :     SwRectSetPos  fnSetPos;
     150             :     SwFrmMakePos  fnMakePos;
     151             :     SwOperator    fnXDiff;
     152             :     SwOperator    fnYDiff;
     153             :     SwOperator    fnXInc;
     154             :     SwOperator    fnYInc;
     155             : 
     156             :     SwRectSetTwice fnSetLeftAndWidth;
     157             :     SwRectSetTwice fnSetTopAndHeight;
     158             : };
     159             : 
     160             : typedef SwRectFnCollection* SwRectFn;
     161             : 
     162             : extern SwRectFn fnRectHori, fnRectVert, fnRectB2T, fnRectVL2R, fnRectVertL2R;
     163             : #define SWRECTFN( pFrm )    bool bVert = pFrm->IsVertical(); \
     164             :                             bool bRev = pFrm->IsReverse(); \
     165             :                             bool bVertL2R = pFrm->IsVertLR(); \
     166             :                             SwRectFn fnRect = bVert ? \
     167             :                                 ( bRev ? fnRectVL2R : ( bVertL2R ? fnRectVertL2R : fnRectVert ) ): \
     168             :                                 ( bRev ? fnRectB2T : fnRectHori );
     169             : #define SWRECTFNX( pFrm )   bool bVertX = pFrm->IsVertical(); \
     170             :                             bool bRevX = pFrm->IsReverse(); \
     171             :                             bool bVertL2RX = pFrm->IsVertLR(); \
     172             :                             SwRectFn fnRectX = bVertX ? \
     173             :                                 ( bRevX ? fnRectVL2R : ( bVertL2RX ? fnRectVertL2R : fnRectVert ) ): \
     174             :                                 ( bRevX ? fnRectB2T : fnRectHori );
     175             : #define SWREFRESHFN( pFrm ) { if( bVert != pFrm->IsVertical() || \
     176             :                                   bRev  != pFrm->IsReverse() ) \
     177             :                                 bVert = pFrm->IsVertical(); \
     178             :                                 bRev = pFrm->IsReverse(); \
     179             :                                 bVertL2R = pFrm->IsVertLR(); \
     180             :                                 fnRect = bVert ? \
     181             :                                     ( bRev ? fnRectVL2R : ( bVertL2R ? fnRectVertL2R : fnRectVert ) ): \
     182             :                                     ( bRev ? fnRectB2T : fnRectHori ); }
     183             : #define SWRECTFN2( pFrm )   bool bVert = pFrm->IsVertical(); \
     184             :                 bool bVertL2R = pFrm->IsVertLR(); \
     185             :                             bool bNeighb = pFrm->IsNeighbourFrm(); \
     186             :                             SwRectFn fnRect = bVert == bNeighb ? \
     187             :                                 fnRectHori : ( bVertL2R ? fnRectVertL2R : fnRectVert );
     188             : 
     189             : #define POS_DIFF( aFrm1, aFrm2 ) \
     190             :             ( (aFrm1.*fnRect->fnGetTop)() != (aFrm2.*fnRect->fnGetTop)() || \
     191             :             (aFrm1.*fnRect->fnGetLeft)() != (aFrm2.*fnRect->fnGetLeft)() )
     192             : 
     193             : // for GetNextLeaf/GetPrevLeaf.
     194             : enum MakePageType
     195             : {
     196             :     MAKEPAGE_NONE,      // do not create page/footnote
     197             :     MAKEPAGE_APPEND,    // only append page if needed
     198             :     MAKEPAGE_INSERT,    // add or append page if needed
     199             :     MAKEPAGE_FTN,       // add footnote if needed
     200             :     MAKEPAGE_NOSECTION  // Don't create section frames
     201             : };
     202             : 
     203             : //UUUU
     204             : namespace drawinglayer { namespace attribute {
     205             :     class SdrAllFillAttributesHelper;
     206             :     typedef std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr;
     207             : }}
     208             : 
     209             : /**
     210             :  * Base class of the Writer layout elements.
     211             :  *
     212             :  * This includes not only fly frames, but everything down to the paragraph
     213             :  * level: pages, headers, footers, etc. (Inside a paragraph SwLinePortion
     214             :  * instances are used.)
     215             :  */
     216             : class SwFrm: public SwClient, public SfxBroadcaster
     217             : {
     218             :     // the hidden Frm
     219             :     friend class SwFlowFrm;
     220             :     friend class SwLayoutFrm;
     221             :     friend class SwLooping;
     222             : 
     223             :     // voids lower during creation of a column
     224             :     friend SwFrm *SaveContent( SwLayoutFrm *, SwFrm* pStart );
     225             :     friend void   RestoreContent( SwFrm *, SwLayoutFrm *, SwFrm *pSibling, bool bGrow );
     226             : 
     227             : #ifdef DBG_UTIL
     228             :     // remove empty SwSectionFrms from a chain
     229             :     friend SwFrm* SwClearDummies( SwFrm* pFrm );
     230             : #endif
     231             : 
     232             :     // for validating a mistakenly invalidated one in SwContentFrm::MakeAll
     233             :     friend void ValidateSz( SwFrm *pFrm );
     234             :     // implemented in text/txtftn.cxx, prevents Footnote oscillation
     235             :     friend void ValidateText( SwFrm *pFrm );
     236             : 
     237             :     friend void MakeNxt( SwFrm *pFrm, SwFrm *pNxt );
     238             : 
     239             :     // cache for (border) attributes
     240             :     static SwCache *mpCache;
     241             : 
     242             :     bool mbIfAccTableShouldDisposing;
     243             :     bool mbInDtor;
     244             : 
     245             :     // #i65250#
     246             :     // frame ID is now in general available - used for layout loop control
     247             :     static sal_uInt32 mnLastFrmId;
     248             :     const  sal_uInt32 mnFrmId;
     249             : 
     250             :     SwRootFrm   *mpRoot;
     251             :     SwLayoutFrm *mpUpper;
     252             :     SwFrm       *mpNext;
     253             :     SwFrm       *mpPrev;
     254             : 
     255             :     SwFrm *_FindNext();
     256             :     SwFrm *_FindPrev();
     257             : 
     258             :     /** method to determine next content frame in the same environment
     259             :         for a flow frame (content frame, table frame, section frame)
     260             : 
     261             :         #i27138# - adding documentation:
     262             :         Travelling downwards through the layout to determine the next content
     263             :         frame in the same environment. There are several environments in a
     264             :         document, which form a closed context regarding this function. These
     265             :         environments are:
     266             :         - Each page header
     267             :         - Each page footer
     268             :         - Each unlinked fly frame
     269             :         - Each group of linked fly frames
     270             :         - All footnotes
     271             :         - All document body frames
     272             :         #i27138# - adding parameter <_bInSameFootnote>
     273             :         Its default value is <false>. If its value is <true>, the environment
     274             :         'All footnotes' is no longer treated. Instead each footnote is treated
     275             :         as an own environment.
     276             : 
     277             :         @param _bInSameFootnote
     278             :         input parameter - boolean indicating, that the found next content
     279             :         frame has to be in the same footnote frame. This parameter is only
     280             :         relevant for flow frames in footnotes.
     281             : 
     282             :         @return SwContentFrm*
     283             :         pointer to the found next content frame. It's NULL, if none exists.
     284             :     */
     285             :     SwContentFrm* _FindNextCnt( const bool _bInSameFootnote = false );
     286             : 
     287             :     /** method to determine previous content frame in the same environment
     288             :         for a flow frame (content frame, table frame, section frame)
     289             : 
     290             :         #i27138#
     291             :         Travelling upwards through the layout to determine the previous content
     292             :         frame in the same environment. There are several environments in a
     293             :         document, which form a closed context regarding this function. These
     294             :         environments are:
     295             :         - Each page header
     296             :         - Each page footer
     297             :         - Each unlinked fly frame
     298             :         - Each group of linked fly frames
     299             :         - All footnotes
     300             :         - All document body frames
     301             :         #i27138# - adding parameter <_bInSameFootnote>
     302             :         Its default value is <false>. If its value is <true>, the environment
     303             :         'All footnotes' is no longer treated. Instead each footnote is treated
     304             :         as an own environment.
     305             : 
     306             :         @param _bInSameFootnote
     307             :         input parameter - boolean indicating, that the found previous content
     308             :         frame has to be in the same footnote frame. This parameter is only
     309             :         relevant for flow frames in footnotes.
     310             : 
     311             :         @return SwContentFrm*
     312             :         pointer to the found previous content frame. It's NULL, if none exists.
     313             :     */
     314             :     SwContentFrm* _FindPrevCnt( const bool _bInSameFootnote = false );
     315             : 
     316             :     void _UpdateAttrFrm( const SfxPoolItem*, const SfxPoolItem*, sal_uInt8 & );
     317             :     SwFrm* _GetIndNext();
     318             :     void SetDirFlags( bool bVert );
     319             : 
     320             :     const SwLayoutFrm* ImplGetNextLayoutLeaf( bool bFwd ) const;
     321             : 
     322             : protected:
     323             :     SwSortedObjs* mpDrawObjs;    // draw objects, can be 0
     324             : 
     325             :     SwRect  maFrm;   // absolute position in document and size of the Frm
     326             :     SwRect  maPrt;   // position relatively to Frm and size of PrtArea
     327             : 
     328             :     sal_uInt16 mnFrmType;  //Who am I?
     329             : 
     330             :     bool mbReverse     : 1; // Next line above/at the right side instead
     331             :                                  // under/at the left side of the previous line
     332             :     bool mbInvalidR2L  : 1;
     333             :     bool mbDerivedR2L  : 1;
     334             :     bool mbRightToLeft : 1;
     335             :     bool mbInvalidVert : 1;
     336             :     bool mbDerivedVert : 1;
     337             :     bool mbVertical    : 1;
     338             : 
     339             :     bool mbVertLR      : 1;
     340             : 
     341             :     bool mbValidPos      : 1;
     342             :     bool mbValidPrtArea  : 1;
     343             :     bool mbValidSize     : 1;
     344             :     bool mbValidLineNum  : 1;
     345             :     bool mbFixSize       : 1;
     346             :     // if true, frame will be painted completely even content was changed
     347             :     // only partially. For ContentFrms a border (from Action) will exclusively
     348             :     // painted if <mbCompletePaint> is true.
     349             :     bool mbCompletePaint : 1;
     350             :     bool mbRetouche      : 1; // frame is responsible for retouching
     351             : 
     352             :     bool mbInfInvalid    : 1;  // InfoFlags are invalid
     353             :     bool mbInfBody       : 1;  // Frm is in document body
     354             :     bool mbInfTab        : 1;  // Frm is in a table
     355             :     bool mbInfFly        : 1;  // Frm is in a Fly
     356             :     bool mbInfFootnote        : 1;  // Frm is in a footnote
     357             :     bool mbInfSct        : 1;  // Frm is in a section
     358             :     bool mbColLocked     : 1;  // lock Grow/Shrink for column-wise section
     359             :                                   // or fly frames, will be set in Format
     360             :     bool m_isInDestroy : 1;
     361             :     bool mbForbidDelete : 1;
     362             : 
     363        9193 :     void ColLock()      { mbColLocked = true; }
     364        9193 :     void ColUnlock()    { mbColLocked = false; }
     365             : 
     366             :     virtual void DestroyImpl();
     367             :     virtual ~SwFrm();
     368             : 
     369             :     // Only used by SwRootFrm Ctor to get 'this' into mpRoot...
     370        3042 :     void setRootFrm( SwRootFrm* pRoot ) { mpRoot = pRoot; }
     371             : 
     372             :     SwPageFrm *InsertPage( SwPageFrm *pSibling, bool bFootnote );
     373             :     void PrepareMake();
     374             :     void OptPrepareMake();
     375             :     void MakePos();
     376             :     // Format next frame of table frame to assure keeping attributes.
     377             :     // In case of nested tables method <SwFrm::MakeAll()> is called to
     378             :     // avoid formatting of superior table frame.
     379             :     friend SwFrm* sw_FormatNextContentForKeep( SwTabFrm* pTabFrm );
     380             : 
     381             :     virtual void MakeAll() = 0;
     382             :     // adjust frames of a page
     383             :     SwTwips AdjustNeighbourhood( SwTwips nDiff, bool bTst = false );
     384             : 
     385             :     // change only frame size not the size of PrtArea
     386             :     virtual SwTwips ShrinkFrm( SwTwips, bool bTst = false, bool bInfo = false ) = 0;
     387             :     virtual SwTwips GrowFrm  ( SwTwips, bool bTst = false, bool bInfo = false ) = 0;
     388             : 
     389    80052812 :     SwModify        *GetDep()       { return GetRegisteredInNonConst(); }
     390   278719444 :     const SwModify  *GetDep() const { return GetRegisteredIn(); }
     391             : 
     392             :     SwFrm( SwModify*, SwFrm* );
     393             : 
     394             :     void CheckDir( sal_uInt16 nDir, bool bVert, bool bOnlyBiDi, bool bBrowse );
     395             : 
     396             :     /** enumeration for the different invalidations
     397             :         #i28701#
     398             :     */
     399             :     enum InvalidationType
     400             :     {
     401             :         INVALID_SIZE, INVALID_PRTAREA, INVALID_POS, INVALID_LINENUM, INVALID_ALL
     402             :     };
     403             : 
     404             :     /** method to determine, if an invalidation is allowed.
     405             :         #i28701
     406             :     */
     407             :     virtual bool _InvalidationAllowed( const InvalidationType _nInvalid ) const;
     408             : 
     409             :     /** method to perform additional actions on an invalidation
     410             : 
     411             :         #i28701#
     412             :         Method has *only* to contain actions, which has to be performed on
     413             :         *every* assignment of the corresponding flag to <false>.
     414             :     */
     415             :     virtual void _ActionOnInvalidation( const InvalidationType _nInvalid );
     416             : 
     417             :     // draw shadow and borders
     418             :     void PaintShadow( const SwRect&, SwRect&, const SwBorderAttrs& ) const;
     419             :     virtual void  Modify( const SfxPoolItem*, const SfxPoolItem* ) SAL_OVERRIDE;
     420             : 
     421             :     virtual const IDocumentDrawModelAccess* getIDocumentDrawModelAccess( );
     422             : 
     423             : public:
     424           0 :     virtual css::uno::Sequence< css::style::TabStop > GetTabStopInfo( SwTwips )
     425             :     {
     426           0 :         return css::uno::Sequence< css::style::TabStop >();
     427             :     }
     428             : 
     429             :     TYPEINFO_OVERRIDE(); // already in base class
     430             : 
     431   914001312 :     sal_uInt16 GetType() const { return mnFrmType; }
     432             : 
     433      431757 :     static SwCache &GetCache()                { return *mpCache; }
     434          59 :     static SwCache *GetCachePtr()             { return mpCache;  }
     435          59 :     static void     SetCache( SwCache *pNew ) { mpCache = pNew;  }
     436             : 
     437             :     // change PrtArea size and FrmSize
     438             :     SwTwips Shrink( SwTwips, bool bTst = false, bool bInfo = false );
     439             :     SwTwips Grow  ( SwTwips, bool bTst = false, bool bInfo = false );
     440             : 
     441             :     // different methods for inserting in layout tree (for performance reasons)
     442             : 
     443             :     // insert before pBehind or at the end of the chain below mpUpper
     444             :     void InsertBefore( SwLayoutFrm* pParent, SwFrm* pBehind );
     445             :     // insert after pBefore or at the beginning of the chain below mpUpper
     446             :     void InsertBehind( SwLayoutFrm *pParent, SwFrm *pBefore );
     447             :     // insert before pBehind or at the end of the chain while considering
     448             :     // the siblings of pSct
     449             :     bool InsertGroupBefore( SwFrm* pParent, SwFrm* pWhere, SwFrm* pSct );
     450             :     void RemoveFromLayout();
     451             : 
     452             :     // For internal use only - who ignores this will be put in a sack and has
     453             :     // to stay there for two days
     454             :     // Does special treatment for _Get[Next|Prev]Leaf() (for tables).
     455             :     SwLayoutFrm *GetLeaf( MakePageType eMakePage, bool bFwd );
     456             :     SwLayoutFrm *GetNextLeaf   ( MakePageType eMakePage );
     457             :     SwLayoutFrm *GetNextFootnoteLeaf( MakePageType eMakePage );
     458             :     SwLayoutFrm *GetNextSctLeaf( MakePageType eMakePage );
     459             :     SwLayoutFrm *GetNextCellLeaf( MakePageType eMakePage );
     460             :     SwLayoutFrm *GetPrevLeaf   ( MakePageType eMakeFootnote = MAKEPAGE_FTN );
     461             :     SwLayoutFrm *GetPrevFootnoteLeaf( MakePageType eMakeFootnote = MAKEPAGE_FTN );
     462             :     SwLayoutFrm *GetPrevSctLeaf( MakePageType eMakeFootnote = MAKEPAGE_FTN );
     463             :     SwLayoutFrm *GetPrevCellLeaf( MakePageType eMakeFootnote = MAKEPAGE_FTN );
     464             :     const SwLayoutFrm *GetLeaf ( MakePageType eMakePage, bool bFwd,
     465             :                                  const SwFrm *pAnch ) const;
     466             : 
     467             :     bool WrongPageDesc( SwPageFrm* pNew );
     468             : 
     469             :     //#i28701# - new methods to append/remove drawing objects
     470             :     void AppendDrawObj( SwAnchoredObject& _rNewObj );
     471             :     void RemoveDrawObj( SwAnchoredObject& _rToRemoveObj );
     472             : 
     473             :     // work with chain of FlyFrms
     474             :     void  AppendFly( SwFlyFrm *pNew );
     475             :     void  RemoveFly( SwFlyFrm *pToRemove );
     476   273447024 :     const SwSortedObjs *GetDrawObjs() const { return mpDrawObjs; }
     477     1373012 :           SwSortedObjs *GetDrawObjs()         { return mpDrawObjs; }
     478             :     // #i28701# - change purpose of method and adjust its name
     479             :     void InvalidateObjs( const bool _bInvaPosOnly,
     480             :                          const bool _bNoInvaOfAsCharAnchoredObjs = true );
     481             : 
     482             :     virtual void PaintBorder( const SwRect&, const SwPageFrm *pPage,
     483             :                               const SwBorderAttrs & ) const;
     484             :     void PaintBaBo( const SwRect&, const SwPageFrm *pPage = 0,
     485             :                     const bool bLowerBorder = false, const bool bOnlyTextBackground = false ) const;
     486             :     void PaintBackground( const SwRect&, const SwPageFrm *pPage,
     487             :                           const SwBorderAttrs &,
     488             :                           const bool bLowerMode = false,
     489             :                           const bool bLowerBorder = false,
     490             :                           const bool bOnlyTextBackground = false ) const;
     491             :     void PaintBorderLine( const SwRect&, const SwRect&, const SwPageFrm*,
     492             :                           const Color *pColor, const editeng::SvxBorderStyle =
     493             :                 ::com::sun::star::table::BorderLineStyle::SOLID ) const;
     494             : 
     495             :     drawinglayer::processor2d::BaseProcessor2D * CreateProcessor2D( ) const;
     496             :     void ProcessPrimitives( const drawinglayer::primitive2d::Primitive2DSequence& rSequence ) const;
     497             : 
     498             :     // FIXME: EasyHack (refactoring): rename method name in all files
     499             :     // retouch, not in the area of the given Rect!
     500             :     void Retouche( const SwPageFrm *pPage, const SwRect &rRect ) const;
     501             : 
     502             :     bool GetBackgroundBrush(
     503             :         drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes,
     504             :         const SvxBrushItem*& rpBrush,
     505             :         const Color*& rpColor,
     506             :         SwRect &rOrigRect,
     507             :         bool bLowerMode ) const;
     508             : 
     509             :     inline void SetCompletePaint() const;
     510             :     inline void ResetCompletePaint() const;
     511      317313 :     inline bool IsCompletePaint() const { return mbCompletePaint; }
     512             : 
     513             :     inline void SetRetouche() const;
     514             :     inline void ResetRetouche() const;
     515       73523 :     inline bool IsRetouche() const { return mbRetouche; }
     516             : 
     517             :     void SetInfFlags();
     518           6 :     inline void InvalidateInfFlags() { mbInfInvalid = true; }
     519             :     inline bool IsInDocBody() const;    // use InfoFlags, determine flags
     520             :     inline bool IsInFootnote() const;        // if necessary
     521             :     inline bool IsInTab() const;
     522             :     inline bool IsInFly() const;
     523             :     inline bool IsInSct() const;
     524             : 
     525             :     // If frame is inside a split table row, this function returns
     526             :     // the corresponding row frame in the follow table.
     527             :     const SwRowFrm* IsInSplitTableRow() const;
     528             : 
     529             :     // If frame is inside a follow flow row, this function returns
     530             :     // the corresponding row frame master table
     531             :     const SwRowFrm* IsInFollowFlowRow() const;
     532             : 
     533             :     bool IsInBalancedSection() const;
     534             : 
     535     3772903 :     inline bool IsReverse() const { return mbReverse; }
     536             :     inline void SetReverse( bool bNew ){ mbReverse = bNew; }
     537             :     inline bool IsVertical() const;
     538             : 
     539             :     inline bool IsVertLR() const;
     540       14094 :     inline bool GetVerticalFlag() const { return mbVertical; }
     541             :     inline void SetVertical( bool bNew ){ mbVertical = bNew; }
     542             : 
     543             :     inline void SetbVertLR( bool bNew ) { mbVertLR = bNew; }
     544        6652 :     inline void SetDerivedVert( bool bNew ){ mbDerivedVert = bNew; }
     545      170516 :     inline void SetInvalidVert( bool bNew) { mbInvalidVert = bNew; }
     546             :     inline bool IsRightToLeft() const;
     547       14094 :     inline bool GetRightToLeftFlag() const { return mbRightToLeft; }
     548             :     inline void SetRightToLeft( bool bNew ){ mbRightToLeft = bNew; }
     549        5165 :     inline void SetDerivedR2L( bool bNew ) { mbDerivedR2L  = bNew; }
     550       14094 :     inline void SetInvalidR2L( bool bNew ) { mbInvalidR2L  = bNew; }
     551             : 
     552             :     void CheckDirChange();
     553             :     // returns upper left frame position for LTR and
     554             :     // upper right frame position for Asian / RTL frames
     555             :     Point   GetFrmAnchorPos( bool bIgnoreFlysAnchoredAtThisFrame ) const;
     556             : 
     557             :     /** determine, if frame is moveable in given environment
     558             : 
     559             :         method replaced 'old' method <bool IsMoveable() const>.
     560             :         Determines, if frame is moveable in given environment. if no environment
     561             :         is given (parameter _pLayoutFrm == 0L), the movability in the actual
     562             :         environment (<this->GetUpper()) is checked.
     563             : 
     564             :         @param _pLayoutFrm
     565             :         input parameter - given environment (layout frame), in which the movability
     566             :         will be checked. If not set ( == 0L ), actual environment is taken.
     567             : 
     568             :         @return boolean, indicating, if frame is moveable in given environment
     569             :     */
     570             :     bool IsMoveable( const SwLayoutFrm* _pLayoutFrm = 0L ) const;
     571             : 
     572             :     // Is it permitted for the (Text)Frm to add a footnote in the current
     573             :     // environment (not e.g. for repeating table headlines)
     574             :     bool IsFootnoteAllowed() const;
     575             : 
     576             :     virtual void  Format( const SwBorderAttrs *pAttrs = 0 );
     577             : 
     578             :     virtual void CheckDirection( bool bVert );
     579             : 
     580             :     void ReinitializeFrmSizeAttrFlags();
     581             : 
     582             :     const SwAttrSet *GetAttrSet() const;
     583             : 
     584      163737 :     inline bool HasFixSize() const { return mbFixSize; }
     585             :     inline void SetFixSize( bool bNew ) { mbFixSize = bNew; }
     586             : 
     587             :     // check all pages (starting from the given) and correct them if needed
     588             :     static void CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields = true, SwPageFrm** ppPrev = 0);
     589             : 
     590             :     // might return 0, with and without const
     591   175584198 :     SwFrm               *GetNext()  { return mpNext; }
     592      902037 :     SwFrm               *GetPrev()  { return mpPrev; }
     593    19958281 :     SwLayoutFrm         *GetUpper() { return mpUpper; }
     594     2017776 :     SwRootFrm           *getRootFrm(){ return mpRoot; }
     595             :     SwPageFrm           *FindPageFrm();
     596             :     SwFrm               *FindColFrm();
     597             :     SwRowFrm            *FindRowFrm();
     598             :     SwFootnoteBossFrm        *FindFootnoteBossFrm( bool bFootnotes = false );
     599             :     SwTabFrm            *ImplFindTabFrm();
     600             :     SwFootnoteFrm            *ImplFindFootnoteFrm();
     601             :     SwFlyFrm            *ImplFindFlyFrm();
     602             :     SwSectionFrm        *ImplFindSctFrm();
     603             :     SwFrm               *FindFooterOrHeader();
     604             :     SwFrm               *GetLower();
     605  1042251295 :     const SwFrm         *GetNext()  const { return mpNext; }
     606     3581344 :     const SwFrm         *GetPrev()  const { return mpPrev; }
     607  1033498685 :     const SwLayoutFrm   *GetUpper() const { return mpUpper; }
     608     1451785 :     const SwRootFrm     *getRootFrm()   const { return mpRoot; }
     609             :     inline SwTabFrm     *FindTabFrm();
     610             :     inline SwFootnoteFrm     *FindFootnoteFrm();
     611             :     inline SwFlyFrm     *FindFlyFrm();
     612             :     inline SwSectionFrm *FindSctFrm();
     613             :     inline SwFrm        *FindNext();
     614             :     // #i27138# - add parameter <_bInSameFootnote>
     615             :     SwContentFrm* FindNextCnt( const bool _bInSameFootnote = false );
     616             :     inline SwFrm        *FindPrev();
     617             :     inline const SwPageFrm *FindPageFrm() const;
     618             :     inline const SwFootnoteBossFrm *FindFootnoteBossFrm( bool bFootnote = false ) const;
     619             :     inline const SwFrm     *FindColFrm() const;
     620             :     inline const SwFrm     *FindFooterOrHeader() const;
     621             :     inline const SwTabFrm  *FindTabFrm() const;
     622             :     inline const SwFootnoteFrm  *FindFootnoteFrm() const;
     623             :     inline const SwFlyFrm  *FindFlyFrm() const;
     624             :     inline const SwSectionFrm *FindSctFrm() const;
     625             :     inline const SwFrm     *FindNext() const;
     626             :     // #i27138# - add parameter <_bInSameFootnote>
     627             :     const SwContentFrm* FindNextCnt( const bool _bInSameFootnote = false ) const;
     628             :     inline const SwFrm     *FindPrev() const;
     629             :            const SwFrm     *GetLower()  const;
     630             : 
     631             :     SwContentFrm* FindPrevCnt( const bool _bInSameFootnote = false );
     632             : 
     633             :     const SwContentFrm* FindPrevCnt( const bool _bInSameFootnote = false ) const;
     634             : 
     635             :     // #i79774#
     636             :     SwFrm* _GetIndPrev() const;
     637      260700 :     SwFrm* GetIndPrev() const
     638      260700 :         { return ( mpPrev || !IsInSct() ) ? mpPrev : _GetIndPrev(); }
     639             : 
     640      204712 :     SwFrm* GetIndNext()
     641      204712 :         { return ( mpNext || !IsInSct() ) ? mpNext : _GetIndNext(); }
     642             :     const SwFrm* GetIndNext() const { return const_cast<SwFrm*>(this)->GetIndNext(); }
     643             : 
     644             :     sal_uInt16 GetPhyPageNum() const;   // page number without offset
     645             :     sal_uInt16 GetVirtPageNum() const;  // page number with offset
     646       15420 :     bool OnRightPage() const { return 0 != GetPhyPageNum() % 2; };
     647             :     bool WannaRightPage() const;
     648             :     bool OnFirstPage() const;
     649             : 
     650             :     inline const  SwLayoutFrm *GetPrevLayoutLeaf() const;
     651             :     inline const  SwLayoutFrm *GetNextLayoutLeaf() const;
     652             :     inline SwLayoutFrm *GetPrevLayoutLeaf();
     653             :     inline SwLayoutFrm *GetNextLayoutLeaf();
     654             : 
     655             :     virtual void Calc() const;      // here might be "formatted"
     656             :     inline void OptCalc() const;    // here we assume (for optimization) that
     657             :                                     // the predecessors are already formatted
     658             : 
     659             :     Point   GetRelPos() const;
     660     4721870 :     const  SwRect &Frm() const { return maFrm; }
     661     1734207 :     const  SwRect &Prt() const { return maPrt; }
     662             : 
     663             :     // PaintArea is the area where content might be displayed.
     664             :     // The margin of a page or the space between columns belongs to it.
     665             :     const SwRect PaintArea() const;
     666             :     // UnionFrm is the union of Frm- and PrtArea, normally identical
     667             :     // to the FrmArea except in case of negative Prt margins.
     668             :     const SwRect UnionFrm( bool bBorder = false ) const;
     669             : 
     670             :     // HACK: Here we exceptionally allow direct access to members.
     671             :     // This should not delude into changing those value randomly; it is the
     672             :     // only option to circumvent compiler problems (same method with public
     673             :     // and protected).
     674     7150824 :     SwRect &Frm() { return maFrm; }
     675     4831577 :     SwRect &Prt() { return maPrt; }
     676             : 
     677             :     virtual Size ChgSize( const Size& aNewSize );
     678             : 
     679             :     virtual void Cut() = 0;
     680             :     //Add a method to change the acc table dispose state.
     681         644 :     void SetAccTableDispose(bool bDispose) { mbIfAccTableShouldDisposing = bDispose;}
     682             :     virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 ) = 0;
     683             : 
     684       36445 :     void ValidateLineNum() { mbValidLineNum = true; }
     685             : 
     686       12640 :     bool GetValidPosFlag()    const { return mbValidPos; }
     687       10669 :     bool GetValidPrtAreaFlag()const { return mbValidPrtArea; }
     688      182670 :     bool GetValidSizeFlag()   const { return mbValidSize; }
     689      106532 :     bool GetValidLineNumFlag()const { return mbValidLineNum; }
     690     1131888 :     bool IsValid() const { return mbValidPos && mbValidSize && mbValidPrtArea; }
     691             : 
     692             :     // Only invalidate Frm
     693             :     // #i28701# - add call to method <_ActionOnInvalidation(..)>
     694             :     //            for all invalidation methods.
     695             :     // #i28701# - use method <_InvalidationAllowed(..)> to
     696             :     //            decide, if invalidation will to be performed or not.
     697             :     // #i26945# - no additional invalidation, if it's already
     698             :     //            invalidate.
     699       81617 :     void _InvalidateSize()
     700             :     {
     701       81617 :         if ( mbValidSize && _InvalidationAllowed( INVALID_SIZE ) )
     702             :         {
     703       14889 :             mbValidSize = false;
     704       14889 :             _ActionOnInvalidation( INVALID_SIZE );
     705             :         }
     706       81617 :     }
     707       73775 :     void _InvalidatePrt()
     708             :     {
     709       73775 :         if ( mbValidPrtArea && _InvalidationAllowed( INVALID_PRTAREA ) )
     710             :         {
     711       26652 :             mbValidPrtArea = false;
     712       26652 :             _ActionOnInvalidation( INVALID_PRTAREA );
     713             :         }
     714       73775 :     }
     715       75239 :     void _InvalidatePos()
     716             :     {
     717       75239 :         if ( mbValidPos && _InvalidationAllowed( INVALID_POS ) )
     718             :         {
     719       16537 :             mbValidPos = false;
     720       16537 :             _ActionOnInvalidation( INVALID_POS );
     721             :         }
     722       75239 :     }
     723       37322 :     void _InvalidateLineNum()
     724             :     {
     725       37322 :         if ( mbValidLineNum && _InvalidationAllowed( INVALID_LINENUM ) )
     726             :         {
     727        2415 :             mbValidLineNum = false;
     728        2415 :             _ActionOnInvalidation( INVALID_LINENUM );
     729             :         }
     730       37322 :     }
     731      101900 :     void _InvalidateAll()
     732             :     {
     733      143038 :         if ( ( mbValidSize || mbValidPrtArea || mbValidPos ) &&
     734       41138 :              _InvalidationAllowed( INVALID_ALL ) )
     735             :         {
     736       41138 :             mbValidSize = mbValidPrtArea = mbValidPos = false;
     737       41138 :             _ActionOnInvalidation( INVALID_ALL );
     738             :         }
     739      101900 :     }
     740             :     // also notify page at the same time
     741             :     inline void InvalidateSize();
     742             :     inline void InvalidatePrt();
     743             :     inline void InvalidatePos();
     744             :     inline void InvalidateLineNum();
     745             :     inline void InvalidateAll();
     746             :     void ImplInvalidateSize();
     747             :     void ImplInvalidatePrt();
     748             :     void ImplInvalidatePos();
     749             :     void ImplInvalidateLineNum();
     750             : 
     751             :     inline void InvalidateNextPos( bool bNoFootnote = false );
     752             :     void ImplInvalidateNextPos( bool bNoFootnote = false );
     753             : 
     754             :     /** method to invalidate printing area of next frame
     755             :         #i11859#
     756             :     */
     757             :     void InvalidateNextPrtArea();
     758             : 
     759             :     void InvalidatePage( const SwPageFrm *pPage = 0 ) const;
     760             : 
     761             :     virtual bool    FillSelection( SwSelectionList& rList, const SwRect& rRect ) const;
     762             : 
     763             :     virtual bool    GetCrsrOfst( SwPosition *, Point&,
     764             :                                  SwCrsrMoveState* = 0, bool bTestBackground = false ) const;
     765             :     virtual bool    GetCharRect( SwRect &, const SwPosition&,
     766             :                                  SwCrsrMoveState* = 0 ) const;
     767             :     virtual void Paint( SwRect const&,
     768             :                         SwPrintData const*const pPrintData = NULL ) const;
     769             : 
     770             :     // HACK: shortcut between frame and formatting
     771             :     // It's your own fault if you cast void* incorrectly! In any case check
     772             :     // the void* for 0.
     773             :     virtual bool Prepare( const PrepareHint ePrep = PREP_CLEAR,
     774             :                           const void *pVoid = 0, bool bNotify = true );
     775             : 
     776             :     // true if it is the correct class, false otherwise
     777             :     inline bool IsLayoutFrm() const;
     778             :     inline bool IsRootFrm() const;
     779             :     inline bool IsPageFrm() const;
     780             :     inline bool IsColumnFrm() const;
     781             :     inline bool IsFootnoteBossFrm() const;  // footnote bosses might be PageFrms or ColumnFrms
     782             :     inline bool IsHeaderFrm() const;
     783             :     inline bool IsFooterFrm() const;
     784             :     inline bool IsFootnoteContFrm() const;
     785             :     inline bool IsFootnoteFrm() const;
     786             :     inline bool IsBodyFrm() const;
     787             :     inline bool IsColBodyFrm() const;  // implemented in layfrm.hxx, BodyFrm above ColumnFrm
     788             :     inline bool IsPageBodyFrm() const; // implemented in layfrm.hxx, BodyFrm above PageFrm
     789             :     inline bool IsFlyFrm() const;
     790             :     inline bool IsSctFrm() const;
     791             :     inline bool IsTabFrm() const;
     792             :     inline bool IsRowFrm() const;
     793             :     inline bool IsCellFrm() const;
     794             :     inline bool IsContentFrm() const;
     795             :     inline bool IsTextFrm() const;
     796             :     inline bool IsNoTextFrm() const;
     797             :     // Frms where its PrtArea depends on their neighbors and that are
     798             :     // positioned in the content flow
     799             :     inline bool IsFlowFrm() const;
     800             :     // Frms that are capable of retouching or that might need to retouch behind
     801             :     // themselves
     802             :     inline bool IsRetoucheFrm() const;
     803             :     inline bool IsAccessibleFrm() const;
     804             : 
     805             :     void PrepareCrsr();                 // CrsrShell is allowed to call this
     806             : 
     807             :     // Is the Frm (or the section containing it) protected? Same for Fly in
     808             :     // Fly in ... and footnotes
     809             :     bool IsProtected() const;
     810             : 
     811       59576 :     bool IsColLocked()  const { return mbColLocked; }
     812       69367 :     bool IsDeleteForbidden()  const { return mbForbidDelete; }
     813             : 
     814             :     /// this is the only way to delete a SwFrm instance
     815             :     static void DestroyFrm(SwFrm *const pFrm);
     816             : 
     817        1599 :     bool IsInDtor() const { return mbInDtor; }
     818             : 
     819             :     // No inline cause we need the function pointers
     820             :     long GetTopMargin() const;
     821             :     long GetBottomMargin() const;
     822             :     long GetLeftMargin() const;
     823             :     long GetRightMargin() const;
     824             :     void SetTopBottomMargins( long, long );
     825             :     void SetBottomTopMargins( long, long );
     826             :     void SetLeftRightMargins( long, long );
     827             :     void SetRightLeftMargins( long, long );
     828             :     void SetLeftAndWidth( long nLeft, long nWidth );
     829             :     void SetTopAndHeight( long nTop, long nHeight );
     830             :     void SetRightAndWidth( long nRight, long nWidth );
     831             :     void SetBottomAndHeight( long nBottom, long nHeight );
     832             :     long GetPrtLeft() const;
     833             :     long GetPrtBottom() const;
     834             :     long GetPrtRight() const;
     835             :     long GetPrtTop() const;
     836             :     bool SetMinLeft( long );
     837             :     bool SetMaxBottom( long );
     838             :     bool SetMaxRight( long );
     839             :     bool SetMinTop( long );
     840             :     void MakeBelowPos( const SwFrm*, const SwFrm*, bool );
     841             :     void MakeUpperPos( const SwFrm*, const SwFrm*, bool );
     842             :     void MakeLeftPos( const SwFrm*, const SwFrm*, bool );
     843             :     void MakeRightPos( const SwFrm*, const SwFrm*, bool );
     844      312923 :     inline bool IsNeighbourFrm() const
     845      312923 :         { return (GetType() & FRM_NEIGHBOUR) != 0; }
     846             : 
     847             :     // #i65250#
     848       13097 :     inline sal_uInt32 GetFrmId() const { return mnFrmId; }
     849             :     static inline sal_uInt32 GetLastFrmId() { return mnLastFrmId; }
     850             : 
     851             :     // NEW TABELS
     852             :     // Some functions for covered/covering table cells. This way unnessessary
     853             :     // includes can be avoided
     854             :     bool IsLeaveUpperAllowed() const;
     855             :     bool IsCoveredCell() const;
     856             :     bool IsInCoveredCell() const;
     857             : 
     858             :     // #i81146# new loop control
     859             :     bool KnowsFormat( const SwFormat& rFormat ) const;
     860             :     void RegisterToFormat( SwFormat& rFormat );
     861             :     void ValidateThisAndAllLowers( const sal_uInt16 nStage );
     862             : 
     863      101113 :     void ForbidDelete()      { mbForbidDelete = true; }
     864      101038 :     void AllowDelete()    { mbForbidDelete = false; }
     865             : 
     866             :     //UUUU
     867             :     drawinglayer::attribute::SdrAllFillAttributesHelperPtr getSdrAllFillAttributesHelper() const;
     868             :     bool supportsFullDrawingLayerFillAttributeSet() const;
     869             : 
     870             : public:
     871             :     // if writer is NULL, dumps the layout structure as XML in layout.xml
     872             :     virtual void dumpAsXml(xmlTextWriterPtr writer = NULL) const;
     873             :     void dumpInfosAsXml(xmlTextWriterPtr writer) const;
     874             :     virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const;
     875             :     void dumpChildrenAsXml(xmlTextWriterPtr writer) const;
     876             :     bool IsCollapse() const;
     877             : };
     878             : 
     879     2314158 : inline bool SwFrm::IsInDocBody() const
     880             : {
     881     2314158 :     if ( mbInfInvalid )
     882        7747 :         const_cast<SwFrm*>(this)->SetInfFlags();
     883     2314158 :     return mbInfBody;
     884             : }
     885     1337411 : inline bool SwFrm::IsInFootnote() const
     886             : {
     887     1337411 :     if ( mbInfInvalid )
     888        1561 :         const_cast<SwFrm*>(this)->SetInfFlags();
     889     1337411 :     return mbInfFootnote;
     890             : }
     891     2465362 : inline bool SwFrm::IsInTab() const
     892             : {
     893     2465362 :     if ( mbInfInvalid )
     894       25109 :         const_cast<SwFrm*>(this)->SetInfFlags();
     895     2465362 :     return mbInfTab;
     896             : }
     897     1172081 : inline bool SwFrm::IsInFly() const
     898             : {
     899     1172081 :     if ( mbInfInvalid )
     900       14593 :         const_cast<SwFrm*>(this)->SetInfFlags();
     901     1172081 :     return mbInfFly;
     902             : }
     903     1360490 : inline bool SwFrm::IsInSct() const
     904             : {
     905     1360490 :     if ( mbInfInvalid )
     906       26069 :         const_cast<SwFrm*>(this)->SetInfFlags();
     907     1360490 :     return mbInfSct;
     908             : }
     909     7572016 : bool SwFrm::IsVertical() const
     910             : {
     911     7572016 :     if( mbInvalidVert )
     912     1737577 :         const_cast<SwFrm*>(this)->SetDirFlags( true );
     913     7572016 :     return mbVertical;
     914             : }
     915     3873939 : inline bool SwFrm::IsVertLR() const
     916             : {
     917     3873939 :     return mbVertLR;
     918             : }
     919     3732296 : inline bool SwFrm::IsRightToLeft() const
     920             : {
     921     3732296 :     if( mbInvalidR2L )
     922       68265 :         const_cast<SwFrm*>(this)->SetDirFlags( false );
     923     3732296 :     return mbRightToLeft;
     924             : }
     925             : 
     926      266555 : inline void SwFrm::SetCompletePaint() const
     927             : {
     928      266555 :     const_cast<SwFrm*>(this)->mbCompletePaint = true;
     929      266555 : }
     930       73794 : inline void SwFrm::ResetCompletePaint() const
     931             : {
     932       73794 :     const_cast<SwFrm*>(this)->mbCompletePaint = false;
     933       73794 : }
     934             : 
     935      102074 : inline void SwFrm::SetRetouche() const
     936             : {
     937      102074 :     const_cast<SwFrm*>(this)->mbRetouche = true;
     938      102074 : }
     939        9222 : inline void SwFrm::ResetRetouche() const
     940             : {
     941        9222 :     const_cast<SwFrm*>(this)->mbRetouche = false;
     942        9222 : }
     943             : 
     944        7033 : inline SwLayoutFrm *SwFrm::GetNextLayoutLeaf()
     945             : {
     946        7033 :     return const_cast<SwLayoutFrm*>(static_cast<const SwFrm*>(this)->GetNextLayoutLeaf());
     947             : }
     948       72424 : inline SwLayoutFrm *SwFrm::GetPrevLayoutLeaf()
     949             : {
     950       72424 :     return const_cast<SwLayoutFrm*>(static_cast<const SwFrm*>(this)->GetPrevLayoutLeaf());
     951             : }
     952       35442 : inline const SwLayoutFrm *SwFrm::GetNextLayoutLeaf() const
     953             : {
     954       35442 :     return ImplGetNextLayoutLeaf( true );
     955             : }
     956       72433 : inline const SwLayoutFrm *SwFrm::GetPrevLayoutLeaf() const
     957             : {
     958       72433 :     return ImplGetNextLayoutLeaf( false );
     959             : }
     960             : 
     961      144662 : inline void SwFrm::InvalidateSize()
     962             : {
     963      144662 :     if ( mbValidSize )
     964       26331 :         ImplInvalidateSize();
     965      144662 : }
     966       47878 : inline void SwFrm::InvalidatePrt()
     967             : {
     968       47878 :     if ( mbValidPrtArea )
     969       39073 :         ImplInvalidatePrt();
     970       47878 : }
     971      142632 : inline void SwFrm::InvalidatePos()
     972             : {
     973      142632 :     if ( mbValidPos )
     974       31003 :         ImplInvalidatePos();
     975      142632 : }
     976       31979 : inline void SwFrm::InvalidateLineNum()
     977             : {
     978       31979 :     if ( mbValidLineNum )
     979        2240 :         ImplInvalidateLineNum();
     980       31979 : }
     981        1736 : inline void SwFrm::InvalidateAll()
     982             : {
     983        1736 :     if ( _InvalidationAllowed( INVALID_ALL ) )
     984             :     {
     985        1736 :         if ( mbValidPrtArea && mbValidSize && mbValidPos  )
     986         753 :             ImplInvalidatePos();
     987        1736 :         mbValidPrtArea = mbValidSize = mbValidPos = false;
     988             : 
     989             :         // #i28701#
     990        1736 :         _ActionOnInvalidation( INVALID_ALL );
     991             :     }
     992        1736 : }
     993       87716 : inline void SwFrm::InvalidateNextPos( bool bNoFootnote )
     994             : {
     995       87716 :     if ( mpNext && !mpNext->IsSctFrm() )
     996        4194 :         mpNext->InvalidatePos();
     997             :     else
     998       83522 :         ImplInvalidateNextPos( bNoFootnote );
     999       87716 : }
    1000             : 
    1001    27450125 : inline void SwFrm::Calc() const
    1002             : {
    1003    27450125 :     if ( !mbValidPos || !mbValidPrtArea || !mbValidSize )
    1004      123418 :         const_cast<SwFrm*>(this)->PrepareMake();
    1005    27450125 : }
    1006      131076 : inline void SwFrm::OptCalc() const
    1007             : {
    1008      131076 :     if ( !mbValidPos || !mbValidPrtArea || !mbValidSize )
    1009       39022 :         const_cast<SwFrm*>(this)->OptPrepareMake();
    1010      131076 : }
    1011      722730 : inline const SwPageFrm *SwFrm::FindPageFrm() const
    1012             : {
    1013      722730 :     return const_cast<SwFrm*>(this)->FindPageFrm();
    1014             : }
    1015        7014 : inline const SwFrm *SwFrm::FindColFrm() const
    1016             : {
    1017        7014 :     return const_cast<SwFrm*>(this)->FindColFrm();
    1018             : }
    1019      237923 : inline const SwFrm *SwFrm::FindFooterOrHeader() const
    1020             : {
    1021      237923 :     return const_cast<SwFrm*>(this)->FindFooterOrHeader();
    1022             : }
    1023      272597 : inline SwTabFrm *SwFrm::FindTabFrm()
    1024             : {
    1025      272597 :     return IsInTab() ? ImplFindTabFrm() : 0;
    1026             : }
    1027         817 : inline const SwFootnoteBossFrm *SwFrm::FindFootnoteBossFrm( bool bFootnote ) const
    1028             : {
    1029         817 :     return const_cast<SwFrm*>(this)->FindFootnoteBossFrm( bFootnote );
    1030             : }
    1031       29886 : inline SwFootnoteFrm *SwFrm::FindFootnoteFrm()
    1032             : {
    1033       29886 :     return IsInFootnote() ? ImplFindFootnoteFrm() : 0;
    1034             : }
    1035       41922 : inline SwFlyFrm *SwFrm::FindFlyFrm()
    1036             : {
    1037       41922 :     return IsInFly() ? ImplFindFlyFrm() : 0;
    1038             : }
    1039       55602 : inline SwSectionFrm *SwFrm::FindSctFrm()
    1040             : {
    1041       55602 :     return IsInSct() ? ImplFindSctFrm() : 0;
    1042             : }
    1043             : 
    1044      184466 : inline const SwTabFrm *SwFrm::FindTabFrm() const
    1045             : {
    1046      184466 :     return IsInTab() ? const_cast<SwFrm*>(this)->ImplFindTabFrm() : 0;
    1047             : }
    1048         736 : inline const SwFootnoteFrm *SwFrm::FindFootnoteFrm() const
    1049             : {
    1050         736 :     return IsInFootnote() ? const_cast<SwFrm*>(this)->ImplFindFootnoteFrm() : 0;
    1051             : }
    1052      487237 : inline const SwFlyFrm *SwFrm::FindFlyFrm() const
    1053             : {
    1054      487237 :     return IsInFly() ? const_cast<SwFrm*>(this)->ImplFindFlyFrm() : 0;
    1055             : }
    1056        4013 : inline const SwSectionFrm *SwFrm::FindSctFrm() const
    1057             : {
    1058        4013 :     return IsInSct() ? const_cast<SwFrm*>(this)->ImplFindSctFrm() : 0;
    1059             : }
    1060      489780 : inline SwFrm *SwFrm::FindNext()
    1061             : {
    1062      489780 :     if ( mpNext )
    1063      483418 :         return mpNext;
    1064             :     else
    1065        6362 :         return _FindNext();
    1066             : }
    1067           0 : inline const SwFrm *SwFrm::FindNext() const
    1068             : {
    1069           0 :     if ( mpNext )
    1070           0 :         return mpNext;
    1071             :     else
    1072           0 :         return const_cast<SwFrm*>(this)->_FindNext();
    1073             : }
    1074      139590 : inline SwFrm *SwFrm::FindPrev()
    1075             : {
    1076      139590 :     if ( mpPrev && !mpPrev->IsSctFrm() )
    1077       76571 :         return mpPrev;
    1078             :     else
    1079       63019 :         return _FindPrev();
    1080             : }
    1081      496078 : inline const SwFrm *SwFrm::FindPrev() const
    1082             : {
    1083      496078 :     if ( mpPrev && !mpPrev->IsSctFrm() )
    1084      390213 :         return mpPrev;
    1085             :     else
    1086      105865 :         return const_cast<SwFrm*>(this)->_FindPrev();
    1087             : }
    1088             : 
    1089   387388123 : inline bool SwFrm::IsLayoutFrm() const
    1090             : {
    1091   387388123 :     return (GetType() & FRM_LAYOUT) != 0;
    1092             : }
    1093      383586 : inline bool SwFrm::IsRootFrm() const
    1094             : {
    1095      383586 :     return mnFrmType == FRM_ROOT;
    1096             : }
    1097     7532470 : inline bool SwFrm::IsPageFrm() const
    1098             : {
    1099     7532470 :     return mnFrmType == FRM_PAGE;
    1100             : }
    1101     1198771 : inline bool SwFrm::IsColumnFrm() const
    1102             : {
    1103     1198771 :     return mnFrmType == FRM_COLUMN;
    1104             : }
    1105      175867 : inline bool SwFrm::IsFootnoteBossFrm() const
    1106             : {
    1107      175867 :     return (GetType() & FRM_FTNBOSS) != 0;
    1108             : }
    1109      741824 : inline bool SwFrm::IsHeaderFrm() const
    1110             : {
    1111      741824 :     return mnFrmType == FRM_HEADER;
    1112             : }
    1113      719618 : inline bool SwFrm::IsFooterFrm() const
    1114             : {
    1115      719618 :     return mnFrmType == FRM_FOOTER;
    1116             : }
    1117      129982 : inline bool SwFrm::IsFootnoteContFrm() const
    1118             : {
    1119      129982 :     return mnFrmType == FRM_FTNCONT;
    1120             : }
    1121      360521 : inline bool SwFrm::IsFootnoteFrm() const
    1122             : {
    1123      360521 :     return mnFrmType == FRM_FTN;
    1124             : }
    1125      573175 : inline bool SwFrm::IsBodyFrm() const
    1126             : {
    1127      573175 :     return mnFrmType == FRM_BODY;
    1128             : }
    1129  1037235562 : inline bool SwFrm::IsFlyFrm() const
    1130             : {
    1131  1037235562 :     return mnFrmType == FRM_FLY;
    1132             : }
    1133   387179324 : inline bool SwFrm::IsSctFrm() const
    1134             : {
    1135   387179324 :     return mnFrmType == FRM_SECTION;
    1136             : }
    1137     3601749 : inline bool SwFrm::IsTabFrm() const
    1138             : {
    1139     3601749 :     return mnFrmType == FRM_TAB;
    1140             : }
    1141     1840714 : inline bool SwFrm::IsRowFrm() const
    1142             : {
    1143     1840714 :     return mnFrmType == FRM_ROW;
    1144             : }
    1145     2205573 : inline bool SwFrm::IsCellFrm() const
    1146             : {
    1147     2205573 :     return mnFrmType == FRM_CELL;
    1148             : }
    1149   521495339 : inline bool SwFrm::IsContentFrm() const
    1150             : {
    1151   521495339 :     return (GetType() & FRM_CNTNT) != 0;
    1152             : }
    1153   282891715 : inline bool SwFrm::IsTextFrm() const
    1154             : {
    1155   282891715 :     return mnFrmType == FRM_TXT;
    1156             : }
    1157      114173 : inline bool SwFrm::IsNoTextFrm() const
    1158             : {
    1159      114173 :     return mnFrmType == FRM_NOTXT;
    1160             : }
    1161     1394700 : inline bool SwFrm::IsFlowFrm() const
    1162             : {
    1163     1394700 :     return (GetType() & (FRM_CNTNT|FRM_TAB|FRM_SECTION)) != 0;
    1164             : }
    1165       83075 : inline bool SwFrm::IsRetoucheFrm() const
    1166             : {
    1167       83075 :     return (GetType() & (FRM_CNTNT|FRM_TAB|FRM_SECTION|FRM_FTN)) != 0;
    1168             : }
    1169      249308 : inline bool SwFrm::IsAccessibleFrm() const
    1170             : {
    1171      249308 :     return (GetType() & FRM_ACCESSIBLE) != 0;
    1172             : }
    1173             : #endif
    1174             : 
    1175             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11