1*1d2dbeb0SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*1d2dbeb0SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*1d2dbeb0SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*1d2dbeb0SAndrew Rist * distributed with this work for additional information 6*1d2dbeb0SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*1d2dbeb0SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*1d2dbeb0SAndrew Rist * "License"); you may not use this file except in compliance 9*1d2dbeb0SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*1d2dbeb0SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*1d2dbeb0SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*1d2dbeb0SAndrew Rist * software distributed under the License is distributed on an 15*1d2dbeb0SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*1d2dbeb0SAndrew Rist * KIND, either express or implied. See the License for the 17*1d2dbeb0SAndrew Rist * specific language governing permissions and limitations 18*1d2dbeb0SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*1d2dbeb0SAndrew Rist *************************************************************/ 21*1d2dbeb0SAndrew Rist 22*1d2dbeb0SAndrew Rist 23cdf0e10cSrcweir #ifndef _FTNFRM_HXX 24cdf0e10cSrcweir #define _FTNFRM_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include "layfrm.hxx" 27cdf0e10cSrcweir 28cdf0e10cSrcweir class SwCntntFrm; 29cdf0e10cSrcweir class SwTxtFtn; 30cdf0e10cSrcweir class SwBorderAttrs; 31cdf0e10cSrcweir class SwFtnFrm; 32cdf0e10cSrcweir 33cdf0e10cSrcweir //Fuer Fussnoten gibt es einen Speziellen Bereich auf der Seite. Dieser 34cdf0e10cSrcweir //Bereich ist ein SwFtnContFrm. 35cdf0e10cSrcweir //Jede Fussnote ist durch einen SwFtnFrm abgegrenzt, dieser nimmt die 36cdf0e10cSrcweir //Fussnotenabsaetze auf. SwFtnFrm koennen aufgespalten werden, sie gehen 37cdf0e10cSrcweir //dann auf einer anderen Seite weiter. 38cdf0e10cSrcweir 39cdf0e10cSrcweir class SwFtnContFrm: public SwLayoutFrm 40cdf0e10cSrcweir { 41cdf0e10cSrcweir public: 42cdf0e10cSrcweir SwFtnContFrm( SwFrmFmt*, SwFrm* ); 43cdf0e10cSrcweir 44cdf0e10cSrcweir const SwFtnFrm* FindFootNote() const; 45cdf0e10cSrcweir 46cdf0e10cSrcweir virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False ); 47cdf0e10cSrcweir virtual SwTwips GrowFrm ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False ); 48cdf0e10cSrcweir virtual void Format( const SwBorderAttrs *pAttrs = 0 ); 49cdf0e10cSrcweir virtual void PaintBorder( const SwRect &, const SwPageFrm *pPage, 50cdf0e10cSrcweir const SwBorderAttrs & ) const; 51cdf0e10cSrcweir void PaintLine( const SwRect &, const SwPageFrm * ) const; 52cdf0e10cSrcweir }; 53cdf0e10cSrcweir 54cdf0e10cSrcweir class SwFtnFrm: public SwLayoutFrm 55cdf0e10cSrcweir { 56cdf0e10cSrcweir //Zeiger auf den FtnFrm in dem die Fussnote weitergefuehrt wird: 57cdf0e10cSrcweir // 0 wenn kein Follow vorhanden, 58cdf0e10cSrcweir // this beim letzten 59cdf0e10cSrcweir // der Follow sonst. 60cdf0e10cSrcweir SwFtnFrm *pFollow; 61cdf0e10cSrcweir SwFtnFrm *pMaster; //Der FtnFrm dessen Follow ich bin. 62cdf0e10cSrcweir SwCntntFrm *pRef; //In diesem CntntFrm steht die Fussnotenref. 63cdf0e10cSrcweir SwTxtFtn *pAttr; //Fussnotenattribut (zum wiedererkennen) 64cdf0e10cSrcweir 65cdf0e10cSrcweir sal_Bool bBackMoveLocked : 1; //Absaetze in dieser Fussnote duerfen derzeit 66cdf0e10cSrcweir //nicht rueckwaerts fliessen. 67cdf0e10cSrcweir // --> OD 2005-05-18 #i49383# - control unlock of position of lower anchored objects. 68cdf0e10cSrcweir bool mbUnlockPosOfLowerObjs : 1; 69cdf0e10cSrcweir // <-- 70cdf0e10cSrcweir #ifdef DBG_UTIL 71cdf0e10cSrcweir protected: 72cdf0e10cSrcweir virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False ); 73cdf0e10cSrcweir virtual SwTwips GrowFrm ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False ); 74cdf0e10cSrcweir #endif 75cdf0e10cSrcweir 76cdf0e10cSrcweir 77cdf0e10cSrcweir public: 78cdf0e10cSrcweir SwFtnFrm( SwFrmFmt*, SwFrm*, SwCntntFrm*, SwTxtFtn* ); 79cdf0e10cSrcweir 80cdf0e10cSrcweir virtual void Cut(); 81cdf0e10cSrcweir virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 ); 82cdf0e10cSrcweir 83cdf0e10cSrcweir sal_Bool operator<( const SwTxtFtn* pTxtFtn ) const; 84cdf0e10cSrcweir 85cdf0e10cSrcweir #ifndef DBG_UTIL GetRef() const86cdf0e10cSrcweir const SwCntntFrm *GetRef() const { return pRef; } GetRef()87cdf0e10cSrcweir SwCntntFrm *GetRef() { return pRef; } 88cdf0e10cSrcweir #else 89cdf0e10cSrcweir //JP 15.10.2001: in a non pro version test if the attribute has the same 90cdf0e10cSrcweir // meaning which his reference is 91cdf0e10cSrcweir const SwCntntFrm *GetRef() const; 92cdf0e10cSrcweir SwCntntFrm *GetRef(); 93cdf0e10cSrcweir #endif 94cdf0e10cSrcweir const SwCntntFrm *GetRefFromAttr() const; 95cdf0e10cSrcweir SwCntntFrm *GetRefFromAttr(); 96cdf0e10cSrcweir GetFollow() const97cdf0e10cSrcweir const SwFtnFrm *GetFollow() const { return pFollow; } GetFollow()98cdf0e10cSrcweir SwFtnFrm *GetFollow() { return pFollow; } 99cdf0e10cSrcweir GetMaster() const100cdf0e10cSrcweir const SwFtnFrm *GetMaster() const { return pMaster; } GetMaster()101cdf0e10cSrcweir SwFtnFrm *GetMaster() { return pMaster; } 102cdf0e10cSrcweir GetAttr() const103cdf0e10cSrcweir const SwTxtFtn *GetAttr() const { return pAttr; } GetAttr()104cdf0e10cSrcweir SwTxtFtn *GetAttr() { return pAttr; } 105cdf0e10cSrcweir SetFollow(SwFtnFrm * pNew)106cdf0e10cSrcweir void SetFollow( SwFtnFrm *pNew ) { pFollow = pNew; } SetMaster(SwFtnFrm * pNew)107cdf0e10cSrcweir void SetMaster( SwFtnFrm *pNew ) { pMaster = pNew; } SetRef(SwCntntFrm * pNew)108cdf0e10cSrcweir void SetRef ( SwCntntFrm *pNew ) { pRef = pNew; } 109cdf0e10cSrcweir 110cdf0e10cSrcweir void InvalidateNxtFtnCnts( SwPageFrm* pPage ); 111cdf0e10cSrcweir LockBackMove()112cdf0e10cSrcweir void LockBackMove() { bBackMoveLocked = sal_True; } UnlockBackMove()113cdf0e10cSrcweir void UnlockBackMove() { bBackMoveLocked = sal_False;} IsBackMoveLocked()114cdf0e10cSrcweir sal_Bool IsBackMoveLocked() { return bBackMoveLocked; } 115cdf0e10cSrcweir 116cdf0e10cSrcweir // Verhindert, dass der letzte Inhalt den SwFtnFrm mitloescht (Cut()) ColLock()117cdf0e10cSrcweir inline void ColLock() { bColLocked = sal_True; } ColUnlock()118cdf0e10cSrcweir inline void ColUnlock() { bColLocked = sal_False; } 119cdf0e10cSrcweir 120cdf0e10cSrcweir // --> OD 2005-05-18 #i49383# UnlockPosOfLowerObjs()121cdf0e10cSrcweir inline void UnlockPosOfLowerObjs() 122cdf0e10cSrcweir { 123cdf0e10cSrcweir mbUnlockPosOfLowerObjs = true; 124cdf0e10cSrcweir } KeepLockPosOfLowerObjs()125cdf0e10cSrcweir inline void KeepLockPosOfLowerObjs() 126cdf0e10cSrcweir { 127cdf0e10cSrcweir mbUnlockPosOfLowerObjs = false; 128cdf0e10cSrcweir } IsUnlockPosOfLowerObjs()129cdf0e10cSrcweir inline bool IsUnlockPosOfLowerObjs() 130cdf0e10cSrcweir { 131cdf0e10cSrcweir return mbUnlockPosOfLowerObjs; 132cdf0e10cSrcweir } 133cdf0e10cSrcweir // <-- 134cdf0e10cSrcweir /** search for last content in the current footnote frame 135cdf0e10cSrcweir 136cdf0e10cSrcweir OD 2005-12-02 #i27138# 137cdf0e10cSrcweir 138cdf0e10cSrcweir @author OD 139cdf0e10cSrcweir 140cdf0e10cSrcweir @return SwCntntFrm* 141cdf0e10cSrcweir pointer to found last content frame. NULL, if none is found. 142cdf0e10cSrcweir */ 143cdf0e10cSrcweir SwCntntFrm* FindLastCntnt(); 144cdf0e10cSrcweir }; 145cdf0e10cSrcweir 146cdf0e10cSrcweir #endif //_FTNFRM_HXX 147