xref: /AOO41X/main/sw/inc/viewsh.hxx (revision 5ff14ef2c455a7c2a39819566d74aed4bcc9528e)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef SW_VIEWSH_HXX
24 #define SW_VIEWSH_HXX
25 
26 #include <com/sun/star/embed/XClassifiedObject.hpp>
27 #include <com/sun/star/embed/XEmbeddedObject.hpp>
28 #include <tools/rtti.hxx>
29 #include <svl/svarray.hxx>
30 #include "swdllapi.h"
31 #include <swtypes.hxx>
32 #include <ring.hxx>
33 #include <swrect.hxx>
34 #include <errhdl.hxx>
35 #include <boost/shared_ptr.hpp>// swmod 080115
36 #include <vcl/mapmod.hxx>
37 #include <vcl/print.hxx>
38 
39 namespace com { namespace sun { namespace star { namespace accessibility {
40 	   	class XAccessible; } } } }
41 
42 class SfxObjectShellRef;
43 class SwDoc;
44 class IDocumentSettingAccess;
45 class IDocumentDeviceAccess;
46 class IDocumentMarkAccess;
47 class IDocumentDrawModelAccess;
48 class IDocumentRedlineAccess;
49 class IDocumentLayoutAccess;
50 class IDocumentFieldsAccess;
51 class IDocumentContentOperations;
52 class IDocumentStylePoolAccess;
53 class IDocumentStatistics;
54 class IDocumentUndoRedo;
55 // --> OD 2007-11-14 #i83479#
56 class IDocumentListItems;
57 class IDocumentOutlineNodes;
58 // <--
59 class SfxPrinter;
60 class SfxProgress;
61 class SwRootFrm;
62 class SwNodes;
63 class SdrView;
64 class SfxItemPool;
65 class SfxViewShell;
66 class SwViewOption;
67 class SwViewImp;
68 class SwPrintData;
69 class SwPagePreViewPrtData;
70 class Window;
71 class OutputDevice;
72 class SwLayIdle;
73 struct ShellResource;
74 class SwRegionRects;
75 class SwFrm;
76 class SvtAccessibilityOptions;
77 class SwPagePreviewLayout;
78 class SwTxtFrm;
79 class BitmapEx;
80 
81 struct SwAccessibilityOptions;
82 class Region;
83 class SwPostItMgr;
84 class SdrPaintWindow;
85 class SwAccessibleMap;
86 
87 namespace vcl
88 {
89     class OldStylePrintAdaptor;
90 }
91 
92 
93 //JP 19.07.98: - Bug 52312
94 // define fuer Flags, die im CTOR oder den darunter liegenden Schichten
95 // benoetigt werden.
96 // Zur Zeit wird fuer die DrawPage das PreView Flag benoetigt
97 #define VSHELLFLAG_ISPREVIEW 			((long)0x1)
98 #define VSHELLFLAG_SHARELAYOUT 			((long)0x2)//swmod 080125 flag
99 typedef boost::shared_ptr<SwRootFrm> SwRootFrmPtr;
100 
101 class SW_DLLPUBLIC ViewShell : public Ring
102 {
103 	friend void SetOutDev( ViewShell *pSh, OutputDevice *pOut );
104 	friend void SetOutDevAndWin( ViewShell *pSh, OutputDevice *pOut,
105 								 Window *pWin, sal_uInt16 nZoom );
106 
107 	friend class SwViewImp;
108 	friend class SwLayIdle;
109 
110     // OD 12.12.2002 #103492# - for setting visible area for page preview paint
111     friend class SwPagePreviewLayout;
112 
113     //Umsetzen der SwVisArea, damit vor dem Drucken sauber formatiert
114 	//werden kann.
115     friend void SetSwVisArea( ViewShell *pSh, const SwRect &, sal_Bool bPDFExport = sal_False );
116 
117     // --> PB 2007-05-30 #146850#
118     static BitmapEx*    pReplaceBmp;    // replaced display of still loaded images
119     static BitmapEx*    pErrorBmp;      // error display of missed images
120     // <--
121 
122 	static sal_Bool bLstAct;			// sal_True wenn Das EndAction der letzten Shell
123 									// laeuft; also die EndActions der
124 									// anderen Shells auf das Dokument
125 									// abgearbeitet sind.
126 
127 	Point		  aPrtOffst;		 //Ofst fuer den Printer,
128 									 //nicht bedruckbarer Rand.
129  	Size		  aBrowseBorder;	//Rand fuer Framedokumente
130 	SwRect 		  aInvalidRect;
131 
132 	SfxViewShell *pSfxViewShell;
133 	SwViewImp 	 *pImp;				//Core-Interna der ViewShell.
134 									//Der Pointer ist niemals 0.
135 
136     Window       *pWin;              // = 0 during printing or pdf export
137     OutputDevice *pOut;              // Window, Printer, VirtDev, ...
138     OutputDevice* mpTmpRef;           // Temporariy reference device. Is used
139                                      // during (printer depending) prospect
140                                      // and page preview printing
141                                      // (because a scaling has to be set at
142                                      // the original printer)
143 
144     SwViewOption *pOpt;
145     SwAccessibilityOptions* pAccOptions;
146 
147 
148 	sal_Bool  bDocSizeChgd	   :1;	//Fuer DocChgNotify(): Neue DocGroesse bei
149 								//EndAction an das DocMDI melden.
150 	sal_Bool  bPaintWorks	   :1;	//Normal Painten wenn sal_True,
151 								//Paint merken wenn sal_False
152 	sal_Bool  bPaintInProgress :1;	//Kein zweifaches Paint durchlassen.
153 	sal_Bool  bViewLocked	   :1;	//Lockt den sichtbaren Bereich,
154 								//MakeVisible laeuft dann in's leere.
155 	sal_Bool  bInEndAction	   :1;  //Fiese unstaende vermeiden, siehe viewsh.cxx
156 	sal_Bool  bPreView		   :1;	//Ist sal_True wenns eine PreView-ViewShell ist.
157 	sal_Bool  bFrameView	   :1;  //sal_True wenn es ein (HTML-)Frame ist.
158 	sal_Bool  bEnableSmooth    :1;	//Disable des SmoothScroll z.B. fuer
159 								//Drag der Scrollbars.
160 	sal_Bool  bEndActionByVirDev:1;	//Paints aus der EndAction immer ueber virtuelles
161 
162 								//Device (etwa beim Browsen)
163 
164     // OD 2004-06-01 #i26791# - boolean, indicating that class in in constructor
165     bool mbInConstructor:1;
166 
167 	// #i74769#
168 	SdrPaintWindow*			mpTargetPaintWindow;
169 	OutputDevice*			mpBufferedOut;
170 
171 	SwRootFrmPtr			pLayout;			//swmod 080116
172 
173 	//Initialisierung, wird von den verschiedenen Konstruktoren gerufen.
174 	SW_DLLPRIVATE void Init( const SwViewOption *pNewOpt );
175 
176     inline void ResetInvalidRect();
177 
178 	SW_DLLPRIVATE void Reformat();			//Invalidert das ges. Layout (ApplyViewOption)
179 
180 	SW_DLLPRIVATE void PaintDesktop( const SwRect & );		// sammeln der Werte fuers
181 												// Malen der Wiese und rufen
182 	// PaintDesktop gesplittet, dieser Teil wird auch von PreViewPage benutzt
183 	SW_DLLPRIVATE void _PaintDesktop( const SwRegionRects &rRegion );
184 
185 	SW_DLLPRIVATE sal_Bool CheckInvalidForPaint( const SwRect & );//Direkt Paint oder lieber
186 												//eine Aktion ausloesen.
187 
188     SW_DLLPRIVATE void PrepareForPrint( const SwPrintData &rOptions );
189 
190 	SW_DLLPRIVATE void ImplApplyViewOptions( const SwViewOption &rOpt );
191 
192 protected:
193 	static ShellResource*	pShellRes;		// Resourcen fuer die Shell
194 	static Window*			pCareWindow;	// diesem Fenster ausweichen
195 
196 	SwRect					aVisArea;		//Die moderne Ausfuerung der VisArea
197 	SwDoc					*pDoc;			//Das Dokument, niemals 0
198 
199 	sal_uInt16 nStartAction; //ist != 0 wenn mindestens eine ::com::sun::star::chaos::Action laeuft
200 	sal_uInt16 nLockPaint;	 //ist != 0 wenn das Paint gelocked ist.
201 
202 public:
203 	TYPEINFO();
204 
205 		  SwViewImp *Imp() { return pImp; }
206 	const SwViewImp *Imp() const { return pImp; }
207 
208 	const SwNodes& GetNodes() const;
209 
210     //Nach Druckerwechsel, vom Doc
211     void            InitPrt( OutputDevice *pOutDev );
212 
213     //Klammerung von zusammengehoerenden Aktionen.
214 	inline void StartAction();
215 		   void ImplStartAction();
216 	inline void EndAction( const sal_Bool bIdleEnd = sal_False );
217 		   void ImplEndAction( const sal_Bool bIdleEnd = sal_False );
218     sal_uInt16 ActionCount() const { return nStartAction; }
219 	sal_Bool ActionPend() const { return nStartAction != 0; }
220 	sal_Bool IsInEndAction() const { return bInEndAction; }
221 
222 	void SetEndActionByVirDev( sal_Bool b )	{ bEndActionByVirDev = b; }
223     sal_Bool IsEndActionByVirDev()          { return bEndActionByVirDev; }
224 
225 	// 	Per UNO wird am RootFrame fuer alle shells der ActionCount kurzfristig
226 	//  auf Null gesetzt und wieder restauriert
227 	void	SetRestoreActions(sal_uInt16 nSet);
228 	sal_uInt16 	GetRestoreActions() const;
229 
230     inline sal_Bool HasInvalidRect() const { return aInvalidRect.HasArea(); }
231     void ChgHyphenation() { Reformat(); }
232     void ChgNumberDigits();
233 
234 	sal_Bool AddPaintRect( const SwRect &rRect );
235 
236 	void InvalidateWindows( const SwRect &rRect );
237 
238 	//////////////////////////////////////////////////////////////////////////////
239 	// #i72754# set of Pre/PostPaints with lock counter and initial target OutDev
240 protected:
241 	sal_uInt32				mnPrePostPaintCount;
242 	OutputDevice*			mpPrePostOutDev;
243 	MapMode					maPrePostMapMode;
244 public:
245     void PrePaint();
246 	void DLPrePaint2(const Region& rRegion);
247 	void DLPostPaint2(bool bPaintFormLayer);
248 	const MapMode& getPrePostMapMode() const { return maPrePostMapMode; }
249 	//////////////////////////////////////////////////////////////////////////////
250 
251 	virtual void Paint(const Rectangle &rRect);
252 	sal_Bool IsPaintInProgress() const { return bPaintInProgress; }
253 	bool IsDrawingLayerPaintInProgress() const { return 0 != mnPrePostPaintCount; }
254 
255 	//Benachrichtung, dass sich der sichtbare Bereich geaendert hat.
256 	//VisArea wird neu gesetzt, anschliessend wird gescrollt.
257 	//Das uebergebene Rect liegt auf Pixelgrenzen,
258 	//um Pixelfehler beim Scrollen zu vermeiden.
259 	virtual void VisPortChgd( const SwRect & );
260 	sal_Bool SmoothScroll( long lXDiff, long lYDiff, const Rectangle* );//Browser
261 	void EnableSmooth( sal_Bool b ) { bEnableSmooth = b; }
262 
263     const SwRect& VisArea() const { return aVisArea; }
264         //Es wird, wenn notwendig, soweit gescrollt, dass das
265 		//uebergebene Rect im sichtbaren Ausschnitt liegt.
266 	void MakeVisible( const SwRect & );
267 
268 	//Bei naechster Gelegenheit die neue Dokuemntgroesse an das UI weiterreichen.
269     void SizeChgNotify();
270 	void UISizeNotify();			//Das weiterreichen der aktuellen groesse.
271 
272 	Point GetPagePos( sal_uInt16 nPageNum ) const;
273 
274 	sal_uInt16 GetNumPages();	//Anzahl der aktuellen Seiten Layout erfragen.
275     sal_Bool   IsDummyPage( sal_uInt16 nPageNum ) const;  // An empty page?
276 
277 	//Invalidierung der ersten Sichtbaren Seite fuer alle Shells im Ring.
278 	void SetFirstVisPageInvalid();
279 
280 	SwRootFrm	*GetLayout() const;//swmod 080116
281 	sal_Bool		 IsNewLayout() const; //Wurde das Layout geladen oder neu
282 									  //erzeugt?
283 
284  	Size GetDocSize() const;// erfrage die Groesse des Dokuments
285 
286 	void CalcLayout();	//Durchformatierung des Layouts erzwingen.
287 
288     sal_uInt16 GetPageCount() const;
289 
290     const Size GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const;
291 
292 	inline SwDoc *GetDoc()	const { return pDoc; }	//niemals 0.
293 
294     /** Provides access to the document setting interface
295      */
296     const IDocumentSettingAccess* getIDocumentSettingAccess() const;
297           IDocumentSettingAccess* getIDocumentSettingAccess();
298 
299     /** Provides access to the document device interface
300      */
301     const IDocumentDeviceAccess* getIDocumentDeviceAccess() const;
302           IDocumentDeviceAccess* getIDocumentDeviceAccess();
303 
304     /** Provides access to the document bookmark interface
305      */
306     const IDocumentMarkAccess* getIDocumentMarkAccess() const;
307           IDocumentMarkAccess* getIDocumentMarkAccess();
308 
309     /** Provides access to the document draw model interface
310      */
311     const IDocumentDrawModelAccess* getIDocumentDrawModelAccess() const;
312           IDocumentDrawModelAccess* getIDocumentDrawModelAccess();
313 
314     /** Provides access to the document redline interface
315      */
316     const IDocumentRedlineAccess* getIDocumentRedlineAccess() const;
317           IDocumentRedlineAccess* getIDocumentRedlineAccess();
318 
319     /** Provides access to the document layout interface
320      */
321     const IDocumentLayoutAccess* getIDocumentLayoutAccess() const;
322           IDocumentLayoutAccess* getIDocumentLayoutAccess();
323 
324     /** Provides access to the document fields administration interface
325      */
326     const IDocumentFieldsAccess* getIDocumentFieldsAccess() const;
327 
328     /** Provides access to the content operations interface
329      */
330     IDocumentContentOperations* getIDocumentContentOperations();
331 
332     /** Provides access to the document style pool interface
333      */
334     IDocumentStylePoolAccess* getIDocumentStylePoolAccess();
335 
336     /** Provides access to the document statistics interface
337      */
338     const IDocumentStatistics* getIDocumentStatistics() const;
339 
340     /** Provides access to the document undo/redo interface
341      */
342     IDocumentUndoRedo const& GetIDocumentUndoRedo() const;
343     IDocumentUndoRedo      & GetIDocumentUndoRedo();
344 
345     // --> OD 2007-11-14 #i83479#
346     const IDocumentListItems* getIDocumentListItemsAccess() const;
347     const IDocumentOutlineNodes* getIDocumentOutlineNodesAccess() const;
348     // <--
349 
350     // 1. GetRefDev:   Either the printer or the virtual device from the doc
351     // 2. GetWin:      Available if we not printing
352     // 3. GetOut:      Printer, Window or Virtual device
353     OutputDevice& GetRefDev() const;
354     inline Window* GetWin()    const { return pWin; }
355     inline OutputDevice* GetOut()     const { return pOut; }
356     //IAccessibility2 Implementation 2009-----
357     void SetWin(Window* win) { pWin = win; }
358    //-----IAccessibility2 Implementation 2009
359 	static inline sal_Bool IsLstEndAction() { return ViewShell::bLstAct; }
360 
361     //Andern alle PageDescriptoren
362 	void   ChgAllPageOrientation( sal_uInt16 eOri );
363 	void   ChgAllPageSize( Size &rSz );
364 
365     // printing of one page.
366     // bIsPDFExport == true is: do PDF Export (no printing!)
367     sal_Bool PrintOrPDFExport( OutputDevice *pOutDev,
368             SwPrintData const& rPrintData,
369             sal_Int32 nRenderer /* offset in vector of pages to print */ );
370 
371     // printing of one brochure page
372     void PrintProspect( OutputDevice *pOutDev, const SwPrintData &rPrintData,
373             sal_Int32 nRenderer /* offset in vector of page pairs for prospect printing */ );
374 
375     // printing for OLE 2.0
376     static void PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions,
377 						 OutputDevice* pOleOut, const Rectangle& rRect );
378 
379     /// fill temporary doc with selected text for Print or PDF export
380     SwDoc * FillPrtDoc( SwDoc* pPrtDoc, const SfxPrinter* pPrt );
381 
382 	//Wird intern fuer die Shell gerufen die Druckt. Formatiert die Seiten.
383     void CalcPagesForPrint( sal_uInt16 nMax );
384 
385 	//All about fields.
386 	void UpdateFlds(sal_Bool bCloseDB = sal_False);
387 	sal_Bool IsAnyFieldInDoc() const;
388 	// update all charts, for that exists any table
389 	void UpdateAllCharts();
390 	sal_Bool HasCharts() const;
391 
392     //
393     // DOCUMENT COMPATIBILITY FLAGS START
394     //
395 
396     // Sollen Absatzabstaende addiert oder maximiert werden?
397     void SetParaSpaceMax( bool bNew );
398 
399     // Sollen Absatzabstaende addiert oder maximiert werden?
400     void SetParaSpaceMaxAtPages( bool bNew );
401 
402     // compatible behaviour of tabs
403     void SetTabCompat( bool bNew );
404 
405     // font metric attribute "External Leading" should be considered
406     void SetAddExtLeading( bool bNew );
407 
408     // formatting by virtual device or printer
409     void SetUseVirDev( bool nNew );
410 
411     // OD 2004-02-16 #106629# - adding paragraph and table spacing at bottom
412     // of table cells
413     void SetAddParaSpacingToTableCells( bool _bAddParaSpacingToTableCells );
414 
415     // OD 06.01.2004 #i11859# - former formatting of text lines with
416     // proportional line spacing or not
417     void SetUseFormerLineSpacing( bool _bUseFormerLineSpacing );
418 
419     // OD 2004-03-12 #i11860# - former object positioning
420     void SetUseFormerObjectPositioning( bool _bUseFormerObjPos );
421 
422     // OD 2004-05-05 #i28701#
423     void SetConsiderWrapOnObjPos( bool _bConsiderWrapOnObjPos );
424 
425     // --> FME #108724#
426     void SetUseFormerTextWrapping( bool _bUseFormerTextWrapping );
427 
428     // -> PB 2007-06-11 #i45491#
429     void SetDoNotJustifyLinesWithManualBreak( bool _bDoNotJustifyLinesWithManualBreak );
430     // <--
431 
432     //
433     // DOCUMENT COMPATIBILITY FLAGS END
434     //
435 
436     //Ruft den Idle-Formatierer des Layouts
437 	void LayoutIdle();
438 
439 	inline const SwViewOption *GetViewOptions() const { return pOpt; }
440     virtual void  ApplyViewOptions( const SwViewOption &rOpt );
441 		   void  SetUIOptions( const SwViewOption &rOpt );
442 		   void  SetReadonlyOption(sal_Bool bSet);   // Readonly-Bit d. ViewOptions setzen
443            void  SetPDFExportOption(sal_Bool bSet);   // set/reset PDF export mode
444            void  SetPrtFormatOption(sal_Bool bSet);  // PrtFormat-Bit d. ViewOptions setzen
445            void  SetReadonlySelectionOption(sal_Bool bSet);//change the selection mode in readonly docs
446 
447     const SwAccessibilityOptions* GetAccessibilityOptions() const { return pAccOptions;}
448 
449     static void           SetShellRes( ShellResource* pRes ) { pShellRes = pRes; }
450     static ShellResource* GetShellRes();
451 
452     static void           SetCareWin( Window* pNew );
453     static Window*        GetCareWin(ViewShell& rVSh)
454                           { return pCareWindow ? pCareWindow : CareChildWin(rVSh); }
455 	static Window* 		  CareChildWin(ViewShell& rVSh);
456 
457 	inline SfxViewShell   *GetSfxViewShell() { return pSfxViewShell; }
458     inline void           SetSfxViewShell(SfxViewShell *pNew) { pSfxViewShell = pNew; }
459 
460 	// Selektion der Draw ::com::sun::star::script::Engine geaendert
461     virtual void DrawSelChanged();
462 
463     // OD 12.12.2002 #103492#
464     SwPagePreviewLayout* PagePreviewLayout();
465 
466     /** adjust view options for page preview
467 
468         OD 09.01.2003 #i6467#
469         Because page preview should show the document as it is printed -
470         page preview is print preview -, the view options are adjusted to the
471         same as for printing.
472 
473         @param _rPrintOptions
474         input parameter - constant reference to print options, to which the
475         view option will be adjusted.
476     */
477     void AdjustOptionsForPagePreview( SwPrintData const& rPrintOptions );
478 
479 	sal_Bool IsViewLocked() const { return bViewLocked; }
480 	void LockView( sal_Bool b )	  { bViewLocked = b;	}
481 
482 	inline void LockPaint();
483 		   void ImplLockPaint();
484 	inline void UnlockPaint( sal_Bool bVirDev = sal_False );
485 		   void ImplUnlockPaint( sal_Bool bVirDev );
486 		   sal_Bool IsPaintLocked() const { return nLockPaint != 0; }
487 
488 	// Abfragen/Erzeugen DrawView + PageView
489 	sal_Bool HasDrawView() const;
490 	void MakeDrawView();
491 
492 	//DrawView darf u.U. am UI benutzt werden.
493 		  SdrView *GetDrawView();
494 	const SdrView *GetDrawView() const { return ((ViewShell*)this)->GetDrawView(); }
495 
496 	//sorge dafuer, das auf jedenfall die MarkListe aktuell ist (Bug 57153)
497 	SdrView *GetDrawViewWithValidMarkList();
498 
499 	// erfrage den Attribut Pool
500 	inline const SfxItemPool& GetAttrPool() const;
501 				 SfxItemPool& GetAttrPool();
502 
503 	sal_Bool IsPreView() const { return bPreView; }
504 
505     sal_Bool IsFrameView()  const { return bFrameView; }
506     void SetFrameView( const Size& rBrowseBorder )
507            { bFrameView = sal_True; aBrowseBorder = rBrowseBorder; }
508 
509 	//Nimmt die notwendigen Invalidierungen vor,
510 	//wenn sich der BrowdseModus aendert, bBrowseChgd == sal_True
511 	//oder, im BrowseModus, wenn sich die Groessenverhaeltnisse
512 	//aendern (bBrowseChgd == sal_False)
513 	void CheckBrowseView( sal_Bool bBrowseChgd );
514 
515     const Size& GetBrowseBorder() const;
516 	sal_Int32 GetBrowseWidth() const;
517 	void SetBrowseBorder( const Size& rNew );
518 
519     ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
520 
521     // OD 15.01.2003 #103492# - change method signature due to new page preview
522     // functionality.
523     ::com::sun::star::uno::Reference<
524         ::com::sun::star::accessibility::XAccessible >
525             CreateAccessiblePreview();
526 
527 	void ShowPreViewSelection( sal_uInt16 nSelPage );
528 	void InvalidateAccessibleFocus();
529 
530     //apply Accessiblity options
531     void ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions);
532 
533     /** invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
534 
535         OD 2005-12-01 #i27138#
536 
537         @author OD
538 
539         @param _pFromTxtFrm
540         input parameter - paragraph frame, for which the relation CONTENT_FLOWS_FROM
541         has to be invalidated.
542         If NULL, no CONTENT_FLOWS_FROM relation has to be invalidated
543 
544         @param _pToTxtFrm
545         input parameter - paragraph frame, for which the relation CONTENT_FLOWS_TO
546         has to be invalidated.
547         If NULL, no CONTENT_FLOWS_TO relation has to be invalidated
548     */
549     void InvalidateAccessibleParaFlowRelation( const SwTxtFrm* _pFromTxtFrm,
550                                                const SwTxtFrm* _pToTxtFrm );
551 
552     /** invalidate text selection for paragraphs
553 
554         OD 2005-12-12 #i27301#
555 
556         @author OD
557     */
558     void InvalidateAccessibleParaTextSelection();
559 
560     /** invalidate attributes for paragraphs and paragraph's characters
561 
562         OD 2009-01-06 #i88069#
563         OD 2010-02-16 #i104008# - usage also for changes of the attributes of
564         paragraph's characters.
565 
566         @author OD
567 
568         @param rTxtFrm
569         input parameter - paragraph frame, whose attributes have changed
570     */
571     void InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm );
572 
573     SwAccessibleMap* GetAccessibleMap();
574 
575     ViewShell( ViewShell&, Window *pWin = 0, OutputDevice *pOut = 0,
576 				long nFlags = 0 );
577 	ViewShell( SwDoc& rDoc, Window *pWin,
578 			   const SwViewOption *pOpt = 0, OutputDevice *pOut = 0,
579 			   long nFlags = 0 );
580 	virtual ~ViewShell();
581 
582     // --> FME 2004-06-15 #i12836# enhanced pdf export
583     sal_Int32 GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const SwRect& rRect ) const;
584     // <--
585 
586     inline bool IsInConstructor() const { return mbInConstructor; }
587 
588     // --> PB 2007-05-30 #146850#
589     static const BitmapEx& GetReplacementBitmap( bool bIsErrorState );
590     static void DeleteReplacementBitmaps();
591     // <--
592 
593     const SwPostItMgr* GetPostItMgr() const { return (const_cast<ViewShell*>(this))->GetPostItMgr(); }
594     SwPostItMgr* GetPostItMgr();
595 };
596 
597 //---- class CurrShell verwaltet den globalen ShellPointer -------------------
598 
599 class CurrShell
600 {
601 public:
602 	ViewShell *pPrev;
603 	SwRootFrm *pRoot;
604 
605 	CurrShell( ViewShell *pNew );
606 	~CurrShell();
607 };
608 
609 inline void ViewShell::ResetInvalidRect()
610 {
611    aInvalidRect.Clear();
612 }
613 
614 inline void ViewShell::StartAction()
615 {
616 	if ( !nStartAction++ )
617 		ImplStartAction();
618 }
619 inline void ViewShell::EndAction( const sal_Bool bIdleEnd )
620 {
621 	if( 0 == (nStartAction - 1) )
622 		ImplEndAction( bIdleEnd );
623 	--nStartAction;
624 }
625 
626 inline void ViewShell::LockPaint()
627 {
628 	if ( !nLockPaint++ )
629 		ImplLockPaint();
630 }
631 inline void ViewShell::UnlockPaint( sal_Bool bVirDev )
632 {
633 	if ( 0 == --nLockPaint )
634 		ImplUnlockPaint( bVirDev );
635 }
636 inline const SfxItemPool& ViewShell::GetAttrPool() const
637 {
638 	return ((ViewShell*)this)->GetAttrPool();
639 }
640 
641 
642 
643 #endif // SW_VIEWSH_HXX
644