xref: /trunk/main/sw/inc/viewsh.hxx (revision 1d2dbeb0)
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 
357 	static inline sal_Bool IsLstEndAction() { return ViewShell::bLstAct; }
358 
359     //Andern alle PageDescriptoren
360 	void   ChgAllPageOrientation( sal_uInt16 eOri );
361 	void   ChgAllPageSize( Size &rSz );
362 
363     // printing of one page.
364     // bIsPDFExport == true is: do PDF Export (no printing!)
365     sal_Bool PrintOrPDFExport( OutputDevice *pOutDev,
366             SwPrintData const& rPrintData,
367             sal_Int32 nRenderer /* offset in vector of pages to print */ );
368 
369     // printing of one brochure page
370     void PrintProspect( OutputDevice *pOutDev, const SwPrintData &rPrintData,
371             sal_Int32 nRenderer /* offset in vector of page pairs for prospect printing */ );
372 
373     // printing for OLE 2.0
374     static void PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions,
375 						 OutputDevice* pOleOut, const Rectangle& rRect );
376 
377     /// fill temporary doc with selected text for Print or PDF export
378     SwDoc * FillPrtDoc( SwDoc* pPrtDoc, const SfxPrinter* pPrt );
379 
380 	//Wird intern fuer die Shell gerufen die Druckt. Formatiert die Seiten.
381     void CalcPagesForPrint( sal_uInt16 nMax );
382 
383 	//All about fields.
384 	void UpdateFlds(sal_Bool bCloseDB = sal_False);
385 	sal_Bool IsAnyFieldInDoc() const;
386 	// update all charts, for that exists any table
387 	void UpdateAllCharts();
388 	sal_Bool HasCharts() const;
389 
390     //
391     // DOCUMENT COMPATIBILITY FLAGS START
392     //
393 
394     // Sollen Absatzabstaende addiert oder maximiert werden?
395     void SetParaSpaceMax( bool bNew );
396 
397     // Sollen Absatzabstaende addiert oder maximiert werden?
398     void SetParaSpaceMaxAtPages( bool bNew );
399 
400     // compatible behaviour of tabs
401     void SetTabCompat( bool bNew );
402 
403     // font metric attribute "External Leading" should be considered
404     void SetAddExtLeading( bool bNew );
405 
406     // formatting by virtual device or printer
407     void SetUseVirDev( bool nNew );
408 
409     // OD 2004-02-16 #106629# - adding paragraph and table spacing at bottom
410     // of table cells
411     void SetAddParaSpacingToTableCells( bool _bAddParaSpacingToTableCells );
412 
413     // OD 06.01.2004 #i11859# - former formatting of text lines with
414     // proportional line spacing or not
415     void SetUseFormerLineSpacing( bool _bUseFormerLineSpacing );
416 
417     // OD 2004-03-12 #i11860# - former object positioning
418     void SetUseFormerObjectPositioning( bool _bUseFormerObjPos );
419 
420     // OD 2004-05-05 #i28701#
421     void SetConsiderWrapOnObjPos( bool _bConsiderWrapOnObjPos );
422 
423     // --> FME #108724#
424     void SetUseFormerTextWrapping( bool _bUseFormerTextWrapping );
425 
426     // -> PB 2007-06-11 #i45491#
427     void SetDoNotJustifyLinesWithManualBreak( bool _bDoNotJustifyLinesWithManualBreak );
428     // <--
429 
430     //
431     // DOCUMENT COMPATIBILITY FLAGS END
432     //
433 
434     //Ruft den Idle-Formatierer des Layouts
435 	void LayoutIdle();
436 
437 	inline const SwViewOption *GetViewOptions() const { return pOpt; }
438     virtual void  ApplyViewOptions( const SwViewOption &rOpt );
439 		   void  SetUIOptions( const SwViewOption &rOpt );
440 		   void  SetReadonlyOption(sal_Bool bSet);   // Readonly-Bit d. ViewOptions setzen
441            void  SetPDFExportOption(sal_Bool bSet);   // set/reset PDF export mode
442            void  SetPrtFormatOption(sal_Bool bSet);  // PrtFormat-Bit d. ViewOptions setzen
443            void  SetReadonlySelectionOption(sal_Bool bSet);//change the selection mode in readonly docs
444 
445     const SwAccessibilityOptions* GetAccessibilityOptions() const { return pAccOptions;}
446 
447     static void           SetShellRes( ShellResource* pRes ) { pShellRes = pRes; }
448     static ShellResource* GetShellRes();
449 
450     static void           SetCareWin( Window* pNew );
451     static Window*        GetCareWin(ViewShell& rVSh)
452                           { return pCareWindow ? pCareWindow : CareChildWin(rVSh); }
453 	static Window* 		  CareChildWin(ViewShell& rVSh);
454 
455 	inline SfxViewShell   *GetSfxViewShell() { return pSfxViewShell; }
456     inline void           SetSfxViewShell(SfxViewShell *pNew) { pSfxViewShell = pNew; }
457 
458 	// Selektion der Draw ::com::sun::star::script::Engine geaendert
459     virtual void DrawSelChanged();
460 
461     // OD 12.12.2002 #103492#
462     SwPagePreviewLayout* PagePreviewLayout();
463 
464     /** adjust view options for page preview
465 
466         OD 09.01.2003 #i6467#
467         Because page preview should show the document as it is printed -
468         page preview is print preview -, the view options are adjusted to the
469         same as for printing.
470 
471         @param _rPrintOptions
472         input parameter - constant reference to print options, to which the
473         view option will be adjusted.
474     */
475     void AdjustOptionsForPagePreview( SwPrintData const& rPrintOptions );
476 
477 	sal_Bool IsViewLocked() const { return bViewLocked; }
478 	void LockView( sal_Bool b )	  { bViewLocked = b;	}
479 
480 	inline void LockPaint();
481 		   void ImplLockPaint();
482 	inline void UnlockPaint( sal_Bool bVirDev = sal_False );
483 		   void ImplUnlockPaint( sal_Bool bVirDev );
484 		   sal_Bool IsPaintLocked() const { return nLockPaint != 0; }
485 
486 	// Abfragen/Erzeugen DrawView + PageView
487 	sal_Bool HasDrawView() const;
488 	void MakeDrawView();
489 
490 	//DrawView darf u.U. am UI benutzt werden.
491 		  SdrView *GetDrawView();
492 	const SdrView *GetDrawView() const { return ((ViewShell*)this)->GetDrawView(); }
493 
494 	//sorge dafuer, das auf jedenfall die MarkListe aktuell ist (Bug 57153)
495 	SdrView *GetDrawViewWithValidMarkList();
496 
497 	// erfrage den Attribut Pool
498 	inline const SfxItemPool& GetAttrPool() const;
499 				 SfxItemPool& GetAttrPool();
500 
501 	sal_Bool IsPreView() const { return bPreView; }
502 
503     sal_Bool IsFrameView()  const { return bFrameView; }
504     void SetFrameView( const Size& rBrowseBorder )
505            { bFrameView = sal_True; aBrowseBorder = rBrowseBorder; }
506 
507 	//Nimmt die notwendigen Invalidierungen vor,
508 	//wenn sich der BrowdseModus aendert, bBrowseChgd == sal_True
509 	//oder, im BrowseModus, wenn sich die Groessenverhaeltnisse
510 	//aendern (bBrowseChgd == sal_False)
511 	void CheckBrowseView( sal_Bool bBrowseChgd );
512 
513     const Size& GetBrowseBorder() const;
514 	sal_Int32 GetBrowseWidth() const;
515 	void SetBrowseBorder( const Size& rNew );
516 
517     ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
518 
519     // OD 15.01.2003 #103492# - change method signature due to new page preview
520     // functionality.
521     ::com::sun::star::uno::Reference<
522         ::com::sun::star::accessibility::XAccessible >
523             CreateAccessiblePreview();
524 
525 	void ShowPreViewSelection( sal_uInt16 nSelPage );
526 	void InvalidateAccessibleFocus();
527 
528     //apply Accessiblity options
529     void ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions);
530 
531     /** invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
532 
533         OD 2005-12-01 #i27138#
534 
535         @author OD
536 
537         @param _pFromTxtFrm
538         input parameter - paragraph frame, for which the relation CONTENT_FLOWS_FROM
539         has to be invalidated.
540         If NULL, no CONTENT_FLOWS_FROM relation has to be invalidated
541 
542         @param _pToTxtFrm
543         input parameter - paragraph frame, for which the relation CONTENT_FLOWS_TO
544         has to be invalidated.
545         If NULL, no CONTENT_FLOWS_TO relation has to be invalidated
546     */
547     void InvalidateAccessibleParaFlowRelation( const SwTxtFrm* _pFromTxtFrm,
548                                                const SwTxtFrm* _pToTxtFrm );
549 
550     /** invalidate text selection for paragraphs
551 
552         OD 2005-12-12 #i27301#
553 
554         @author OD
555     */
556     void InvalidateAccessibleParaTextSelection();
557 
558     /** invalidate attributes for paragraphs and paragraph's characters
559 
560         OD 2009-01-06 #i88069#
561         OD 2010-02-16 #i104008# - usage also for changes of the attributes of
562         paragraph's characters.
563 
564         @author OD
565 
566         @param rTxtFrm
567         input parameter - paragraph frame, whose attributes have changed
568     */
569     void InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm );
570 
571     SwAccessibleMap* GetAccessibleMap();
572 
573     ViewShell( ViewShell&, Window *pWin = 0, OutputDevice *pOut = 0,
574 				long nFlags = 0 );
575 	ViewShell( SwDoc& rDoc, Window *pWin,
576 			   const SwViewOption *pOpt = 0, OutputDevice *pOut = 0,
577 			   long nFlags = 0 );
578 	virtual ~ViewShell();
579 
580     // --> FME 2004-06-15 #i12836# enhanced pdf export
581     sal_Int32 GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const SwRect& rRect ) const;
582     // <--
583 
584     inline bool IsInConstructor() const { return mbInConstructor; }
585 
586     // --> PB 2007-05-30 #146850#
587     static const BitmapEx& GetReplacementBitmap( bool bIsErrorState );
588     static void DeleteReplacementBitmaps();
589     // <--
590 
591     const SwPostItMgr* GetPostItMgr() const { return (const_cast<ViewShell*>(this))->GetPostItMgr(); }
592     SwPostItMgr* GetPostItMgr();
593 };
594 
595 //---- class CurrShell verwaltet den globalen ShellPointer -------------------
596 
597 class CurrShell
598 {
599 public:
600 	ViewShell *pPrev;
601 	SwRootFrm *pRoot;
602 
603 	CurrShell( ViewShell *pNew );
604 	~CurrShell();
605 };
606 
607 inline void ViewShell::ResetInvalidRect()
608 {
609    aInvalidRect.Clear();
610 }
611 
612 inline void ViewShell::StartAction()
613 {
614 	if ( !nStartAction++ )
615 		ImplStartAction();
616 }
617 inline void ViewShell::EndAction( const sal_Bool bIdleEnd )
618 {
619 	if( 0 == (nStartAction - 1) )
620 		ImplEndAction( bIdleEnd );
621 	--nStartAction;
622 }
623 
624 inline void ViewShell::LockPaint()
625 {
626 	if ( !nLockPaint++ )
627 		ImplLockPaint();
628 }
629 inline void ViewShell::UnlockPaint( sal_Bool bVirDev )
630 {
631 	if ( 0 == --nLockPaint )
632 		ImplUnlockPaint( bVirDev );
633 }
634 inline const SfxItemPool& ViewShell::GetAttrPool() const
635 {
636 	return ((ViewShell*)this)->GetAttrPool();
637 }
638 
639 
640 
641 #endif // SW_VIEWSH_HXX
642