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