11d2dbeb0SAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
31d2dbeb0SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
41d2dbeb0SAndrew Rist * or more contributor license agreements. See the NOTICE file
51d2dbeb0SAndrew Rist * distributed with this work for additional information
61d2dbeb0SAndrew Rist * regarding copyright ownership. The ASF licenses this file
71d2dbeb0SAndrew Rist * to you under the Apache License, Version 2.0 (the
81d2dbeb0SAndrew Rist * "License"); you may not use this file except in compliance
91d2dbeb0SAndrew Rist * with the License. You may obtain a copy of the License at
10cdf0e10cSrcweir *
111d2dbeb0SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir *
131d2dbeb0SAndrew Rist * Unless required by applicable law or agreed to in writing,
141d2dbeb0SAndrew Rist * software distributed under the License is distributed on an
151d2dbeb0SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
161d2dbeb0SAndrew Rist * KIND, either express or implied. See the License for the
171d2dbeb0SAndrew Rist * specific language governing permissions and limitations
181d2dbeb0SAndrew Rist * under the License.
19cdf0e10cSrcweir *
201d2dbeb0SAndrew Rist *************************************************************/
211d2dbeb0SAndrew Rist
22cdf0e10cSrcweir #ifndef SW_ROOTFRM_HXX
23cdf0e10cSrcweir #define SW_ROOTFRM_HXX
24cdf0e10cSrcweir
25cdf0e10cSrcweir #include "layfrm.hxx"
26cdf0e10cSrcweir
27cdf0e10cSrcweir class SwCntntFrm;
28cdf0e10cSrcweir class ViewShell;
29cdf0e10cSrcweir class SdrPage;
30cdf0e10cSrcweir class SwFrmFmt;
31cdf0e10cSrcweir class SwPaM;
32cdf0e10cSrcweir class SwCursor;
33cdf0e10cSrcweir class SwShellCrsr;
34cdf0e10cSrcweir class SwTableCursor;
35cdf0e10cSrcweir class SwLayVout;
36cdf0e10cSrcweir class SwDestroyList;
37cdf0e10cSrcweir class SwCurrShells;
38cdf0e10cSrcweir class SwViewOption;
39cdf0e10cSrcweir class SwSelectionList;
40cdf0e10cSrcweir struct SwPosition;
41cdf0e10cSrcweir struct SwCrsrMoveState;
42cdf0e10cSrcweir
43cdf0e10cSrcweir #define HACK_TABLEMODE_INIT 0
44cdf0e10cSrcweir #define HACK_TABLEMODE_LOCKLINES 1
45cdf0e10cSrcweir #define HACK_TABLEMODE_PAINTLINES 2
46cdf0e10cSrcweir #define HACK_TABLEMODE_UNLOCKLINES 3
47cdf0e10cSrcweir #define HACK_TABLEMODE_EXIT 4
48cdf0e10cSrcweir
49cdf0e10cSrcweir #define INV_SIZE 1
50cdf0e10cSrcweir #define INV_PRTAREA 2
51cdf0e10cSrcweir #define INV_POS 4
52cdf0e10cSrcweir #define INV_TABLE 8
53cdf0e10cSrcweir #define INV_SECTION 16
54cdf0e10cSrcweir #define INV_LINENUM 32
55cdf0e10cSrcweir #define INV_DIRECTION 64
56cdf0e10cSrcweir
57cdf0e10cSrcweir #include <vector>
58cdf0e10cSrcweir
59cdf0e10cSrcweir class SwRootFrm: public SwLayoutFrm
60cdf0e10cSrcweir {
61cdf0e10cSrcweir //Muss das Superfluous temporaer abschalten.
62cdf0e10cSrcweir friend void AdjustSizeChgNotify( SwRootFrm *pRoot );
63cdf0e10cSrcweir
64cdf0e10cSrcweir //Pflegt pLastPage (Cut() und Paste() vom SwPageFrm
65cdf0e10cSrcweir friend inline void SetLastPage( SwPageFrm* );
66cdf0e10cSrcweir
67cdf0e10cSrcweir // Fuer das Anlegen und Zerstoeren des virtuellen Outputdevice-Managers
68cdf0e10cSrcweir friend void _FrmInit(); //erzeugt pVout
69cdf0e10cSrcweir friend void _FrmFinit(); //loescht pVout
70cdf0e10cSrcweir
71cdf0e10cSrcweir // PAGES01
72cdf0e10cSrcweir std::vector<SwRect> maPageRects;// returns the current rectangle for each page frame
73cdf0e10cSrcweir // the rectangle is extended to the top/bottom/left/right
74cdf0e10cSrcweir // for pages located at the outer borders
75cdf0e10cSrcweir SwRect maPagesArea; // the area covered by the pages
76cdf0e10cSrcweir long mnViewWidth; // the current page layout bases on this view width
77cdf0e10cSrcweir sal_uInt16 mnColumns; // the current page layout bases on this number of columns
78cdf0e10cSrcweir bool mbBookMode; // the current page layout is in book view
79cdf0e10cSrcweir bool mbSidebarChanged; // the notes sidebar state has changed
80cdf0e10cSrcweir // <--
81cdf0e10cSrcweir
82*a8f2ca44Smseidel bool mbNeedGrammarCheck; // true when something needs to be checked (not necessarily started yet!)
83cdf0e10cSrcweir
84cdf0e10cSrcweir static SwLayVout *pVout;
85cdf0e10cSrcweir static sal_Bool bInPaint; //Schutz gegen doppelte Paints.
86cdf0e10cSrcweir static sal_Bool bNoVirDev; //Bei SystemPaints kein virt. Device
87cdf0e10cSrcweir
88cdf0e10cSrcweir sal_Bool bCheckSuperfluous :1; //Leere Seiten suchen?
89cdf0e10cSrcweir sal_Bool bIdleFormat :1; //Idle-Formatierer anwerfen?
90cdf0e10cSrcweir sal_Bool bBrowseWidthValid :1; //Ist nBrowseWidth gueltig?
91cdf0e10cSrcweir sal_Bool bDummy2 :1; //Unbenutzt
92cdf0e10cSrcweir sal_Bool bTurboAllowed :1;
93cdf0e10cSrcweir sal_Bool bAssertFlyPages :1; //Ggf. weitere Seiten fuer Flys einfuegen?
94cdf0e10cSrcweir sal_Bool bDummy :1; //Unbenutzt
95cdf0e10cSrcweir sal_Bool bIsVirtPageNum :1; //gibt es eine virtuelle Seitennummer ?
96cdf0e10cSrcweir sal_Bool bIsNewLayout :1; //Layout geladen oder neu erzeugt.
97cdf0e10cSrcweir sal_Bool bCallbackActionEnabled:1; //Keine Action in Benachrichtung erwuenscht
98cdf0e10cSrcweir //siehe dcontact.cxx, ::Changed()
99cdf0e10cSrcweir
100cdf0e10cSrcweir //Fuer den BrowseMode. nBrowseWidth ist die Aeussere Kante des am weitesten
101*a8f2ca44Smseidel //rechts stehenden Objektes. Die rechte Kante der Seiten soll im BrowseMode
102cdf0e10cSrcweir //nicht kleiner werden als dieser Wert.
103cdf0e10cSrcweir long nBrowseWidth;
104cdf0e10cSrcweir
105cdf0e10cSrcweir //Wenn nur _ein: CntntFrm zu formatieren ist, so steht dieser in pTurbo.
106cdf0e10cSrcweir const SwCntntFrm *pTurbo;
107cdf0e10cSrcweir
108cdf0e10cSrcweir //Die letzte Seite wollen wir uns nicht immer muehsam zusammensuchen.
109cdf0e10cSrcweir SwPageFrm *pLastPage;
110cdf0e10cSrcweir
111cdf0e10cSrcweir //Die Root kuemmert sich nun auch um den Shell-Zugriff. Ueber das Dokument
112cdf0e10cSrcweir //sollte man auch immer an die Root herankommen und somit auch immer
113cdf0e10cSrcweir //einen Zugriff auf die Shell haben.
114cdf0e10cSrcweir //Der Pointer pCurrShell ist der Pointer auf irgendeine der Shells fuer
115cdf0e10cSrcweir //das Dokument
116cdf0e10cSrcweir //Da es durchaus nicht immer egal ist, auf welcher Shell gearbeitet wird,
117cdf0e10cSrcweir //ist es notwendig die aktive Shell zu kennen. Das wird dadurch angenaehert,
118cdf0e10cSrcweir //dass der Pointer pCurrShell immer dann umgesetzt wird, wenn eine
119cdf0e10cSrcweir //Shell den Fokus erhaelt (FEShell). Zusaetzlich wird der Pointer
120cdf0e10cSrcweir //Temporaer von SwCurrShell umgesetzt, dieses wird typischerweise
121cdf0e10cSrcweir //ueber das Macro SET_CURR_SHELL erledigt. Makro + Klasse sind in der
122cdf0e10cSrcweir //ViewShell zu finden. Diese Objekte koennen auch verschachtelt (auch fuer
123cdf0e10cSrcweir //unterschiedliche Shells) erzeugt werden. Sie werden im Array pCurrShells
124cdf0e10cSrcweir //gesammelt.
125cdf0e10cSrcweir //Weiterhin kann es noch vorkommen, dass eine Shell aktiviert wird,
126cdf0e10cSrcweir //waehrend noch ein CurrShell-Objekt "aktiv" ist. Dieses wird dann in
127cdf0e10cSrcweir //pWaitingCurrShell eingetragen und vom letzten DTor der CurrShell
128cdf0e10cSrcweir //"aktiviert".
129*a8f2ca44Smseidel //Ein weiteres Problem ist das Zerstoeren einer Shell waehrend sie aktiv
130cdf0e10cSrcweir //ist. Der Pointer pCurrShell wird dann auf eine beliebige andere Shell
131cdf0e10cSrcweir //umgesetzt.
132*a8f2ca44Smseidel //Wenn zum Zeitpunkt der Zerstoerung einer Shell diese noch in irgendwelchen
133cdf0e10cSrcweir //CurrShell-Objekten referenziert wird, so wird auch dies aufgeklart.
134cdf0e10cSrcweir friend class CurrShell;
135cdf0e10cSrcweir friend void SetShell( ViewShell *pSh );
136cdf0e10cSrcweir friend void InitCurrShells( SwRootFrm *pRoot );
137cdf0e10cSrcweir ViewShell *pCurrShell;
138cdf0e10cSrcweir ViewShell *pWaitingCurrShell;
139cdf0e10cSrcweir SwCurrShells *pCurrShells;
140cdf0e10cSrcweir
141cdf0e10cSrcweir //Eine Page im DrawModel pro Dokument, hat immer die Groesse der Root.
142cdf0e10cSrcweir SdrPage *pDrawPage;
143cdf0e10cSrcweir
144cdf0e10cSrcweir SwDestroyList* pDestroy;
145cdf0e10cSrcweir
146*a8f2ca44Smseidel sal_uInt16 nPhyPageNums; // Number of pages
147cdf0e10cSrcweir sal_uInt16 nAccessibleShells; // Number of accessible shells
148cdf0e10cSrcweir
149cdf0e10cSrcweir void ImplCalcBrowseWidth();
150cdf0e10cSrcweir void ImplInvalidateBrowseWidth();
151cdf0e10cSrcweir
152cdf0e10cSrcweir void _DeleteEmptySct(); // zerstoert ggf. die angemeldeten SectionFrms
153cdf0e10cSrcweir void _RemoveFromList( SwSectionFrm* pSct ); // entfernt SectionFrms aus der Delete-Liste
154cdf0e10cSrcweir
155cdf0e10cSrcweir protected:
156cdf0e10cSrcweir
157cdf0e10cSrcweir virtual void MakeAll();
158cdf0e10cSrcweir
159cdf0e10cSrcweir public:
160cdf0e10cSrcweir
161cdf0e10cSrcweir //MasterObjekte aus der Page entfernen (von den Ctoren gerufen).
162cdf0e10cSrcweir static void RemoveMasterObjs( SdrPage *pPg );
163cdf0e10cSrcweir
164cdf0e10cSrcweir void AllCheckPageDescs() const;//swmod 080226
165cdf0e10cSrcweir void AllInvalidateAutoCompleteWords() const;//swmod 080305
166cdf0e10cSrcweir void AllAddPaintRect() const;
167cdf0e10cSrcweir void AllRemoveFtns() ;//swmod 080305
168cdf0e10cSrcweir void AllInvalidateSmartTagsOrSpelling(sal_Bool bSmartTags) const;//swmod 080307
169cdf0e10cSrcweir //Virtuelles Device ausgeben (z.B. wenn Animationen ins Spiel kommen)
170cdf0e10cSrcweir static sal_Bool FlushVout();
171cdf0e10cSrcweir //Clipping sparen, wenn im Vout eh genau das Cliprechteck ausgegeben wird
172cdf0e10cSrcweir static sal_Bool HasSameRect( const SwRect& rRect );
173cdf0e10cSrcweir
174cdf0e10cSrcweir SwRootFrm( SwFrmFmt*, ViewShell* );
175cdf0e10cSrcweir ~SwRootFrm();
176cdf0e10cSrcweir void Init(SwFrmFmt*);
177cdf0e10cSrcweir
GetCurrShell() const178cdf0e10cSrcweir ViewShell *GetCurrShell() const { return pCurrShell; }
179cdf0e10cSrcweir void DeRegisterShell( ViewShell *pSh );
180cdf0e10cSrcweir
181*a8f2ca44Smseidel //Start-/EndAction fuer alle Shells auf moeglichst hoher
182cdf0e10cSrcweir //(Shell-Ableitungs-)Ebene aufsetzen. Fuer die StarONE Anbindung, die
183*a8f2ca44Smseidel //die Shells nicht direkt kennt.
184cdf0e10cSrcweir //Der ChangeLinkd der CrsrShell (UI-Benachrichtigung) wird im EndAllAction
185cdf0e10cSrcweir //automatisch gecallt.
186cdf0e10cSrcweir void StartAllAction();
187cdf0e10cSrcweir void EndAllAction( sal_Bool bVirDev = sal_False );
188cdf0e10cSrcweir
189cdf0e10cSrcweir // fuer bestimmte UNO-Aktionen (Tabellencursor) ist es notwendig, dass alle Actions
190cdf0e10cSrcweir // kurzfristig zurueckgesetzt werden. Dazu muss sich jede ViewShell ihren alten Action-zaehler
191cdf0e10cSrcweir // merken
192cdf0e10cSrcweir void UnoRemoveAllActions();
193cdf0e10cSrcweir void UnoRestoreAllActions();
194cdf0e10cSrcweir
GetDrawPage() const195cdf0e10cSrcweir const SdrPage* GetDrawPage() const { return pDrawPage; }
GetDrawPage()196cdf0e10cSrcweir SdrPage* GetDrawPage() { return pDrawPage; }
SetDrawPage(SdrPage * pNew)197cdf0e10cSrcweir void SetDrawPage( SdrPage* pNew ){ pDrawPage = pNew; }
198cdf0e10cSrcweir
199cdf0e10cSrcweir virtual sal_Bool GetCrsrOfst( SwPosition *, Point&,
200cdf0e10cSrcweir SwCrsrMoveState* = 0 ) const;
201cdf0e10cSrcweir
202cdf0e10cSrcweir virtual void Paint( SwRect const&,
203cdf0e10cSrcweir SwPrintData const*const pPrintData = NULL ) const;
204cdf0e10cSrcweir virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
205cdf0e10cSrcweir virtual SwTwips GrowFrm ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
206cdf0e10cSrcweir #ifdef DBG_UTIL
207cdf0e10cSrcweir virtual void Cut();
208cdf0e10cSrcweir virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 );
209cdf0e10cSrcweir #endif
210cdf0e10cSrcweir
211cdf0e10cSrcweir virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const;
212cdf0e10cSrcweir
213cdf0e10cSrcweir Point GetNextPrevCntntPos( const Point &rPoint, sal_Bool bNext ) const;
214cdf0e10cSrcweir
215cdf0e10cSrcweir virtual Size ChgSize( const Size& aNewSize );
216cdf0e10cSrcweir
SetIdleFlags()217cdf0e10cSrcweir void SetIdleFlags() { bIdleFormat = sal_True; }
IsIdleFormat() const218cdf0e10cSrcweir sal_Bool IsIdleFormat() const { return bIdleFormat; }
ResetIdleFormat()219cdf0e10cSrcweir void ResetIdleFormat() { bIdleFormat = sal_False; }
220cdf0e10cSrcweir
IsNeedGrammarCheck() const221cdf0e10cSrcweir bool IsNeedGrammarCheck() const { return mbNeedGrammarCheck; }
SetNeedGrammarCheck(bool bVal)222cdf0e10cSrcweir void SetNeedGrammarCheck( bool bVal ) { mbNeedGrammarCheck = bVal; }
223cdf0e10cSrcweir
224cdf0e10cSrcweir //Sorgt dafuer, dass alle gewuenschten Seitengebunden Flys eine Seite finden
SetAssertFlyPages()225cdf0e10cSrcweir void SetAssertFlyPages() { bAssertFlyPages = sal_True; }
226cdf0e10cSrcweir void AssertFlyPages();
IsAssertFlyPages()227cdf0e10cSrcweir sal_Bool IsAssertFlyPages() { return bAssertFlyPages; }
228cdf0e10cSrcweir
229cdf0e10cSrcweir //Stellt sicher, dass ab der uebergebenen Seite auf allen Seiten die
230cdf0e10cSrcweir //Seitengebundenen Rahmen auf der richtigen Seite (Seitennummer) stehen.
231cdf0e10cSrcweir void AssertPageFlys( SwPageFrm * );
232cdf0e10cSrcweir
233cdf0e10cSrcweir //Saemtlichen Inhalt invalidieren, Size oder PrtArea
234cdf0e10cSrcweir void InvalidateAllCntnt( sal_uInt8 nInvalidate = INV_SIZE );
235cdf0e10cSrcweir
236cdf0e10cSrcweir /** method to invalidate/re-calculate the position of all floating
237cdf0e10cSrcweir screen objects (Writer fly frames and drawing objects), which are
238cdf0e10cSrcweir anchored to paragraph or to character.
239cdf0e10cSrcweir
240cdf0e10cSrcweir OD 2004-03-16 #i11860#
241cdf0e10cSrcweir
242cdf0e10cSrcweir @author OD
243cdf0e10cSrcweir */
244cdf0e10cSrcweir void InvalidateAllObjPos();
245cdf0e10cSrcweir
246cdf0e10cSrcweir //Ueberfluessige Seiten entfernen.
SetSuperfluous()247cdf0e10cSrcweir void SetSuperfluous() { bCheckSuperfluous = sal_True; }
IsSuperfluous() const248cdf0e10cSrcweir sal_Bool IsSuperfluous() const { return bCheckSuperfluous; }
249cdf0e10cSrcweir void RemoveSuperfluous();
250cdf0e10cSrcweir
251cdf0e10cSrcweir //abfragen/setzen der aktuellen Seite und der Gesamtzahl der Seiten.
252cdf0e10cSrcweir //Es wird soweit wie notwendig Formatiert.
253cdf0e10cSrcweir sal_uInt16 GetCurrPage( const SwPaM* ) const;
254cdf0e10cSrcweir sal_uInt16 SetCurrPage( SwCursor*, sal_uInt16 nPageNum );
255cdf0e10cSrcweir Point GetPagePos( sal_uInt16 nPageNum ) const;
GetPageNum() const256cdf0e10cSrcweir sal_uInt16 GetPageNum() const { return nPhyPageNums; }
DecrPhyPageNums()257cdf0e10cSrcweir void DecrPhyPageNums() { --nPhyPageNums; }
IncrPhyPageNums()258cdf0e10cSrcweir void IncrPhyPageNums() { ++nPhyPageNums; }
IsVirtPageNum() const259cdf0e10cSrcweir sal_Bool IsVirtPageNum() const { return bIsVirtPageNum; }
260cdf0e10cSrcweir inline void SetVirtPageNum( const sal_Bool bOf ) const;
261cdf0e10cSrcweir sal_Bool IsDummyPage( sal_uInt16 nPageNum ) const;
262cdf0e10cSrcweir
263cdf0e10cSrcweir // Point rPt: The point that should be used to find the page
264cdf0e10cSrcweir // Size pSize: If given, we return the (first) page that overlaps with the
265cdf0e10cSrcweir // rectangle defined by rPt and pSize
266*a8f2ca44Smseidel // bool bExtend: Extend each page to the left/right/top/bottom up to the
267cdf0e10cSrcweir // next page border
268cdf0e10cSrcweir const SwPageFrm* GetPageAtPos( const Point& rPt, const Size* pSize = 0, bool bExtend = false ) const;
269cdf0e10cSrcweir
2705c0a9181SOliver-Rainer Wittmann void CalcFrmRects( SwShellCrsr& );
271cdf0e10cSrcweir
272cdf0e10cSrcweir // Calculates the cells included from the current selection
273cdf0e10cSrcweir // false: There was no result because of an invalid layout
274cdf0e10cSrcweir // true: Everything worked fine.
275cdf0e10cSrcweir bool MakeTblCrsrs( SwTableCursor& );
276cdf0e10cSrcweir
DisallowTurbo() const277cdf0e10cSrcweir void DisallowTurbo() const { ((SwRootFrm*)this)->bTurboAllowed = sal_False; }
ResetTurboFlag() const278cdf0e10cSrcweir void ResetTurboFlag() const { ((SwRootFrm*)this)->bTurboAllowed = sal_True; }
IsTurboAllowed() const279cdf0e10cSrcweir sal_Bool IsTurboAllowed() const { return bTurboAllowed; }
SetTurbo(const SwCntntFrm * pCntnt)280cdf0e10cSrcweir void SetTurbo( const SwCntntFrm *pCntnt ) { pTurbo = pCntnt; }
ResetTurbo()281cdf0e10cSrcweir void ResetTurbo() { pTurbo = 0; }
GetTurbo()282cdf0e10cSrcweir const SwCntntFrm *GetTurbo() { return pTurbo; }
283cdf0e10cSrcweir
284cdf0e10cSrcweir //Fussnotennummern aller Seiten auf den neuesten Stand bringen.
285cdf0e10cSrcweir void UpdateFtnNums(); //nur bei Seitenweiser Nummerierung!
286cdf0e10cSrcweir
287cdf0e10cSrcweir //Alle Fussnoten (nicht etwa die Referenzen) entfernen.
288cdf0e10cSrcweir void RemoveFtns( SwPageFrm *pPage = 0, sal_Bool bPageOnly = sal_False,
289cdf0e10cSrcweir sal_Bool bEndNotes = sal_False );
290cdf0e10cSrcweir void CheckFtnPageDescs( sal_Bool bEndNote );
291cdf0e10cSrcweir
GetLastPage() const292cdf0e10cSrcweir const SwPageFrm *GetLastPage() const { return pLastPage; }
GetLastPage()293cdf0e10cSrcweir SwPageFrm *GetLastPage() { return pLastPage; }
294cdf0e10cSrcweir
IsInPaint()295cdf0e10cSrcweir static sal_Bool IsInPaint() { return bInPaint; }
296cdf0e10cSrcweir
SetNoVirDev(const sal_Bool bNew)297cdf0e10cSrcweir static void SetNoVirDev( const sal_Bool bNew ) { bNoVirDev = bNew; }
298cdf0e10cSrcweir
299cdf0e10cSrcweir inline long GetBrowseWidth() const;
SetBrowseWidth(long n)300cdf0e10cSrcweir void SetBrowseWidth( long n ) { bBrowseWidthValid = sal_True; nBrowseWidth = n;}
301cdf0e10cSrcweir inline void InvalidateBrowseWidth();
302cdf0e10cSrcweir
303cdf0e10cSrcweir #ifdef LONG_TABLE_HACK
304cdf0e10cSrcweir void HackPrepareLongTblPaint( int nMode );
305cdf0e10cSrcweir #endif
306cdf0e10cSrcweir
IsNewLayout() const307cdf0e10cSrcweir sal_Bool IsNewLayout() const { return bIsNewLayout; }
ResetNewLayout()308cdf0e10cSrcweir void ResetNewLayout() { bIsNewLayout = sal_False;}
309cdf0e10cSrcweir
310cdf0e10cSrcweir // Hier werden leere SwSectionFrms zur Zerstoerung angemeldet
311cdf0e10cSrcweir // und spaeter zerstoert oder wieder abgemeldet
312cdf0e10cSrcweir void InsertEmptySct( SwSectionFrm* pDel );
DeleteEmptySct()313cdf0e10cSrcweir void DeleteEmptySct() { if( pDestroy ) _DeleteEmptySct(); }
RemoveFromList(SwSectionFrm * pSct)314cdf0e10cSrcweir void RemoveFromList( SwSectionFrm* pSct ) { if( pDestroy ) _RemoveFromList( pSct ); }
315cdf0e10cSrcweir #ifdef DBG_UTIL
316cdf0e10cSrcweir // Wird zur Zeit nur fuer ASSERTs benutzt:
317cdf0e10cSrcweir sal_Bool IsInDelList( SwSectionFrm* pSct ) const; // Ist der SectionFrm in der Liste enthalten?
318cdf0e10cSrcweir #endif
319cdf0e10cSrcweir
320cdf0e10cSrcweir
SetCallbackActionEnabled(sal_Bool b)321cdf0e10cSrcweir void SetCallbackActionEnabled( sal_Bool b ) { bCallbackActionEnabled = b; }
IsCallbackActionEnabled() const322cdf0e10cSrcweir sal_Bool IsCallbackActionEnabled() const { return bCallbackActionEnabled; }
323cdf0e10cSrcweir
IsAnyShellAccessible() const324cdf0e10cSrcweir sal_Bool IsAnyShellAccessible() const { return nAccessibleShells > 0; }
AddAccessibleShell()325cdf0e10cSrcweir void AddAccessibleShell() { ++nAccessibleShells; }
RemoveAccessibleShell()326cdf0e10cSrcweir void RemoveAccessibleShell() { --nAccessibleShells; }
327cdf0e10cSrcweir
328*a8f2ca44Smseidel /** get page frame by physical page number
329cdf0e10cSrcweir
330cdf0e10cSrcweir OD 14.01.2003 #103492#
331cdf0e10cSrcweir looping through the lowers, which are page frame, in order to find the
332cdf0e10cSrcweir page frame with the given physical page number.
333cdf0e10cSrcweir if no page frame is found, 0 is returned.
334cdf0e10cSrcweir Note: Empty page frames are also returned.
335cdf0e10cSrcweir
336cdf0e10cSrcweir @param _nPageNum
337cdf0e10cSrcweir input parameter - physical page number of page frame to be searched and
338cdf0e10cSrcweir returned.
339cdf0e10cSrcweir
340cdf0e10cSrcweir @return pointer to the page frame with the given physical page number
341cdf0e10cSrcweir */
342cdf0e10cSrcweir SwPageFrm* GetPageByPageNum( sal_uInt16 _nPageNum ) const;
343cdf0e10cSrcweir
344cdf0e10cSrcweir // --> PAGES01
345cdf0e10cSrcweir void CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVisArea );
346cdf0e10cSrcweir bool IsLeftToRightViewLayout() const;
GetPagesArea() const347cdf0e10cSrcweir const SwRect& GetPagesArea() const { return maPagesArea; }
SetSidebarChanged()348cdf0e10cSrcweir void SetSidebarChanged() { mbSidebarChanged = true; }
349cdf0e10cSrcweir // <--
350cdf0e10cSrcweir };
351cdf0e10cSrcweir
GetBrowseWidth() const352cdf0e10cSrcweir inline long SwRootFrm::GetBrowseWidth() const
353cdf0e10cSrcweir {
354cdf0e10cSrcweir if ( !bBrowseWidthValid )
355cdf0e10cSrcweir ((SwRootFrm*)this)->ImplCalcBrowseWidth();
356cdf0e10cSrcweir return nBrowseWidth;
357cdf0e10cSrcweir }
358cdf0e10cSrcweir
InvalidateBrowseWidth()359cdf0e10cSrcweir inline void SwRootFrm::InvalidateBrowseWidth()
360cdf0e10cSrcweir {
361cdf0e10cSrcweir if ( bBrowseWidthValid )
362cdf0e10cSrcweir ImplInvalidateBrowseWidth();
363cdf0e10cSrcweir }
364cdf0e10cSrcweir
SetVirtPageNum(const sal_Bool bOf) const365cdf0e10cSrcweir inline void SwRootFrm::SetVirtPageNum( const sal_Bool bOf) const
366cdf0e10cSrcweir {
367cdf0e10cSrcweir ((SwRootFrm*)this)->bIsVirtPageNum = bOf;
368cdf0e10cSrcweir }
369cdf0e10cSrcweir
370cdf0e10cSrcweir #endif // SW_ROOTFRM_HXX
371cdf0e10cSrcweir
372*a8f2ca44Smseidel /* vim: set noet sw=4 ts=4: */
373