2000-09-18 23:08:29 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2005-09-09 02:47:33 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2005-09-09 02:47:33 +00:00
|
|
|
* $RCSfile: frame.hxx,v $
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2007-02-28 14:44:47 +00:00
|
|
|
* $Revision: 1.52 $
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2007-02-28 14:44:47 +00:00
|
|
|
* last change: $Author: vg $ $Date: 2007-02-28 15:44:47 $
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2005-09-09 02:47:33 +00:00
|
|
|
* The Contents of this file are made available subject to
|
|
|
|
* the terms of GNU Lesser General Public License Version 2.1.
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
|
|
|
*
|
2005-09-09 02:47:33 +00:00
|
|
|
* GNU Lesser General Public License Version 2.1
|
|
|
|
* =============================================
|
|
|
|
* Copyright 2005 by Sun Microsystems, Inc.
|
|
|
|
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2005-09-09 02:47:33 +00:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License version 2.1, as published by the Free Software Foundation.
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2005-09-09 02:47:33 +00:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
2005-09-09 02:47:33 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
* MA 02111-1307 USA
|
2000-09-18 23:08:29 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
#ifndef _FRAME_HXX
|
|
|
|
#define _FRAME_HXX
|
|
|
|
#ifndef _SVARRAY_HXX //autogen
|
|
|
|
#include <svtools/svarray.hxx>
|
|
|
|
#endif
|
|
|
|
#include "swtypes.hxx" // fuer SwTwips
|
|
|
|
#include "swrect.hxx"
|
|
|
|
#include "calbck.hxx" // fuer SwClient
|
|
|
|
|
|
|
|
class SwLayoutFrm;
|
|
|
|
class SwRootFrm;
|
|
|
|
class SwPageFrm;
|
|
|
|
class SwFlyFrm;
|
|
|
|
class SwSectionFrm;
|
|
|
|
class SdrObject;
|
|
|
|
class SwFtnFrm;
|
|
|
|
class SwFtnBossFrm;
|
|
|
|
class SwTabFrm;
|
2004-01-13 10:11:03 +00:00
|
|
|
class SwRowFrm;
|
2000-09-18 23:08:29 +00:00
|
|
|
class SwFlowFrm;
|
|
|
|
class SwCntntFrm;
|
|
|
|
class SfxPoolItem;
|
|
|
|
class SwAttrSet;
|
|
|
|
class ViewShell;
|
|
|
|
class Color;
|
|
|
|
class SwBorderAttrs;
|
|
|
|
class SwCache;
|
|
|
|
class SvxBrushItem;
|
|
|
|
struct SwPosition;
|
|
|
|
struct SwCrsrMoveState;
|
|
|
|
|
2004-08-02 13:05:04 +00:00
|
|
|
// --> OD 2004-07-06 #i28701#
|
|
|
|
class SwSortedObjs;
|
|
|
|
class SwAnchoredObject;
|
|
|
|
// <--
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
//Jeder FrmTyp findet sich hier in einem Bit wieder.
|
|
|
|
//Die Bits muessen so gesetzt werden, dass mit einer Maskierung festgestellt
|
|
|
|
//werden kann was fuer ein FrmTyp eine Instanz ist _und_ von welchen Klassen
|
|
|
|
//sie abgeleitet ist.
|
|
|
|
//Der Frm hat in der Basisklasse einen Member der von den CToren der
|
|
|
|
//einzelnen Frms entsprechend gesetzt werden muss.
|
|
|
|
#define FRM_ROOT 0x0001
|
|
|
|
#define FRM_PAGE 0x0002
|
|
|
|
#define FRM_COLUMN 0x0004
|
|
|
|
#define FRM_HEADER 0x0008
|
|
|
|
#define FRM_FOOTER 0x0010
|
|
|
|
#define FRM_FTNCONT 0x0020
|
|
|
|
#define FRM_FTN 0x0040
|
|
|
|
#define FRM_BODY 0x0080
|
|
|
|
#define FRM_FLY 0x0100
|
|
|
|
#define FRM_SECTION 0x0200
|
|
|
|
#define FRM_UNUSED 0x0400
|
|
|
|
#define FRM_TAB 0x0800
|
|
|
|
#define FRM_ROW 0x1000
|
|
|
|
#define FRM_CELL 0x2000
|
|
|
|
#define FRM_TXT 0x4000
|
|
|
|
#define FRM_NOTXT 0x8000
|
|
|
|
|
|
|
|
//Fuer den internen Gebrauch ein paar gebraeuchliche Verknuepfungen.
|
|
|
|
#define FRM_LAYOUT 0x3FFF
|
|
|
|
#define FRM_CNTNT 0xC000
|
|
|
|
#define FRM_FTNBOSS 0x0006
|
2002-05-22 10:48:43 +00:00
|
|
|
#define FRM_ACCESSIBLE (FRM_HEADER|FRM_FOOTER|FRM_FTN|FRM_TXT|FRM_ROOT|FRM_FLY|FRM_TAB|FRM_CELL|FRM_PAGE)
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
//Weils so schon ist das ganze als Bitfeld....
|
|
|
|
//0000 0000 0000 0001 ROOT
|
|
|
|
//0000 0000 0000 0010 PAGE
|
|
|
|
//0000 0000 0000 0100 COLUMN
|
|
|
|
//0000 0000 0000 1000 HEADER
|
|
|
|
//0000 0000 0001 0000 FOOTER
|
|
|
|
//0000 0000 0010 0000 FTNCONT
|
|
|
|
//0000 0000 0100 0000 FTN
|
|
|
|
//0000 0000 1000 0000 BODY
|
|
|
|
//0000 0001 0000 0000 FLY
|
|
|
|
//0000 0010 0000 0000 SECTION
|
|
|
|
//0000 0100 0000 0000 UNUSED
|
|
|
|
//0000 1000 0000 0000 TAB
|
|
|
|
//0001 0000 0000 0000 ROW
|
|
|
|
//0010 0000 0000 0000 CELL
|
|
|
|
//0100 0000 0000 0000 TXT
|
|
|
|
//1000 0000 0000 0000 NOTXT
|
|
|
|
|
2001-08-23 13:01:04 +00:00
|
|
|
// The type of the frame is internal represented by the 4-bit value nType,
|
|
|
|
// which can expanded to the types above by shifting a bit (0x1 << nType)
|
|
|
|
// Here are the corresponding defines for the compressed representation:
|
|
|
|
|
|
|
|
#define FRMC_ROOT 0
|
|
|
|
#define FRMC_PAGE 1
|
|
|
|
#define FRMC_COLUMN 2
|
|
|
|
#define FRMC_HEADER 3
|
|
|
|
#define FRMC_FOOTER 4
|
|
|
|
#define FRMC_FTNCONT 5
|
|
|
|
#define FRMC_FTN 6
|
|
|
|
#define FRMC_BODY 7
|
|
|
|
#define FRMC_FLY 8
|
|
|
|
#define FRMC_SECTION 9
|
|
|
|
#define FRMC_UNUSED 10
|
|
|
|
#define FRMC_TAB 11
|
|
|
|
#define FRMC_ROW 12
|
|
|
|
#define FRMC_CELL 13
|
|
|
|
#define FRMC_TXT 14
|
|
|
|
#define FRMC_NOTXT 15
|
|
|
|
|
2001-08-30 09:21:56 +00:00
|
|
|
#define FRM_NEIGHBOUR 0x2004
|
2007-02-28 14:44:47 +00:00
|
|
|
#define FRM_NOTE_VERT 0x7a60
|
2001-10-22 10:01:46 +00:00
|
|
|
#define FRM_HEADFOOT 0x0018
|
|
|
|
#define FRM_BODYFTNC 0x00a0
|
2001-08-30 09:21:56 +00:00
|
|
|
|
2001-09-11 07:13:09 +00:00
|
|
|
class SwFrm;
|
|
|
|
typedef long (SwFrm:: *SwFrmGet)() const;
|
2001-09-13 07:20:02 +00:00
|
|
|
typedef BOOL (SwFrm:: *SwFrmMax)( long );
|
2001-11-09 12:32:26 +00:00
|
|
|
typedef void (SwFrm:: *SwFrmMakePos)( const SwFrm*, const SwFrm*, BOOL );
|
|
|
|
typedef long (*SwOperator)( long, long );
|
|
|
|
typedef void (SwFrm:: *SwFrmSet)( long, long );
|
2001-09-11 07:13:09 +00:00
|
|
|
|
|
|
|
struct SwRectFnCollection
|
|
|
|
{
|
|
|
|
SwRectGet fnGetTop;
|
|
|
|
SwRectGet fnGetBottom;
|
|
|
|
SwRectGet fnGetLeft;
|
|
|
|
SwRectGet fnGetRight;
|
|
|
|
SwRectGet fnGetWidth;
|
|
|
|
SwRectGet fnGetHeight;
|
2001-09-18 08:14:03 +00:00
|
|
|
SwRectPoint fnGetPos;
|
|
|
|
SwRectSize fnGetSize;
|
2001-09-11 07:13:09 +00:00
|
|
|
|
|
|
|
SwRectSet fnSetTop;
|
|
|
|
SwRectSet fnSetBottom;
|
|
|
|
SwRectSet fnSetLeft;
|
|
|
|
SwRectSet fnSetRight;
|
|
|
|
SwRectSet fnSetWidth;
|
|
|
|
SwRectSet fnSetHeight;
|
|
|
|
|
|
|
|
SwRectSet fnSubTop;
|
|
|
|
SwRectSet fnAddBottom;
|
|
|
|
SwRectSet fnSubLeft;
|
|
|
|
SwRectSet fnAddRight;
|
|
|
|
SwRectSet fnAddWidth;
|
|
|
|
SwRectSet fnAddHeight;
|
|
|
|
|
|
|
|
SwRectSet fnSetPosX;
|
|
|
|
SwRectSet fnSetPosY;
|
|
|
|
|
|
|
|
SwFrmGet fnGetTopMargin;
|
|
|
|
SwFrmGet fnGetBottomMargin;
|
|
|
|
SwFrmGet fnGetLeftMargin;
|
|
|
|
SwFrmGet fnGetRightMargin;
|
2001-11-09 12:32:26 +00:00
|
|
|
SwFrmSet fnSetXMargins;
|
|
|
|
SwFrmSet fnSetYMargins;
|
2001-11-16 10:40:30 +00:00
|
|
|
SwFrmGet fnGetPrtTop;
|
2001-12-12 13:44:09 +00:00
|
|
|
SwFrmGet fnGetPrtBottom;
|
2001-11-16 10:40:30 +00:00
|
|
|
SwFrmGet fnGetPrtLeft;
|
|
|
|
SwFrmGet fnGetPrtRight;
|
2001-12-12 13:44:09 +00:00
|
|
|
SwRectDist fnTopDist;
|
|
|
|
SwRectDist fnBottomDist;
|
|
|
|
SwRectDist fnLeftDist;
|
|
|
|
SwRectDist fnRightDist;
|
2001-09-13 07:20:02 +00:00
|
|
|
SwFrmMax fnSetLimit;
|
2001-09-19 07:45:10 +00:00
|
|
|
SwRectMax fnOverStep;
|
2001-11-09 12:32:26 +00:00
|
|
|
|
2001-12-13 11:58:32 +00:00
|
|
|
SwRectSetPos fnSetPos;
|
2001-11-09 12:32:26 +00:00
|
|
|
SwFrmMakePos fnMakePos;
|
|
|
|
SwOperator fnXDiff;
|
|
|
|
SwOperator fnYDiff;
|
|
|
|
SwOperator fnXInc;
|
|
|
|
SwOperator fnYInc;
|
2001-11-16 10:40:30 +00:00
|
|
|
|
2001-11-29 14:42:49 +00:00
|
|
|
SwRectSetTwice fnSetLeftAndWidth;
|
2001-11-16 10:40:30 +00:00
|
|
|
SwRectSetTwice fnSetTopAndHeight;
|
2001-09-11 07:13:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef SwRectFnCollection* SwRectFn;
|
2001-10-05 11:36:10 +00:00
|
|
|
extern SwRectFn fnRectHori, fnRectVert, fnRectB2T, fnRectVL2R;
|
|
|
|
|
|
|
|
#define SWRECTFN( pFrm ) sal_Bool bVert = pFrm->IsVertical(); \
|
|
|
|
sal_Bool bRev = pFrm->IsReverse(); \
|
|
|
|
SwRectFn fnRect = bVert ? \
|
|
|
|
( bRev ? fnRectVL2R : fnRectVert ): \
|
|
|
|
( bRev ? fnRectB2T : fnRectHori );
|
2001-11-14 13:40:22 +00:00
|
|
|
#define SWRECTFNX( pFrm ) sal_Bool bVertX = pFrm->IsVertical(); \
|
|
|
|
sal_Bool bRevX = pFrm->IsReverse(); \
|
|
|
|
SwRectFn fnRectX = bVertX ? \
|
|
|
|
( bRevX ? fnRectVL2R : fnRectVert ): \
|
|
|
|
( bRevX ? fnRectB2T : fnRectHori );
|
|
|
|
#define SWREFRESHFN( pFrm ) { if( bVert != pFrm->IsVertical() || \
|
|
|
|
bRev != pFrm->IsReverse() ) \
|
|
|
|
bVert = pFrm->IsVertical(); \
|
|
|
|
bRev = pFrm->IsReverse(); \
|
|
|
|
fnRect = bVert ? \
|
|
|
|
( bRev ? fnRectVL2R : fnRectVert ): \
|
|
|
|
( bRev ? fnRectB2T : fnRectHori ); }
|
2001-10-19 09:25:19 +00:00
|
|
|
#define SWRECTFN2( pFrm ) sal_Bool bVert = pFrm->IsVertical(); \
|
|
|
|
sal_Bool bNeighb = pFrm->IsNeighbourFrm(); \
|
|
|
|
SwRectFn fnRect = bVert == bNeighb ? \
|
|
|
|
fnRectHori : fnRectVert;
|
2001-10-05 11:36:10 +00:00
|
|
|
#define POS_DIFF( aFrm1, aFrm2 ) \
|
|
|
|
( (aFrm1.*fnRect->fnGetTop)() != (aFrm2.*fnRect->fnGetTop)() || \
|
|
|
|
(aFrm1.*fnRect->fnGetLeft)() != (aFrm2.*fnRect->fnGetLeft)() )
|
2001-09-11 07:13:09 +00:00
|
|
|
|
2001-08-23 13:01:04 +00:00
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
//Fuer GetNextLeaf/GetPrevLeaf.
|
|
|
|
enum MakePageType
|
|
|
|
{
|
|
|
|
MAKEPAGE_NONE, //Keine Seite bzw. Fussnote anlegen
|
|
|
|
MAKEPAGE_APPEND, //Nur ggf. Seite anhaengen
|
|
|
|
MAKEPAGE_INSERT, //Seite ggf. anhaengen oder einfuegen.
|
2001-03-14 13:16:02 +00:00
|
|
|
MAKEPAGE_FTN, //Fussnote ggf. einfuegen.
|
|
|
|
MAKEPAGE_NOSECTION // Don't create section frames
|
2000-09-18 23:08:29 +00:00
|
|
|
};
|
|
|
|
|
2004-08-02 13:05:04 +00:00
|
|
|
// OD 2004-05-06 #i28701# - replaced by new class <SwSortedObjs>
|
|
|
|
//typedef SdrObject* SdrObjectPtr;
|
|
|
|
//SV_DECL_PTRARR(SwDrawObjs,SdrObjectPtr,1,1);
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
class SwFrm: public SwClient
|
|
|
|
{
|
|
|
|
//Der verkappte Frm
|
|
|
|
friend class SwFlowFrm;
|
|
|
|
friend class SwLayoutFrm; // Sw3FrameIo: fuer pNext, pPrev
|
|
|
|
friend class SwLooping; // LoopControlling (layouter.cxx)
|
|
|
|
|
|
|
|
//Hebt die Lower waehrend eines Spaltenumbaus auf.
|
|
|
|
friend SwFrm *SaveCntnt( SwLayoutFrm *, SwFrm* pStart = NULL );
|
2004-01-13 10:11:03 +00:00
|
|
|
friend void RestoreCntnt( SwFrm *, SwLayoutFrm *, SwFrm *pSibling, bool bGrow );
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
//Checkt ob sich beim MakePos die Pos des Frm aendert oder nicht
|
|
|
|
//layact.cxx
|
|
|
|
friend BOOL CheckPos( SwFrm *pFrm );
|
|
|
|
|
2004-08-12 11:27:21 +00:00
|
|
|
#if OSL_DEBUG_LEVEL > 1
|
2000-09-18 23:08:29 +00:00
|
|
|
//entfernt leere SwSectionFrms aus einer Kette
|
|
|
|
friend SwFrm* SwClearDummies( SwFrm* pFrm );
|
2004-08-12 11:27:21 +00:00
|
|
|
#endif
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
//Zum validieren eines unsinnig invalidierten in SwCntntFrm::MakeAll
|
|
|
|
friend void ValidateSz( SwFrm *pFrm );
|
|
|
|
// Implementiert in text/txtftn.cxx, verhindert Ftn-Oszillation
|
|
|
|
friend void ValidateTxt( SwFrm *pFrm );
|
|
|
|
|
|
|
|
// friend void CalcAnchorAndKeep( SwFlyFrm * );
|
|
|
|
|
|
|
|
friend void MakeNxt( SwFrm *pFrm, SwFrm *pNxt );
|
|
|
|
|
|
|
|
//Cache fuer (Umrandungs-)Attribute.
|
|
|
|
static SwCache *pCache;
|
|
|
|
|
2006-06-02 11:11:12 +00:00
|
|
|
// --> OD 2006-05-10 #i65250#
|
|
|
|
// frame ID is now in general available - used for layout loop control
|
|
|
|
static sal_uInt32 mnLastFrmId;
|
|
|
|
const sal_uInt32 mnFrmId;
|
|
|
|
// <--
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
SwLayoutFrm *pUpper;
|
|
|
|
SwFrm *pNext;
|
|
|
|
SwFrm *pPrev;
|
|
|
|
|
|
|
|
SwFrm *_FindNext();
|
|
|
|
SwFrm *_FindPrev();
|
2006-02-01 13:22:51 +00:00
|
|
|
|
|
|
|
/** method to determine next content frame in the same environment
|
|
|
|
for a flow frame (content frame, table frame, section frame)
|
|
|
|
|
|
|
|
OD 2005-11-30 #i27138# - adding documentation:
|
|
|
|
Travelling downwards through the layout to determine the next content
|
|
|
|
frame in the same environment. There are several environments in a
|
|
|
|
document, which form a closed context regarding this function. These
|
|
|
|
environments are:
|
|
|
|
- Each page header
|
|
|
|
- Each page footer
|
|
|
|
- Each unlinked fly frame
|
|
|
|
- Each group of linked fly frames
|
|
|
|
- All footnotes
|
|
|
|
- All document body frames
|
|
|
|
OD 2005-11-30 #i27138# - adding parameter <_bInSameFtn>
|
|
|
|
Its default value is <false>. If its value is <true>, the environment
|
|
|
|
'All footnotes' is no longer treated. Instead each footnote is treated
|
|
|
|
as an own environment.
|
|
|
|
|
|
|
|
@author OD
|
|
|
|
|
|
|
|
@param _bInSameFtn
|
|
|
|
input parameter - boolean indicating, that the found next content
|
|
|
|
frame has to be in the same footnote frame. This parameter is only
|
|
|
|
relevant for flow frames in footnotes.
|
|
|
|
|
|
|
|
@return SwCntntFrm*
|
|
|
|
pointer to the found next content frame. It's NULL, if none exists.
|
|
|
|
*/
|
|
|
|
SwCntntFrm* _FindNextCnt( const bool _bInSameFtn = false );
|
|
|
|
|
|
|
|
/** method to determine previous content frame in the same environment
|
|
|
|
for a flow frame (content frame, table frame, section frame)
|
|
|
|
|
|
|
|
OD 2005-11-30 #i27138#
|
|
|
|
Travelling upwards through the layout to determine the previous content
|
|
|
|
frame in the same environment. There are several environments in a
|
|
|
|
document, which form a closed context regarding this function. These
|
|
|
|
environments are:
|
|
|
|
- Each page header
|
|
|
|
- Each page footer
|
|
|
|
- Each unlinked fly frame
|
|
|
|
- Each group of linked fly frames
|
|
|
|
- All footnotes
|
|
|
|
- All document body frames
|
|
|
|
OD 2005-11-30 #i27138# - adding parameter <_bInSameFtn>
|
|
|
|
Its default value is <false>. If its value is <true>, the environment
|
|
|
|
'All footnotes' is no longer treated. Instead each footnote is treated
|
|
|
|
as an own environment.
|
|
|
|
|
|
|
|
@author OD
|
|
|
|
|
|
|
|
@param _bInSameFtn
|
|
|
|
input parameter - boolean indicating, that the found previous content
|
|
|
|
frame has to be in the same footnote frame. This parameter is only
|
|
|
|
relevant for flow frames in footnotes.
|
|
|
|
|
|
|
|
@return SwCntntFrm*
|
|
|
|
pointer to the found previous content frame. It's NULL, if none exists.
|
|
|
|
*/
|
|
|
|
SwCntntFrm* _FindPrevCnt( const bool _bInSameFtn = false );
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
void _UpdateAttr( SfxPoolItem*, SfxPoolItem*, BYTE & );
|
|
|
|
SwFrm* _GetIndPrev();
|
|
|
|
SwFrm* _GetIndNext();
|
2001-08-23 13:01:04 +00:00
|
|
|
void SetDirFlags( BOOL bVert );
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
SwFrm( SwFrm & ); //Kopieren ist nicht erlaubt.
|
2002-08-07 14:52:50 +00:00
|
|
|
|
2004-01-13 10:11:03 +00:00
|
|
|
const SwLayoutFrm* ImplGetNextLayoutLeaf( bool bFwd ) const;
|
2002-08-07 14:52:50 +00:00
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
protected:
|
2004-08-02 13:05:04 +00:00
|
|
|
SwSortedObjs* pDrawObjs; //Hier haengen die DrawObjs, kann 0 sein
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
SwRect aFrm; //Absolute Dokumentposition und groesse des Frm
|
|
|
|
SwRect aPrt; //Position der PrtArea rel zum Frm und groesse der PrtArea
|
|
|
|
|
2001-08-23 13:01:04 +00:00
|
|
|
USHORT bFlag01: 1;
|
|
|
|
USHORT bFlag02: 1;
|
|
|
|
USHORT bFlag03: 1;
|
|
|
|
USHORT bFlag04: 1;
|
|
|
|
USHORT bFlag05: 1;
|
2001-10-05 11:36:10 +00:00
|
|
|
USHORT bReverse: 1; // Next line above/at the right side instead
|
|
|
|
// under/at the left side of the previous line.
|
2001-08-23 13:01:04 +00:00
|
|
|
USHORT bInvalidR2L: 1;
|
|
|
|
USHORT bDerivedR2L: 1;
|
|
|
|
USHORT bRightToLeft: 1;
|
|
|
|
USHORT bInvalidVert: 1;
|
|
|
|
USHORT bDerivedVert: 1;
|
|
|
|
USHORT bVertical: 1;
|
|
|
|
USHORT nType: 4; //Who am I?
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
BOOL bValidPos: 1;
|
|
|
|
BOOL bValidPrtArea: 1;
|
|
|
|
BOOL bValidSize: 1;
|
|
|
|
BOOL bValidLineNum: 1;
|
2001-10-19 09:25:19 +00:00
|
|
|
BOOL bFixSize: 1;
|
|
|
|
BOOL bUnUsed1: 1;
|
2000-09-18 23:08:29 +00:00
|
|
|
BOOL bCompletePaint: 1; //Frame wird ganz gepaintet wenn TRUE, auch
|
|
|
|
//wenn der Inhalt nur teilw. veraendert ist;
|
|
|
|
//Bei CntntFrms wird ausschliesslich wenn TRUE
|
|
|
|
//der Border (von Action) gemalt.
|
|
|
|
BOOL bRetouche: 1; //Der Frame ist fuer Retusche verantwortlich
|
|
|
|
//wenn TRUE.
|
|
|
|
public:
|
2001-10-19 09:25:19 +00:00
|
|
|
BOOL bUnUsed2: 1;
|
2000-09-18 23:08:29 +00:00
|
|
|
protected:
|
|
|
|
BOOL bInfInvalid: 1; //InfoFlags sind Invalid.
|
|
|
|
BOOL bInfBody: 1; //Frm steht im DokumentBody.
|
|
|
|
BOOL bInfTab: 1; //Frm steht in einer Tabelle.
|
|
|
|
BOOL bInfFly: 1; //Frm steht in einem Fly.
|
|
|
|
BOOL bInfFtn: 1; //Frm steht in einer Fussnote.
|
|
|
|
BOOL bInfSct: 1; //Frm steht in einem Bereich.
|
|
|
|
BOOL bColLocked: 1; //Grow/Shrink sperren bei spaltigen Section-
|
|
|
|
//oder Fly-Frames, wird im Format gesetzt
|
|
|
|
|
|
|
|
void ColLock() { bColLocked = TRUE; }
|
|
|
|
void ColUnlock() { bColLocked = FALSE; }
|
|
|
|
|
|
|
|
SwPageFrm *InsertPage( SwPageFrm *pSibling, BOOL bFtn );
|
|
|
|
void PrepareMake();
|
|
|
|
void OptPrepareMake();
|
|
|
|
void MakePos();
|
2005-10-19 11:35:01 +00:00
|
|
|
// --> OD 2005-09-28 #b6329202#
|
|
|
|
// method formats next frame of table frame to assure keep attribute.
|
|
|
|
// in case of nested tables method <SwFrm::MakeAll()> is called to
|
|
|
|
// avoid format of superior table frame.
|
2006-03-09 13:05:27 +00:00
|
|
|
friend SwFrm* lcl_FormatNextCntntForKeep( SwTabFrm* pTabFrm );
|
2005-10-19 11:35:01 +00:00
|
|
|
// <--
|
2000-09-18 23:08:29 +00:00
|
|
|
virtual void MakeAll() = 0;
|
|
|
|
//Adjustierung der Frames einer Seite
|
|
|
|
SwTwips AdjustNeighbourhood( SwTwips nDiff, BOOL bTst = FALSE );
|
|
|
|
|
|
|
|
|
|
|
|
//Aendern nur die Framesize, nicht die PrtArea-SSize
|
2007-02-28 14:44:47 +00:00
|
|
|
virtual SwTwips ShrinkFrm( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE ) = 0;
|
|
|
|
virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE ) = 0;
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
SwModify *GetDep() { return pRegisteredIn; }
|
|
|
|
const SwModify *GetDep() const { return pRegisteredIn; }
|
|
|
|
|
|
|
|
SwFrm( SwModify* );
|
|
|
|
|
2002-06-19 13:33:21 +00:00
|
|
|
void CheckDir( UINT16 nDir, BOOL bVert, BOOL bOnlyBiDi, BOOL bBrowse );
|
2004-07-12 12:32:29 +00:00
|
|
|
|
2004-08-02 13:05:04 +00:00
|
|
|
/** enumeration for the different invalidations
|
|
|
|
|
|
|
|
OD 2004-05-19 #i28701#
|
|
|
|
|
|
|
|
@author OD
|
|
|
|
*/
|
|
|
|
enum InvalidationType
|
|
|
|
{
|
|
|
|
INVALID_SIZE, INVALID_PRTAREA, INVALID_POS, INVALID_LINENUM, INVALID_ALL
|
|
|
|
};
|
|
|
|
|
|
|
|
/** method to determine, if an invalidation is allowed.
|
|
|
|
|
|
|
|
OD 2004-05-19 #i28701
|
|
|
|
|
|
|
|
@author OD
|
|
|
|
*/
|
|
|
|
virtual bool _InvalidationAllowed( const InvalidationType _nInvalid ) const;
|
|
|
|
|
|
|
|
/** method to perform additional actions on an invalidation
|
|
|
|
|
|
|
|
OD 2004-05-19 #i28701#
|
|
|
|
Method has *only* to contain actions, which has to be performed on
|
|
|
|
*every* assignment of the corresponding flag to <FALSE>.
|
|
|
|
|
|
|
|
@author OD
|
|
|
|
*/
|
|
|
|
virtual void _ActionOnInvalidation( const InvalidationType _nInvalid );
|
|
|
|
|
2004-07-12 12:32:29 +00:00
|
|
|
//Schatten und Umrandung painten
|
2007-02-28 14:44:47 +00:00
|
|
|
void PaintShadow( const SwRect&, SwRect&, const SwBorderAttrs& ) const;
|
2004-07-12 12:32:29 +00:00
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
public:
|
|
|
|
TYPEINFO(); //Bereits in Basisklasse Client drin.
|
|
|
|
|
2001-08-23 13:01:04 +00:00
|
|
|
USHORT GetType() const { return 0x1 << nType; }
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
static SwCache &GetCache() { return *pCache; }
|
|
|
|
static SwCache *GetCachePtr() { return pCache; }
|
|
|
|
static void SetCache( SwCache *pNew ) { pCache = pNew; }
|
|
|
|
|
|
|
|
//Aendern die PrtArea-SSize und die FrmSize.
|
2007-02-28 14:44:47 +00:00
|
|
|
SwTwips Shrink( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
|
|
|
|
SwTwips Grow ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
//Wir brauchen unterschiedliche Methoden (wg. Performance) fuer das
|
|
|
|
//Einfuegenin den Layout Baum:
|
|
|
|
|
|
|
|
//Einfuegen vor pBehind oder am Ende der Kette unter pUpper
|
|
|
|
void InsertBefore( SwLayoutFrm* pParent, SwFrm* pBehind );
|
|
|
|
//Einfuegen hinter pBefore oder am Anfang der Kette unter pUpper
|
|
|
|
void InsertBehind( SwLayoutFrm *pParent, SwFrm *pBefore );
|
|
|
|
//Einfuegen vor pBehind oder am Ende der Kette, unter Beruecksichtigung
|
|
|
|
//der Geschwister von pSct
|
|
|
|
void InsertGroupBefore( SwFrm* pParent, SwFrm* pWhere, SwFrm* pSct );
|
|
|
|
void Remove();
|
|
|
|
|
|
|
|
//For internal use only; wer es anders macht wird
|
|
|
|
//in einen Sack gesteckt und muss zwei Tage drin hocken bleiben.
|
|
|
|
//Fuert Spezialbehandlung fuer _Get[Next|Prev]Leaf() durch (Tabellen).
|
|
|
|
SwLayoutFrm *GetLeaf( MakePageType eMakePage, BOOL bFwd );
|
|
|
|
SwLayoutFrm *GetNextLeaf ( MakePageType eMakePage );
|
|
|
|
SwLayoutFrm *GetNextFtnLeaf( MakePageType eMakePage );
|
|
|
|
SwLayoutFrm *GetNextSctLeaf( MakePageType eMakePage );
|
2004-01-13 10:11:03 +00:00
|
|
|
SwLayoutFrm *GetNextCellLeaf( MakePageType eMakePage );
|
2000-09-18 23:08:29 +00:00
|
|
|
SwLayoutFrm *GetPrevLeaf ( MakePageType eMakeFtn = MAKEPAGE_FTN );
|
|
|
|
SwLayoutFrm *GetPrevFtnLeaf( MakePageType eMakeFtn = MAKEPAGE_FTN );
|
|
|
|
SwLayoutFrm *GetPrevSctLeaf( MakePageType eMakeFtn = MAKEPAGE_FTN );
|
2004-01-13 10:11:03 +00:00
|
|
|
SwLayoutFrm *GetPrevCellLeaf( MakePageType eMakeFtn = MAKEPAGE_FTN );
|
2000-09-18 23:08:29 +00:00
|
|
|
const SwLayoutFrm *GetLeaf ( MakePageType eMakePage, BOOL bFwd,
|
|
|
|
const SwFrm *pAnch ) const;
|
2004-01-13 10:11:03 +00:00
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
BOOL WrongPageDesc( SwPageFrm* pNew );
|
|
|
|
|
2004-08-02 13:05:04 +00:00
|
|
|
// --> OD 2004-07-02 #i28701# - new methods to append/remove drawing objects
|
|
|
|
void AppendDrawObj( SwAnchoredObject& _rNewObj );
|
|
|
|
void RemoveDrawObj( SwAnchoredObject& _rToRemoveObj );
|
|
|
|
// <--
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
//Arbeiten mit der Kette der FlyFrms
|
|
|
|
void AppendFly( SwFlyFrm *pNew );
|
|
|
|
void RemoveFly( SwFlyFrm *pToRemove );
|
2004-08-02 13:05:04 +00:00
|
|
|
const SwSortedObjs *GetDrawObjs() const { return pDrawObjs; }
|
|
|
|
SwSortedObjs *GetDrawObjs() { return pDrawObjs; }
|
|
|
|
// --> OD 2004-07-01 #i28701# - change purpose of method and adjust its name
|
|
|
|
void InvalidateObjs( const bool _bInvaPosOnly,
|
|
|
|
const bool _bNoInvaOfAsCharAnchoredObjs = true );
|
2004-03-31 14:07:32 +00:00
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
virtual void PaintBorder( const SwRect&, const SwPageFrm *pPage,
|
|
|
|
const SwBorderAttrs & ) const;
|
|
|
|
void PaintBaBo( const SwRect&, const SwPageFrm *pPage = 0,
|
|
|
|
const BOOL bLowerBorder = FALSE ) const;
|
|
|
|
void PaintBackground( const SwRect&, const SwPageFrm *pPage,
|
|
|
|
const SwBorderAttrs &,
|
|
|
|
const BOOL bLowerMode = FALSE,
|
|
|
|
const BOOL bLowerBorder = FALSE ) const;
|
|
|
|
void PaintBorderLine( const SwRect&, const SwRect&, const SwPageFrm*,
|
|
|
|
const Color *pColor ) const;
|
|
|
|
|
|
|
|
//Retouche, nicht im Bereich des uebergebenen Rect!
|
|
|
|
void Retouche( const SwPageFrm *pPage, const SwRect &rRect ) const;
|
|
|
|
|
|
|
|
BOOL GetBackgroundBrush( const SvxBrushItem*& rpBrush,
|
|
|
|
const Color*& rpColor,
|
|
|
|
SwRect &rOrigRect,
|
|
|
|
BOOL bLowerMode ) const;
|
|
|
|
|
|
|
|
inline void SetCompletePaint() const;
|
|
|
|
inline void ResetCompletePaint() const;
|
|
|
|
inline BOOL IsCompletePaint() const { return bCompletePaint; }
|
|
|
|
|
|
|
|
inline void SetRetouche() const;
|
|
|
|
inline void ResetRetouche() const;
|
|
|
|
inline BOOL IsRetouche() const { return bRetouche; }
|
|
|
|
|
|
|
|
void SetInfFlags(); //Setzen der InfoFlags
|
|
|
|
inline void InvalidateInfFlags() { bInfInvalid = TRUE; }
|
|
|
|
inline BOOL IsInDocBody() const; //Benutzen die InfoFlags.
|
|
|
|
inline BOOL IsInFtn() const; //ggf. werden die Flags ermittelt.
|
|
|
|
inline BOOL IsInTab() const;
|
|
|
|
inline BOOL IsInFly() const;
|
|
|
|
inline BOOL IsInSct() const;
|
2004-01-13 10:11:03 +00:00
|
|
|
|
|
|
|
// If frame is inside a split table row, this function returns
|
|
|
|
// the corresponding row frame in the follow table.
|
2005-02-22 07:18:21 +00:00
|
|
|
const SwRowFrm* IsInSplitTableRow() const;
|
2004-01-13 10:11:03 +00:00
|
|
|
|
|
|
|
// If frame is inside a follow flow row, this function returns
|
|
|
|
// the corresponding row frame master table
|
2005-02-22 07:18:21 +00:00
|
|
|
const SwRowFrm* IsInFollowFlowRow() const;
|
|
|
|
|
|
|
|
bool IsInBalancedSection() const;
|
2004-01-13 10:11:03 +00:00
|
|
|
|
2001-10-05 11:36:10 +00:00
|
|
|
inline BOOL IsReverse() const { return bReverse; }
|
|
|
|
inline void SetReverse( BOOL bNew ){ bReverse = bNew ? 1 : 0; }
|
2001-08-23 13:01:04 +00:00
|
|
|
inline BOOL IsVertical() const;
|
2001-09-13 07:20:02 +00:00
|
|
|
inline BOOL GetVerticalFlag() const;
|
|
|
|
inline void SetVertical( BOOL bNew ){ bVertical = bNew ? 1 : 0; }
|
2001-08-24 08:09:11 +00:00
|
|
|
inline void SetDerivedVert( BOOL bNew ){ bDerivedVert = bNew ? 1 : 0; }
|
|
|
|
inline void SetInvalidVert( BOOL bNew) { bInvalidVert = bNew ? 1 : 0; }
|
2001-08-23 13:01:04 +00:00
|
|
|
inline BOOL IsRightToLeft() const;
|
2001-09-19 07:45:10 +00:00
|
|
|
inline BOOL GetRightToLeftFlag() const;
|
2001-08-24 08:09:11 +00:00
|
|
|
inline void SetRightToLeft( BOOL bNew ){ bRightToLeft = bNew ? 1 : 0; }
|
|
|
|
inline void SetDerivedR2L( BOOL bNew ) { bDerivedR2L = bNew ? 1 : 0; }
|
|
|
|
inline void SetInvalidR2L( BOOL bNew ) { bInvalidR2L = bNew ? 1 : 0; }
|
2001-09-19 07:45:10 +00:00
|
|
|
void CheckDirChange();
|
2003-05-22 08:45:27 +00:00
|
|
|
// returns upper left frame position for LTR and
|
|
|
|
// upper right frame position for Asian / RTL frames
|
|
|
|
Point GetFrmAnchorPos( sal_Bool bIgnoreFlysAnchoredAtThisFrame ) const;
|
2004-02-02 17:19:07 +00:00
|
|
|
|
|
|
|
/** determine, if frame is moveable in given environment
|
|
|
|
|
|
|
|
OD 08.08.2003 #110978#
|
|
|
|
method replaced 'old' method <BOOL IsMoveable() const>.
|
|
|
|
Determines, if frame is moveable in given environment. if no environment
|
|
|
|
is given (parameter _pLayoutFrm == 0L), the movability in the actual
|
|
|
|
environment (<this->GetUpper()) is checked.
|
|
|
|
|
|
|
|
@author OD
|
|
|
|
|
|
|
|
@param _pLayoutFrm
|
|
|
|
input parameter - given environment (layout frame), in which the movability
|
|
|
|
will be checked. If not set ( == 0L ), actual environment is taken.
|
|
|
|
|
|
|
|
@return boolean, indicating, if frame is moveable in given environment
|
|
|
|
*/
|
|
|
|
// BOOL IsMoveable() const;
|
|
|
|
bool IsMoveable( const SwLayoutFrm* _pLayoutFrm = 0L ) const;
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
//Ist es fuer den (Txt)Frm in der aktuellen Umgebung erlaubt eine
|
|
|
|
//Fussnote einzufuegen (nicht z.B. in wiederholten TabellenHeadlines).
|
|
|
|
BOOL IsFtnAllowed() const;
|
|
|
|
|
|
|
|
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
|
|
|
|
virtual void Format( const SwBorderAttrs *pAttrs = 0 );
|
|
|
|
|
2001-08-23 13:01:04 +00:00
|
|
|
virtual void CheckDirection( BOOL bVert );
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
void ReinitializeFrmSizeAttrFlags();
|
|
|
|
|
|
|
|
const SwAttrSet *GetAttrSet() const;
|
|
|
|
|
2001-10-19 09:25:19 +00:00
|
|
|
inline BOOL HasFixSize() const { return bFixSize; }
|
2004-01-13 10:11:03 +00:00
|
|
|
inline void SetFixSize( BOOL bNew ) { bFixSize = bNew; }
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
//Kann 0 liefern, pruefen auch ob die Shell zum richtigen Dokument
|
|
|
|
//gehoert. Impl in frmsh.hxx
|
|
|
|
inline ViewShell *GetShell() const;
|
|
|
|
|
|
|
|
//Prueft alle Seiten ab der Uebergebenen und korrigiert ggf.
|
|
|
|
static void CheckPageDescs( SwPageFrm *pStart, BOOL bNotifyFields = TRUE );
|
|
|
|
|
|
|
|
//Koennen 0 liefern, einmal const einmal nicht
|
|
|
|
SwFrm *GetNext() { return pNext; }
|
|
|
|
SwFrm *GetPrev() { return pPrev; }
|
|
|
|
SwLayoutFrm *GetUpper() { return pUpper; }
|
|
|
|
SwRootFrm *FindRootFrm();
|
|
|
|
SwPageFrm *FindPageFrm();
|
|
|
|
SwFrm *FindColFrm();
|
|
|
|
SwFtnBossFrm *FindFtnBossFrm( BOOL bFootnotes = FALSE );
|
|
|
|
SwTabFrm *ImplFindTabFrm();
|
|
|
|
SwFtnFrm *ImplFindFtnFrm();
|
|
|
|
SwFlyFrm *ImplFindFlyFrm();
|
|
|
|
SwSectionFrm *ImplFindSctFrm();
|
|
|
|
SwFrm *FindFooterOrHeader();
|
|
|
|
SwFrm *GetLower();
|
|
|
|
const SwFrm *GetNext() const { return pNext; }
|
|
|
|
const SwFrm *GetPrev() const { return pPrev; }
|
|
|
|
const SwLayoutFrm *GetUpper() const { return pUpper; }
|
|
|
|
inline SwTabFrm *FindTabFrm();
|
|
|
|
inline SwFtnFrm *FindFtnFrm();
|
|
|
|
inline SwFlyFrm *FindFlyFrm();
|
|
|
|
inline SwSectionFrm *FindSctFrm();
|
|
|
|
inline SwFrm *FindNext();
|
2006-02-01 13:22:51 +00:00
|
|
|
// --> OD 2005-12-01 #i27138# - add parameter <_bInSameFtn>
|
|
|
|
inline SwCntntFrm* FindNextCnt( const bool _bInSameFtn = false );
|
|
|
|
// <--
|
2000-09-18 23:08:29 +00:00
|
|
|
inline SwFrm *FindPrev();
|
|
|
|
inline const SwPageFrm *FindPageFrm() const;
|
|
|
|
inline const SwRootFrm *FindRootFrm() const;
|
|
|
|
inline const SwFtnBossFrm *FindFtnBossFrm( BOOL bFtn = FALSE ) const;
|
|
|
|
inline const SwFrm *FindColFrm() const;
|
|
|
|
inline const SwFrm *FindFooterOrHeader() const;
|
|
|
|
inline const SwTabFrm *FindTabFrm() const;
|
|
|
|
inline const SwFtnFrm *FindFtnFrm() const;
|
|
|
|
inline const SwFlyFrm *FindFlyFrm() const;
|
|
|
|
inline const SwSectionFrm *FindSctFrm() const;
|
|
|
|
inline const SwFrm *FindNext() const;
|
2006-02-01 13:22:51 +00:00
|
|
|
// --> OD 2005-12-01 #i27138# - add parameter <_bInSameFtn>
|
|
|
|
inline const SwCntntFrm* FindNextCnt( const bool _bInSameFtn = false ) const;
|
|
|
|
// <--
|
2000-09-18 23:08:29 +00:00
|
|
|
inline const SwFrm *FindPrev() const;
|
|
|
|
const SwFrm *GetLower() const;
|
|
|
|
|
2006-02-01 13:22:51 +00:00
|
|
|
/** inline wrapper method for <_FindPrevCnt(..)>
|
|
|
|
|
|
|
|
OD 2005-11-30 #i27138#
|
|
|
|
|
|
|
|
@author OD
|
|
|
|
*/
|
|
|
|
inline SwCntntFrm* FindPrevCnt( const bool _bInSameFtn = false )
|
|
|
|
{
|
|
|
|
if ( GetPrev() && GetPrev()->IsCntntFrm() )
|
|
|
|
return (SwCntntFrm*)(GetPrev());
|
|
|
|
else
|
|
|
|
return _FindPrevCnt( _bInSameFtn );
|
|
|
|
}
|
|
|
|
|
|
|
|
/** inline const wrapper method for <_FindPrevCnt(..)>
|
|
|
|
|
|
|
|
OD 2005-11-30 #i27138#
|
|
|
|
|
|
|
|
@author OD
|
|
|
|
*/
|
|
|
|
inline const SwCntntFrm* FindPrevCnt( const bool _bInSameFtn = false ) const
|
|
|
|
{
|
|
|
|
if ( GetPrev() && GetPrev()->IsCntntFrm() )
|
|
|
|
return (const SwCntntFrm*)(GetPrev());
|
|
|
|
else
|
|
|
|
return const_cast<SwFrm*>(this)->_FindPrevCnt( _bInSameFtn );
|
|
|
|
}
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
SwFrm* GetIndPrev()
|
|
|
|
{ return ( pPrev || !IsInSct() ) ? pPrev : _GetIndPrev(); }
|
|
|
|
const SwFrm* GetIndPrev() const { return ((SwFrm*)this)->GetIndPrev(); }
|
|
|
|
SwFrm* GetIndNext()
|
|
|
|
{ return ( pNext || !IsInSct() ) ? pNext : _GetIndNext(); }
|
|
|
|
const SwFrm* GetIndNext() const { return ((SwFrm*)this)->GetIndNext(); }
|
|
|
|
|
|
|
|
USHORT GetPhyPageNum() const; //Seitennummer ohne Offset
|
|
|
|
USHORT GetVirtPageNum() const; //Seitenummer mit Offset
|
2001-03-02 09:17:26 +00:00
|
|
|
BOOL OnRightPage() const { return 0 != GetPhyPageNum() % 2; };
|
|
|
|
BOOL WannaRightPage() const;
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2004-01-13 10:11:03 +00:00
|
|
|
|
|
|
|
inline const SwLayoutFrm *GetPrevLayoutLeaf() const;
|
|
|
|
inline const SwLayoutFrm *GetNextLayoutLeaf() const;
|
2000-09-18 23:08:29 +00:00
|
|
|
inline SwLayoutFrm *GetPrevLayoutLeaf();
|
|
|
|
inline SwLayoutFrm *GetNextLayoutLeaf();
|
|
|
|
|
|
|
|
inline void Calc() const; //Hier wird ggf. 'Formatiert'
|
|
|
|
inline void OptCalc() const; //Hier wird zur Optimierung davon ausgegangen,
|
|
|
|
//das die Vorgaenger bereits formatiert sind.
|
|
|
|
|
|
|
|
inline Point GetRelPos() const;
|
|
|
|
const SwRect &Frm() const { return aFrm; }
|
|
|
|
const SwRect &Prt() const { return aPrt; }
|
|
|
|
|
|
|
|
// The PaintArea is the area, where content may be displayed.
|
|
|
|
// The margin of the page or the space between columns belongs to her.
|
|
|
|
const SwRect PaintArea() const;
|
|
|
|
// The UnionFrm is the union of frm- and prt-area, normally identical
|
|
|
|
// to the frm-area except the case of negative prt-margins.
|
|
|
|
const SwRect UnionFrm( BOOL bBorder = FALSE ) const;
|
|
|
|
|
|
|
|
//Der Zugriff auf die Member wird hier ausnahmsweiste gestattet,
|
|
|
|
//dies soll aber nicht dazu dienen die Werte wahllos zu veraendern;
|
|
|
|
//es ist nur die einzige Moeglichkeit die Compilerprobleme zu umgehen
|
|
|
|
//(gleiche Methode mal public mal protected).
|
|
|
|
SwRect &Frm() { return aFrm; }
|
|
|
|
SwRect &Prt() { return aPrt; }
|
|
|
|
|
|
|
|
virtual void ChgSize( const Size& aNewSize );
|
|
|
|
|
|
|
|
virtual void Cut() = 0;
|
|
|
|
virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 ) = 0;
|
|
|
|
|
|
|
|
void ValidateLineNum() { bValidLineNum = TRUE; }
|
|
|
|
|
|
|
|
BOOL GetValidPosFlag() const { return bValidPos; }
|
|
|
|
BOOL GetValidPrtAreaFlag()const { return bValidPrtArea; }
|
|
|
|
BOOL GetValidSizeFlag() const { return bValidSize; }
|
|
|
|
BOOL GetValidLineNumFlag()const { return bValidLineNum; }
|
|
|
|
BOOL IsValid() const { return bValidPos && bValidSize && bValidPrtArea; }
|
|
|
|
|
2004-08-02 13:05:04 +00:00
|
|
|
//Invalideren nur den Frm
|
|
|
|
// OD 2004-05-19 #i28701# - add call to method <_ActionOnInvalidation(..)>
|
|
|
|
// for all invalidation methods.
|
|
|
|
// OD 2004-05-19 #i28701# - use method <_InvalidationAllowed(..)> to
|
|
|
|
// decide, if invalidation will to be performed or not.
|
2004-11-16 14:41:35 +00:00
|
|
|
// --> OD 2004-10-08 #i26945# - no additional invalidation, if it's already
|
|
|
|
// invalidate.
|
2004-08-02 13:05:04 +00:00
|
|
|
void _InvalidateSize()
|
|
|
|
{
|
2004-11-16 14:41:35 +00:00
|
|
|
if ( bValidSize && _InvalidationAllowed( INVALID_SIZE ) )
|
2004-08-02 13:05:04 +00:00
|
|
|
{
|
|
|
|
bValidSize = FALSE;
|
|
|
|
_ActionOnInvalidation( INVALID_SIZE );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
void _InvalidatePrt()
|
|
|
|
{
|
2004-11-16 14:41:35 +00:00
|
|
|
if ( bValidPrtArea && _InvalidationAllowed( INVALID_PRTAREA ) )
|
2004-08-02 13:05:04 +00:00
|
|
|
{
|
|
|
|
bValidPrtArea = FALSE;
|
|
|
|
_ActionOnInvalidation( INVALID_PRTAREA );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
void _InvalidatePos()
|
|
|
|
{
|
2004-11-16 14:41:35 +00:00
|
|
|
if ( bValidPos && _InvalidationAllowed( INVALID_POS ) )
|
2004-08-02 13:05:04 +00:00
|
|
|
{
|
|
|
|
bValidPos = FALSE;
|
|
|
|
_ActionOnInvalidation( INVALID_POS );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
void _InvalidateLineNum()
|
|
|
|
{
|
2004-11-16 14:41:35 +00:00
|
|
|
if ( bValidLineNum && _InvalidationAllowed( INVALID_LINENUM ) )
|
2004-08-02 13:05:04 +00:00
|
|
|
{
|
|
|
|
bValidLineNum = FALSE;
|
|
|
|
_ActionOnInvalidation( INVALID_LINENUM );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
void _InvalidateAll()
|
|
|
|
{
|
2004-11-16 14:41:35 +00:00
|
|
|
if ( ( bValidSize || bValidPrtArea || bValidPos ) &&
|
|
|
|
_InvalidationAllowed( INVALID_ALL ) )
|
2004-08-02 13:05:04 +00:00
|
|
|
{
|
|
|
|
bValidSize = bValidPrtArea = bValidPos = FALSE;
|
|
|
|
_ActionOnInvalidation( INVALID_ALL );
|
|
|
|
}
|
|
|
|
}
|
2004-11-16 14:41:35 +00:00
|
|
|
// <--
|
2000-09-18 23:08:29 +00:00
|
|
|
//Benachrichtigen gleich die Seite mit.
|
|
|
|
inline void InvalidateSize();
|
|
|
|
inline void InvalidatePrt();
|
|
|
|
inline void InvalidatePos();
|
|
|
|
inline void InvalidateLineNum();
|
|
|
|
inline void InvalidateAll();
|
|
|
|
void ImplInvalidateSize();
|
|
|
|
void ImplInvalidatePrt();
|
|
|
|
void ImplInvalidatePos();
|
|
|
|
void ImplInvalidateLineNum();
|
|
|
|
|
|
|
|
inline void InvalidateNextPos( BOOL bNoFtn = FALSE );
|
|
|
|
void ImplInvalidateNextPos( BOOL bNoFtn = FALSE );
|
2004-06-04 07:43:48 +00:00
|
|
|
|
|
|
|
/** method to invalidate printing area of next frame
|
|
|
|
|
|
|
|
OD 09.01.2004 #i11859#
|
|
|
|
|
|
|
|
@author OD
|
|
|
|
*/
|
|
|
|
void InvalidateNextPrtArea();
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
void InvalidatePage( const SwPageFrm *pPage = 0 ) const;
|
|
|
|
|
|
|
|
virtual BOOL GetCrsrOfst( SwPosition *, Point&,
|
2004-05-17 15:15:26 +00:00
|
|
|
SwCrsrMoveState* = 0 ) const;
|
2000-09-18 23:08:29 +00:00
|
|
|
virtual BOOL GetCharRect( SwRect &, const SwPosition&,
|
|
|
|
SwCrsrMoveState* = 0 ) const;
|
|
|
|
virtual void Paint( const SwRect& ) const;
|
|
|
|
|
|
|
|
// der "kurze Dienstweg" zwischen den Frames und der Formatierung.
|
|
|
|
// Wer den void* falsch Casted ist selbst schuld!
|
|
|
|
// Auf jedenfall muss der void* auf 0 geprueft werden.
|
|
|
|
virtual void Prepare( const PrepareHint ePrep = PREP_CLEAR,
|
|
|
|
const void *pVoid = 0, BOOL bNotify = TRUE );
|
|
|
|
|
|
|
|
//TRUE wenn's die richtige Klasse ist, FALSE sonst
|
|
|
|
inline BOOL IsLayoutFrm() const;
|
|
|
|
inline BOOL IsRootFrm() const;
|
|
|
|
inline BOOL IsPageFrm() const;
|
|
|
|
inline BOOL IsColumnFrm() const;
|
|
|
|
inline BOOL IsFtnBossFrm() const; // Fussnotenbosse sind PageFrms und ColumnFrms
|
|
|
|
inline BOOL IsHeaderFrm() const;
|
|
|
|
inline BOOL IsFooterFrm() const;
|
|
|
|
inline BOOL IsFtnContFrm() const;
|
|
|
|
inline BOOL IsFtnFrm() const;
|
|
|
|
inline BOOL IsBodyFrm() const;
|
|
|
|
inline BOOL IsColBodyFrm() const; // in layfrm.hxx implementiert, BodyFrm unterhalb ColumnFrm
|
|
|
|
inline BOOL IsPageBodyFrm() const; // in layfrm.hxx implementiert, BodyFrm unterhalb PageFrm
|
|
|
|
inline BOOL IsFlyFrm() const;
|
|
|
|
inline BOOL IsSctFrm() const;
|
|
|
|
inline BOOL IsTabFrm() const;
|
|
|
|
inline BOOL IsRowFrm() const;
|
|
|
|
inline BOOL IsCellFrm() const;
|
|
|
|
inline BOOL IsCntntFrm() const;
|
|
|
|
inline BOOL IsTxtFrm() const;
|
|
|
|
inline BOOL IsNoTxtFrm() const;
|
|
|
|
inline BOOL IsFlowFrm() const; //Frms deren PrtArea von den Nachbarn
|
|
|
|
//abhaengen und die halt im Inhaltsfluss
|
|
|
|
//stehen.
|
|
|
|
inline BOOL IsRetoucheFrm() const; //Frms die Retouchefaehig sind bzw. die
|
|
|
|
//u.U. hinter sich Retouchieren muessen.
|
2002-02-27 08:32:33 +00:00
|
|
|
inline BOOL IsAccessibleFrm() const;
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
void PrepareCrsr(); //Die CrsrShell darf.
|
|
|
|
|
|
|
|
//Ist der Frm (bzw. die Section in der er steht) geschuetzt?
|
|
|
|
//Auch Fly in Fly in ... und Fussnoten
|
|
|
|
BOOL IsProtected() const;
|
|
|
|
|
|
|
|
BOOL IsColLocked() const { return bColLocked; }
|
|
|
|
|
|
|
|
virtual ~SwFrm();
|
|
|
|
|
2001-09-11 07:13:09 +00:00
|
|
|
// No inline cause we need the function pointers
|
|
|
|
long GetTopMargin() const;
|
|
|
|
long GetBottomMargin() const;
|
|
|
|
long GetLeftMargin() const;
|
|
|
|
long GetRightMargin() const;
|
2001-11-09 12:32:26 +00:00
|
|
|
void SetTopBottomMargins( long, long );
|
|
|
|
void SetBottomTopMargins( long, long );
|
|
|
|
void SetLeftRightMargins( long, long );
|
|
|
|
void SetRightLeftMargins( long, long );
|
2001-11-16 10:40:30 +00:00
|
|
|
void SetLeftAndWidth( long nLeft, long nWidth );
|
|
|
|
void SetTopAndHeight( long nTop, long nHeight );
|
|
|
|
void SetRightAndWidth( long nRight, long nWidth );
|
|
|
|
void SetBottomAndHeight( long nBottom, long nHeight );
|
2001-09-13 07:20:02 +00:00
|
|
|
long GetPrtLeft() const;
|
|
|
|
long GetPrtBottom() const;
|
2001-10-05 11:36:10 +00:00
|
|
|
long GetPrtRight() const;
|
|
|
|
long GetPrtTop() const;
|
2001-09-13 07:20:02 +00:00
|
|
|
BOOL SetMinLeft( long );
|
|
|
|
BOOL SetMaxBottom( long );
|
2001-10-05 11:36:10 +00:00
|
|
|
BOOL SetMaxRight( long );
|
|
|
|
BOOL SetMinTop( long );
|
2001-11-09 12:32:26 +00:00
|
|
|
void MakeBelowPos( const SwFrm*, const SwFrm*, BOOL );
|
|
|
|
void MakeUpperPos( const SwFrm*, const SwFrm*, BOOL );
|
|
|
|
void MakeLeftPos( const SwFrm*, const SwFrm*, BOOL );
|
|
|
|
void MakeRightPos( const SwFrm*, const SwFrm*, BOOL );
|
2006-01-19 17:18:58 +00:00
|
|
|
inline BOOL IsNeighbourFrm() const
|
2001-09-19 07:45:10 +00:00
|
|
|
{ return GetType() & FRM_NEIGHBOUR ? TRUE : FALSE; }
|
2001-09-11 07:13:09 +00:00
|
|
|
|
2006-06-02 11:11:12 +00:00
|
|
|
// --> OD 2006-05-10 #i65250#
|
|
|
|
inline sal_uInt32 GetFrmId() const { return mnFrmId; }
|
|
|
|
inline sal_uInt32 GetLastFrmId() const { return mnLastFrmId; }
|
|
|
|
// <--
|
2007-02-28 14:44:47 +00:00
|
|
|
|
|
|
|
// NEW TABELS
|
|
|
|
// Some functions for covered/covering table cells. This way unnessessary
|
|
|
|
// includes can be avoided
|
|
|
|
bool IsLeaveUpperAllowed() const;
|
|
|
|
bool IsCoveredCell() const;
|
|
|
|
bool IsInCoveredCell() const;
|
2000-09-18 23:08:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
inline BOOL SwFrm::IsInDocBody() const
|
|
|
|
{
|
|
|
|
if ( bInfInvalid )
|
|
|
|
((SwFrm*)this)->SetInfFlags();
|
|
|
|
return bInfBody;
|
|
|
|
}
|
|
|
|
inline BOOL SwFrm::IsInFtn() const
|
|
|
|
{
|
|
|
|
if ( bInfInvalid )
|
|
|
|
((SwFrm*)this)->SetInfFlags();
|
|
|
|
return bInfFtn;
|
|
|
|
}
|
|
|
|
inline BOOL SwFrm::IsInTab() const
|
|
|
|
{
|
|
|
|
if ( bInfInvalid )
|
|
|
|
((SwFrm*)this)->SetInfFlags();
|
|
|
|
return bInfTab;
|
|
|
|
}
|
|
|
|
inline BOOL SwFrm::IsInFly() const
|
|
|
|
{
|
|
|
|
if ( bInfInvalid )
|
|
|
|
((SwFrm*)this)->SetInfFlags();
|
|
|
|
return bInfFly;
|
|
|
|
}
|
|
|
|
inline BOOL SwFrm::IsInSct() const
|
|
|
|
{
|
|
|
|
if ( bInfInvalid )
|
|
|
|
((SwFrm*)this)->SetInfFlags();
|
|
|
|
return bInfSct;
|
|
|
|
}
|
2001-08-24 08:09:11 +00:00
|
|
|
BOOL SwFrm::IsVertical() const
|
2001-08-23 13:01:04 +00:00
|
|
|
{
|
|
|
|
if( bInvalidVert )
|
|
|
|
((SwFrm*)this)->SetDirFlags( TRUE );
|
|
|
|
return bVertical != 0;
|
|
|
|
}
|
2001-09-13 07:20:02 +00:00
|
|
|
BOOL SwFrm::GetVerticalFlag() const
|
|
|
|
{
|
|
|
|
return bVertical != 0;
|
|
|
|
}
|
2001-08-23 13:01:04 +00:00
|
|
|
inline BOOL SwFrm::IsRightToLeft() const
|
|
|
|
{
|
|
|
|
if( bInvalidR2L )
|
|
|
|
((SwFrm*)this)->SetDirFlags( FALSE );
|
|
|
|
return bRightToLeft != 0;
|
|
|
|
}
|
2001-09-19 07:45:10 +00:00
|
|
|
BOOL SwFrm::GetRightToLeftFlag() const
|
|
|
|
{
|
|
|
|
return bRightToLeft != 0;
|
|
|
|
}
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
inline void SwFrm::SetCompletePaint() const
|
|
|
|
{
|
|
|
|
((SwFrm*)this)->bCompletePaint = TRUE;
|
|
|
|
}
|
|
|
|
inline void SwFrm::ResetCompletePaint() const
|
|
|
|
{
|
|
|
|
((SwFrm*)this)->bCompletePaint = FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void SwFrm::SetRetouche() const
|
|
|
|
{
|
|
|
|
((SwFrm*)this)->bRetouche = TRUE;
|
|
|
|
}
|
|
|
|
inline void SwFrm::ResetRetouche() const
|
|
|
|
{
|
|
|
|
((SwFrm*)this)->bRetouche = FALSE;
|
|
|
|
}
|
|
|
|
|
2004-01-13 10:11:03 +00:00
|
|
|
inline SwLayoutFrm *SwFrm::GetNextLayoutLeaf()
|
|
|
|
{
|
|
|
|
return (SwLayoutFrm*)((const SwFrm*)this)->GetNextLayoutLeaf();
|
|
|
|
}
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
inline SwLayoutFrm *SwFrm::GetPrevLayoutLeaf()
|
|
|
|
{
|
|
|
|
return (SwLayoutFrm*)((const SwFrm*)this)->GetPrevLayoutLeaf();
|
|
|
|
}
|
2004-01-13 10:11:03 +00:00
|
|
|
|
|
|
|
inline const SwLayoutFrm *SwFrm::GetNextLayoutLeaf() const
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2004-01-13 10:11:03 +00:00
|
|
|
return ImplGetNextLayoutLeaf( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
inline const SwLayoutFrm *SwFrm::GetPrevLayoutLeaf() const
|
|
|
|
{
|
|
|
|
return ImplGetNextLayoutLeaf( false );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline void SwFrm::InvalidateSize()
|
|
|
|
{
|
|
|
|
if ( bValidSize )
|
|
|
|
ImplInvalidateSize();
|
|
|
|
}
|
|
|
|
inline void SwFrm::InvalidatePrt()
|
|
|
|
{
|
|
|
|
if ( bValidPrtArea )
|
|
|
|
ImplInvalidatePrt();
|
|
|
|
}
|
|
|
|
inline void SwFrm::InvalidatePos()
|
|
|
|
{
|
|
|
|
if ( bValidPos )
|
|
|
|
ImplInvalidatePos();
|
|
|
|
}
|
|
|
|
inline void SwFrm::InvalidateLineNum()
|
|
|
|
{
|
|
|
|
if ( bValidLineNum )
|
|
|
|
ImplInvalidateLineNum();
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void SwFrm::InvalidateAll()
|
|
|
|
{
|
2004-08-02 13:05:04 +00:00
|
|
|
if ( _InvalidationAllowed( INVALID_ALL ) )
|
|
|
|
{
|
|
|
|
if ( bValidPrtArea && bValidSize && bValidPos )
|
|
|
|
ImplInvalidatePos();
|
|
|
|
bValidPrtArea = bValidSize = bValidPos = FALSE;
|
|
|
|
|
|
|
|
// OD 2004-05-19 #i28701#
|
|
|
|
_ActionOnInvalidation( INVALID_ALL );
|
|
|
|
}
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline void SwFrm::InvalidateNextPos( BOOL bNoFtn )
|
|
|
|
{
|
2001-04-19 08:41:35 +00:00
|
|
|
if ( pNext && !pNext->IsSctFrm() )
|
2000-09-18 23:08:29 +00:00
|
|
|
pNext->InvalidatePos();
|
|
|
|
#ifndef C30 // vielleicht geht es ja bei C40 ?
|
|
|
|
else
|
|
|
|
ImplInvalidateNextPos( bNoFtn );
|
|
|
|
#else
|
|
|
|
if ( !pNext )
|
|
|
|
ImplInvalidateNextPos( bNoFtn );
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void SwFrm::Calc() const
|
|
|
|
{
|
|
|
|
if ( !bValidPos || !bValidPrtArea || !bValidSize )
|
|
|
|
((SwFrm*)this)->PrepareMake();
|
|
|
|
}
|
|
|
|
inline void SwFrm::OptCalc() const
|
|
|
|
{
|
|
|
|
if ( !bValidPos || !bValidPrtArea || !bValidSize )
|
|
|
|
((SwFrm*)this)->OptPrepareMake();
|
|
|
|
}
|
|
|
|
|
|
|
|
inline Point SwFrm::GetRelPos() const
|
|
|
|
{
|
|
|
|
Point aRet( aFrm.Pos() );
|
|
|
|
//hier wird gecasted, weil die Klasse SwLayoutFrm nur vorward-
|
|
|
|
//declariert ist.
|
|
|
|
aRet -= ((SwFrm*)GetUpper())->Prt().Pos();
|
|
|
|
aRet -= ((SwFrm*)GetUpper())->Frm().Pos();
|
|
|
|
return aRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline const SwPageFrm *SwFrm::FindPageFrm() const
|
|
|
|
{
|
|
|
|
return ((SwFrm*)this)->FindPageFrm();
|
|
|
|
}
|
|
|
|
inline const SwRootFrm *SwFrm::FindRootFrm() const
|
|
|
|
{
|
|
|
|
return ((SwFrm*)this)->FindRootFrm();
|
|
|
|
}
|
|
|
|
inline const SwFrm *SwFrm::FindColFrm() const
|
|
|
|
{
|
|
|
|
return ((SwFrm*)this)->FindColFrm();
|
|
|
|
}
|
|
|
|
inline const SwFrm *SwFrm::FindFooterOrHeader() const
|
|
|
|
{
|
|
|
|
return ((SwFrm*)this)->FindFooterOrHeader();
|
|
|
|
}
|
|
|
|
inline SwTabFrm *SwFrm::FindTabFrm()
|
|
|
|
{
|
|
|
|
return IsInTab() ? ImplFindTabFrm() : 0;
|
|
|
|
}
|
|
|
|
inline const SwFtnBossFrm *SwFrm::FindFtnBossFrm( BOOL bFtn ) const
|
|
|
|
{
|
|
|
|
return ((SwFrm*)this)->FindFtnBossFrm( bFtn );
|
|
|
|
}
|
|
|
|
inline SwFtnFrm *SwFrm::FindFtnFrm()
|
|
|
|
{
|
|
|
|
return IsInFtn() ? ImplFindFtnFrm() : 0;
|
|
|
|
}
|
|
|
|
inline SwFlyFrm *SwFrm::FindFlyFrm()
|
|
|
|
{
|
|
|
|
return IsInFly() ? ImplFindFlyFrm() : 0;
|
|
|
|
}
|
|
|
|
inline SwSectionFrm *SwFrm::FindSctFrm()
|
|
|
|
{
|
|
|
|
return IsInSct() ? ImplFindSctFrm() : 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline const SwTabFrm *SwFrm::FindTabFrm() const
|
|
|
|
{
|
|
|
|
return IsInTab() ? ((SwFrm*)this)->ImplFindTabFrm() : 0;
|
|
|
|
}
|
|
|
|
inline const SwFtnFrm *SwFrm::FindFtnFrm() const
|
|
|
|
{
|
|
|
|
return IsInFtn() ? ((SwFrm*)this)->ImplFindFtnFrm() : 0;
|
|
|
|
}
|
|
|
|
inline const SwFlyFrm *SwFrm::FindFlyFrm() const
|
|
|
|
{
|
|
|
|
return IsInFly() ? ((SwFrm*)this)->ImplFindFlyFrm() : 0;
|
|
|
|
}
|
|
|
|
inline const SwSectionFrm *SwFrm::FindSctFrm() const
|
|
|
|
{
|
|
|
|
return IsInSct() ? ((SwFrm*)this)->ImplFindSctFrm() : 0;
|
|
|
|
}
|
|
|
|
inline SwFrm *SwFrm::FindNext()
|
|
|
|
{
|
|
|
|
if ( pNext )
|
|
|
|
return pNext;
|
|
|
|
else
|
|
|
|
return _FindNext();
|
|
|
|
}
|
|
|
|
inline const SwFrm *SwFrm::FindNext() const
|
|
|
|
{
|
|
|
|
if ( pNext )
|
|
|
|
return pNext;
|
|
|
|
else
|
|
|
|
return ((SwFrm*)this)->_FindNext();
|
|
|
|
}
|
2006-02-01 13:22:51 +00:00
|
|
|
// --> OD 2005-12-01 #i27138# - add parameter <_bInSameFtn>
|
|
|
|
inline SwCntntFrm *SwFrm::FindNextCnt( const bool _bInSameFtn )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
if ( pNext && pNext->IsCntntFrm() )
|
|
|
|
return (SwCntntFrm*)pNext;
|
|
|
|
else
|
2006-02-01 13:22:51 +00:00
|
|
|
return _FindNextCnt( _bInSameFtn );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2006-02-01 13:22:51 +00:00
|
|
|
// <--
|
|
|
|
// --> OD 2005-12-01 #i27138# - add parameter <_bInSameFtn>
|
|
|
|
inline const SwCntntFrm *SwFrm::FindNextCnt( const bool _bInSameFtn ) const
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
if ( pNext && pNext->IsCntntFrm() )
|
|
|
|
return (SwCntntFrm*)pNext;
|
|
|
|
else
|
2006-02-01 13:22:51 +00:00
|
|
|
return ((SwFrm*)this)->_FindNextCnt( _bInSameFtn );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2006-02-01 13:22:51 +00:00
|
|
|
// <--
|
2000-09-18 23:08:29 +00:00
|
|
|
inline SwFrm *SwFrm::FindPrev()
|
|
|
|
{
|
|
|
|
if ( pPrev && !pPrev->IsSctFrm() )
|
|
|
|
return pPrev;
|
|
|
|
else
|
|
|
|
return _FindPrev();
|
|
|
|
}
|
|
|
|
inline const SwFrm *SwFrm::FindPrev() const
|
|
|
|
{
|
|
|
|
if ( pPrev && !pPrev->IsSctFrm() )
|
|
|
|
return pPrev;
|
|
|
|
else
|
|
|
|
return ((SwFrm*)this)->_FindPrev();
|
|
|
|
}
|
|
|
|
|
2002-08-07 14:52:50 +00:00
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
inline BOOL SwFrm::IsLayoutFrm() const
|
|
|
|
{
|
2001-08-23 13:01:04 +00:00
|
|
|
return GetType() & FRM_LAYOUT ? TRUE : FALSE;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
inline BOOL SwFrm::IsRootFrm() const
|
|
|
|
{
|
2001-08-23 13:01:04 +00:00
|
|
|
return nType == FRMC_ROOT;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
inline BOOL SwFrm::IsPageFrm() const
|
|
|
|
{
|
2001-08-23 13:01:04 +00:00
|
|
|
return nType == FRMC_PAGE;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
inline BOOL SwFrm::IsColumnFrm() const
|
|
|
|
{
|
2001-08-23 13:01:04 +00:00
|
|
|
return nType == FRMC_COLUMN;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
inline BOOL SwFrm::IsFtnBossFrm() const
|
|
|
|
{
|
2001-08-23 13:01:04 +00:00
|
|
|
return GetType() & FRM_FTNBOSS ? TRUE : FALSE;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
inline BOOL SwFrm::IsHeaderFrm() const
|
|
|
|
{
|
2001-08-23 13:01:04 +00:00
|
|
|
return nType == FRMC_HEADER;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
inline BOOL SwFrm::IsFooterFrm() const
|
|
|
|
{
|
2001-08-23 13:01:04 +00:00
|
|
|
return nType == FRMC_FOOTER;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
inline BOOL SwFrm::IsFtnContFrm() const
|
|
|
|
{
|
2001-08-23 13:01:04 +00:00
|
|
|
return nType == FRMC_FTNCONT;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
inline BOOL SwFrm::IsFtnFrm() const
|
|
|
|
{
|
2001-08-23 13:01:04 +00:00
|
|
|
return nType == FRMC_FTN;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
inline BOOL SwFrm::IsBodyFrm() const
|
|
|
|
{
|
2001-08-23 13:01:04 +00:00
|
|
|
return nType == FRMC_BODY;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
inline BOOL SwFrm::IsFlyFrm() const
|
|
|
|
{
|
2001-08-23 13:01:04 +00:00
|
|
|
return nType == FRMC_FLY;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
inline BOOL SwFrm::IsSctFrm() const
|
|
|
|
{
|
2001-08-23 13:01:04 +00:00
|
|
|
return nType == FRMC_SECTION;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
inline BOOL SwFrm::IsTabFrm() const
|
|
|
|
{
|
2001-08-23 13:01:04 +00:00
|
|
|
return nType == FRMC_TAB;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
inline BOOL SwFrm::IsRowFrm() const
|
|
|
|
{
|
2001-08-23 13:01:04 +00:00
|
|
|
return nType == FRMC_ROW;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
inline BOOL SwFrm::IsCellFrm() const
|
|
|
|
{
|
2001-08-23 13:01:04 +00:00
|
|
|
return nType == FRMC_CELL;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
inline BOOL SwFrm::IsCntntFrm() const
|
|
|
|
{
|
2001-08-23 13:01:04 +00:00
|
|
|
return GetType() & FRM_CNTNT ? TRUE : FALSE;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
inline BOOL SwFrm::IsTxtFrm() const
|
|
|
|
{
|
2001-08-23 13:01:04 +00:00
|
|
|
return nType == FRMC_TXT;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
inline BOOL SwFrm::IsNoTxtFrm() const
|
|
|
|
{
|
2001-08-23 13:01:04 +00:00
|
|
|
return nType == FRMC_NOTXT;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
inline BOOL SwFrm::IsFlowFrm() const
|
|
|
|
{
|
2001-08-23 13:01:04 +00:00
|
|
|
return GetType() & 0xCA00 ? TRUE : FALSE; //TabFrm, CntntFrm, SectionFrm
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
inline BOOL SwFrm::IsRetoucheFrm() const
|
|
|
|
{
|
2001-08-23 13:01:04 +00:00
|
|
|
return GetType() & 0xCA40 ? TRUE : FALSE; //TabFrm, CntntFrm, SectionFrm, Ftnfrm
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2002-02-27 08:32:33 +00:00
|
|
|
inline BOOL SwFrm::IsAccessibleFrm() const
|
|
|
|
{
|
|
|
|
return GetType() & FRM_ACCESSIBLE ? TRUE : FALSE;
|
|
|
|
}
|
2002-03-06 10:49:01 +00:00
|
|
|
#endif
|