Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sw / inc / viewsh.hxx
blob583b795a1b22ad9161a0b599d8ee30e16f60b257
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #pragma once
22 #include "swdllapi.h"
23 #include "swtypes.hxx"
24 #include "ring.hxx"
25 #include "swrect.hxx"
26 #include <memory>
27 #include <stack>
28 #include <vcl/mapmod.hxx>
29 #include <vcl/vclptr.hxx>
30 #include <vcl/lazydelete.hxx>
31 #include <vcl/window.hxx>
33 namespace com::sun::star::accessibility { class XAccessible; }
34 class SwDoc;
35 class IDocumentSettingAccess;
36 class IDocumentDeviceAccess;
37 class IDocumentMarkAccess;
38 class IDocumentDrawModelAccess;
39 class IDocumentRedlineAccess;
40 class IDocumentLayoutAccess;
41 class IDocumentContentOperations;
42 class IDocumentStylePoolAccess;
43 class IDocumentStatistics;
44 class IDocumentUndoRedo;
45 class IDocumentListItems;
46 class IDocumentOutlineNodes;
47 class SfxPrinter;
48 class SwRootFrame;
49 class SwNodes;
50 class SdrView;
51 class SfxItemPool;
52 class SfxViewShell;
53 class SwViewOption;
54 class SwViewShellImp;
55 class SwPrintData;
56 struct ShellResource;
57 class SwRegionRects;
58 class SvtAccessibilityOptions;
59 class SwPagePreviewLayout;
60 class SwTextFrame;
62 struct SwAccessibilityOptions;
63 namespace vcl { class Region; }
64 class SwPostItMgr;
65 class SdrPaintWindow;
66 class SwAccessibleMap;
67 enum class Orientation;
69 enum class LockPaintReason
71 ViewLayout = 1,
72 OuterResize,
73 Undo,
74 Redo,
75 OutlineFolding,
76 EndSdrCreate,
77 SwLayIdle,
78 InvalidateLayout,
79 StartDrag,
80 DataChanged,
81 InsertFrame,
82 GotoPage,
83 InsertGraphic,
84 SetZoom,
85 ExampleFrame
88 namespace vcl
90 typedef OutputDevice RenderContext;
93 // Define for flags needed in ctor or layers below.
94 // Currently the Preview flag is needed for DrawPage.
95 #define VSHELLFLAG_ISPREVIEW (tools::Long(0x1))
96 #define VSHELLFLAG_SHARELAYOUT (tools::Long(0x2))
97 typedef std::shared_ptr<SwRootFrame> SwRootFramePtr;
99 typedef struct _xmlTextWriter* xmlTextWriterPtr;
101 struct SwVisiblePageNumbers
103 sal_uInt16 nFirstPhy, nLastPhy;
104 sal_uInt16 nFirstVirt, nLastVirt;
105 OUString sFirstCustomPhy, sLastCustomPhy;
106 OUString sFirstCustomVirt, sLastCustomVirt;
109 class SW_DLLPUBLIC SwViewShell : public sw::Ring<SwViewShell>
111 friend void SetOutDev( SwViewShell *pSh, OutputDevice *pOut );
112 friend void SetOutDevAndWin( SwViewShell *pSh, OutputDevice *pOut,
113 vcl::Window *pWin, sal_uInt16 nZoom );
115 friend class SwViewShellImp;
116 friend class SwLayIdle;
118 // For setting visible area for page preview paint.
119 friend class SwPagePreviewLayout;
121 // Set SwVisArea in order to enable clean formatting before printing.
122 friend void SetSwVisArea( SwViewShell *pSh, const SwRect & );
124 std::unique_ptr<BitmapEx> m_xReplaceBmp; ///< replaced display of still loaded images
125 std::unique_ptr<BitmapEx> m_xErrorBmp; ///< error display of missed images
127 static bool sbLstAct; // true if EndAction of last Shell
128 // i.e. if the EndActions of the other
129 // Shells on the document are through.
131 Point maPrtOffset; // Offset for Printer,
132 // non-printable margin.
133 Size maBrowseBorder; // Border for frame documents.
134 SwRect maInvalidRect;
136 SfxViewShell *mpSfxViewShell;
137 std::unique_ptr<SwViewShellImp>
138 mpImp; // Core-internals of SwViewShell.
139 // The pointer is never 0.
141 VclPtr<vcl::Window> mpWin; ///< = 0 during printing or pdf export
142 VclPtr<OutputDevice> mpOut; ///< Window, Printer, VirtDev, ...
144 std::unique_ptr<SwViewOption> mpOpt;
145 std::unique_ptr<SwAccessibilityOptions> mpAccOptions;
147 bool mbDocSizeChgd :1; // For DocChgNotify(): Announce new DocSize
148 // at EndAction to DocMDI.
149 bool mbPaintWorks :1; // Normal Painting if true,
150 // remember Paint if false.
151 bool mbPaintInProgress :1; // Block any double paint.
152 bool mbViewLocked :1; // Lock visible range;
153 // in this case MakeVisible is ineffectual.
154 bool mbInEndAction :1; // Avoid problems, cf. viewsh.cxx.
155 bool mbPreview :1; // If true it is a Preview-SwViewShell.
156 bool mbFrameView :1; // If true it is a (HTML-)Frame.
157 bool mbEnableSmooth :1; // Disable SmoothScroll, e.g. for drag
158 // of scrollbars.
159 bool mbShowHeaderSeparator:1; ///< Flag to say that we are showing the header control
160 bool mbShowFooterSeparator:1; ///< Flag to say that we are showing the footer control
161 bool mbHeaderFooterEdit:1; ///< Flag to say that we are editing header or footer (according to the bShow(Header|Footer)Separator above)
163 // boolean, indicating that class in constructor.
164 bool mbInConstructor:1;
166 SdrPaintWindow* mpTargetPaintWindow;
167 VclPtr<OutputDevice> mpBufferedOut;
169 SwRootFramePtr mpLayout;
171 // Initialization; called by the diverse constructors.
172 SAL_DLLPRIVATE void Init( const SwViewOption *pNewOpt );
174 inline void ResetInvalidRect();
178 SAL_DLLPRIVATE void PaintDesktop(const vcl::RenderContext& rRenderContext, const SwRect&); // Collect values for painting of desktop
179 // and calling.
180 // PaintDesktop split. This pars is also used by PreviewPage.
181 SAL_DLLPRIVATE void PaintDesktop_(const SwRegionRects &rRegion);
183 SAL_DLLPRIVATE bool CheckInvalidForPaint( const SwRect & ); // Direct Paint or rather
184 // trigger an action.
186 SAL_DLLPRIVATE void PrepareForPrint( const SwPrintData &rOptions, bool bIsPDFExport = false );
188 SAL_DLLPRIVATE void ImplApplyViewOptions( const SwViewOption &rOpt );
190 SAL_DLLPRIVATE void InvalidateAll(std::vector<LockPaintReason>& rReasons);
192 protected:
193 static ShellResource* spShellRes; ///< Resources for the Shell.
194 static vcl::DeleteOnDeinit< std::shared_ptr<weld::Window> > spCareDialog; ///< Avoid this window.
196 SwRect maVisArea; ///< The modern version of VisArea.
197 tools::Rectangle maLOKVisibleArea;///< The visible area in the LibreOfficeKit client.
198 rtl::Reference<SwDoc> mxDoc; ///< The document; never 0.
200 sal_uInt16 mnStartAction; ///< != 0 if at least one Action is active.
201 sal_uInt16 mnLockPaint; ///< != 0 if Paint is locked.
202 std::vector<LockPaintReason> maLockPaintReasons;
203 bool mbSelectAll; ///< Special select all mode: whole document selected, even if doc starts with table.
205 /// The virtual device we paint to will end up on the screen.
206 bool mbOutputToWindow;
208 public:
210 SwViewShellImp *Imp() { return mpImp.get(); }
211 const SwViewShellImp *Imp() const { return mpImp.get(); }
213 const SwNodes& GetNodes() const;
215 // After change of printer; by Doc.
216 void InitPrt( OutputDevice *pOutDev );
218 // Bracketing of actions belonging together.
219 inline void StartAction();
220 void ImplStartAction();
221 inline void EndAction( const bool bIdleEnd = false );
222 void ImplEndAction( const bool bIdleEnd );
223 sal_uInt16 ActionCount() const { return mnStartAction; }
224 bool ActionPend() const { return mnStartAction != 0; }
225 bool IsInEndAction() const { return mbInEndAction; }
227 // The ActionCount for all Shells is temporarily set to zero and then
228 // restored at the RootFrame via UNO.
229 void SetRestoreActions(sal_uInt16 nSet);
230 sal_uInt16 GetRestoreActions() const;
232 bool HasInvalidRect() const { return maInvalidRect.HasArea(); }
233 void ChgHyphenation() { Reformat(); }
234 void ChgNumberDigits();
236 bool AddPaintRect( const SwRect &rRect );
238 void InvalidateWindows( const SwRect &rRect );
239 void FlushPendingLOKInvalidateTiles();
241 /// Invalidates complete Layout (ApplyViewOption).
242 void Reformat();
244 // #i72754# set of Pre/PostPaints with lock counter and initial target OutDev
245 protected:
246 std::stack<vcl::Region> mPrePostPaintRegions; // acts also as a lock counter (empty == not locked)
247 VclPtr<OutputDevice> mpPrePostOutDev;
248 MapMode maPrePostMapMode;
249 public:
250 void PrePaint();
251 void DLPrePaint2(const vcl::Region& rRegion);
252 void DLPostPaint2(bool bPaintFormLayer);
253 const MapMode& getPrePostMapMode() const { return maPrePostMapMode; }
255 virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect);
257 /** Paint tile.
259 Sets the pOut so that the rRect is always painted over the entire
260 pOut, ie. starts in 0,0 and ends in width/height.
262 void PaintTile(VirtualDevice &rDevice, int contextWidth, int contextHeight, int tilePosX, int tilePosY, tools::Long tileWidth, tools::Long tileHeight);
264 bool IsPaintInProgress() const { return mbPaintInProgress; }
265 bool IsDrawingLayerPaintInProgress() const { return !mPrePostPaintRegions.empty(); }
267 // Notification that visible area has been changed.
268 // VisArea is reset, after that scrolling takes place.
269 // The passed rect is situated on pixel borders
270 // in order to avoid pixel errors when scrolling.
271 virtual void VisPortChgd( const SwRect & );
272 bool SmoothScroll( tools::Long lXDiff, tools::Long lYDiff, const tools::Rectangle* );//Browser
273 void EnableSmooth( bool b ) { mbEnableSmooth = b; }
275 const SwRect& VisArea() const;
277 /// The visible area in the client (set by setClientVisibleArea).
278 const tools::Rectangle & getLOKVisibleArea() const { return maLOKVisibleArea; }
279 void setLOKVisibleArea(const tools::Rectangle& rArea) { maLOKVisibleArea = rArea; }
281 // If necessary scroll until passed Rect is situated in visible sector.
282 void MakeVisible( const SwRect & );
284 // At nearest occasion pass new document size to UI.
285 void SizeChgNotify();
286 void UISizeNotify(); // Passing of current size.
288 Point GetPagePos( sal_uInt16 nPageNum ) const;
290 sal_uInt16 GetNumPages() const; // Ask count of current pages from layout.
291 bool IsDummyPage( sal_uInt16 nPageNum ) const; // An empty page?
293 // Invalidate first visible page for all Shells in ring.
294 void SetFirstVisPageInvalid();
296 SwRootFrame *GetLayout() const;
297 bool IsNewLayout() const; // Has Layout been loaded or created?
299 Size GetDocSize() const; // Get document size.
301 virtual void CalcLayout(); // Force complete formatting of layout.
303 sal_uInt16 GetPageCount() const;
305 Size GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const;
307 SwDoc *GetDoc() const { return mxDoc.get(); } //Never 0.
309 /** Provides access to the document setting interface
311 const IDocumentSettingAccess& getIDocumentSettingAccess() const;
312 IDocumentSettingAccess& getIDocumentSettingAccess();
314 /** Provides access to the document device interface
316 const IDocumentDeviceAccess& getIDocumentDeviceAccess() const;
317 IDocumentDeviceAccess& getIDocumentDeviceAccess();
319 /** Provides access to the document bookmark interface
321 const IDocumentMarkAccess* getIDocumentMarkAccess() const;
322 IDocumentMarkAccess* getIDocumentMarkAccess();
324 /** Provides access to the document draw model interface
326 const IDocumentDrawModelAccess& getIDocumentDrawModelAccess() const;
327 IDocumentDrawModelAccess& getIDocumentDrawModelAccess();
329 /** Provides access to the document redline interface
331 const IDocumentRedlineAccess& getIDocumentRedlineAccess() const;
332 IDocumentRedlineAccess& getIDocumentRedlineAccess();
334 /** Provides access to the document layout interface
336 const IDocumentLayoutAccess& getIDocumentLayoutAccess() const;
337 IDocumentLayoutAccess& getIDocumentLayoutAccess();
339 /** Provides access to the content operations interface
341 IDocumentContentOperations& getIDocumentContentOperations();
343 /** Provides access to the document style pool interface
345 IDocumentStylePoolAccess& getIDocumentStylePoolAccess();
347 /** Provides access to the document statistics interface
349 const IDocumentStatistics& getIDocumentStatistics() const;
351 /** Provides access to the document undo/redo interface
353 IDocumentUndoRedo const& GetIDocumentUndoRedo() const;
354 IDocumentUndoRedo & GetIDocumentUndoRedo();
356 const IDocumentListItems* getIDocumentListItemsAccess() const;
357 const IDocumentOutlineNodes* getIDocumentOutlineNodesAccess() const;
359 // 1. GetRefDev: Either the printer or the virtual device from the doc
360 // 2. GetWin: Available if we not printing
361 // 3. GetOut: Printer, Window or Virtual device
362 vcl::RenderContext& GetRefDev() const;
363 vcl::Window* GetWin() const { return mpWin; }
364 vcl::RenderContext* GetOut() const { return mpOut; }
366 void SetWin(vcl::Window* win) { mpWin = win; }
367 void SetOut(vcl::RenderContext* pOut) { mpOut = pOut; }
368 static bool IsLstEndAction() { return SwViewShell::sbLstAct; }
370 // Change of all page descriptors.
371 void ChgAllPageOrientation( Orientation eOri );
372 void ChgAllPageSize( Size const &rSz );
374 // Printing of one page.
375 // bIsPDFExport == true is: do PDF Export (no printing!)
376 bool PrintOrPDFExport( OutputDevice *pOutDev,
377 SwPrintData const& rPrintData,
378 sal_Int32 nRenderer, /* offset in vector of pages to print */
379 bool bIsPDFExport );
381 // Printing of one brochure page.
382 void PrintProspect( OutputDevice *pOutDev, const SwPrintData &rPrintData,
383 sal_Int32 nRenderer /* offset in vector of page pairs for prospect printing */ );
385 // Printing for OLE 2.0.
386 static void PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions,
387 vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect,
388 bool bOutputForScreen );
390 // Fill temporary doc with selected text for Print or PDF export.
391 void FillPrtDoc( SwDoc& rPrtDoc, const SfxPrinter* pPrt );
393 // Called internally for Shell. Formats pages.
394 void CalcPagesForPrint( sal_uInt16 nMax );
396 // All about fields.
397 void UpdateFields(bool bCloseDB = false);
398 bool IsAnyFieldInDoc() const;
400 /// Update the previews of all OLE objects.
401 void UpdateOleObjectPreviews();
403 // Update all charts, for that exists any table.
404 void UpdateAllCharts();
405 bool HasCharts() const;
407 // DOCUMENT COMPATIBILITY FLAGS START
409 // Add or maximize paragraph spacing?
410 void SetParaSpaceMax( bool bNew );
412 // Add or maximize paragraph spacing?
413 void SetParaSpaceMaxAtPages( bool bNew );
415 // Compatible behaviour of tabs.
416 void SetTabCompat( bool bNew );
418 // Font metric attribute "External Leading" should be considered.
419 void SetAddExtLeading( bool bNew );
421 // Adding paragraph and table spacing at bottom
422 // of table cells.
423 void SetAddParaSpacingToTableCells( bool _bAddParaSpacingToTableCells );
425 // Former formatting of text lines with
426 // proportional line spacing or not.
427 void SetUseFormerLineSpacing( bool _bUseFormerLineSpacing );
429 // Former object positioning.
430 void SetUseFormerObjectPositioning( bool _bUseFormerObjPos );
432 void SetConsiderWrapOnObjPos( bool _bConsiderWrapOnObjPos );
434 void SetUseFormerTextWrapping( bool _bUseFormerTextWrapping );
436 void SetDoNotJustifyLinesWithManualBreak( bool _bDoNotJustifyLinesWithManualBreak );
438 void SetProtectForm( bool _bProtectForm );
440 void SetMsWordCompTrailingBlanks( bool _bMsWordCompTrailingBlanks );
442 void SetSubtractFlysAnchoredAtFlys(bool bSubtractFlysAnchoredAtFlys);
444 void SetEmptyDbFieldHidesPara(bool bEmptyDbFieldHidesPara);
446 // DOCUMENT COMPATIBILITY FLAGS END
448 // Calls Idle-formatter of Layout.
449 void LayoutIdle();
451 const SwViewOption *GetViewOptions() const { return mpOpt.get(); }
452 virtual void ApplyViewOptions( const SwViewOption &rOpt );
453 void SetUIOptions( const SwViewOption &rOpt );
454 virtual void SetReadonlyOption(bool bSet); // Set readonly-bit of ViewOptions.
455 void SetPDFExportOption(bool bSet); // Set/reset PDF export mode.
456 void SetPrtFormatOption(bool bSet); // Set PrtFormat-Bit of ViewOptions.
457 void SetReadonlySelectionOption(bool bSet); // Change the selection mode in readonly docs.
459 const SwAccessibilityOptions* GetAccessibilityOptions() const { return mpAccOptions.get();}
461 static void SetShellRes( ShellResource* pRes ) { spShellRes = pRes; }
462 static ShellResource* GetShellRes();
464 static weld::Window* CareChildWin(SwViewShell const & rVSh);
465 static void SetCareDialog(const std::shared_ptr<weld::Window>& rNew);
466 static weld::Window* GetCareDialog(SwViewShell const & rVSh)
467 { return (*spCareDialog.get()) ? spCareDialog.get()->get() : CareChildWin(rVSh); }
469 SfxViewShell *GetSfxViewShell() const { return mpSfxViewShell; }
470 void SetSfxViewShell(SfxViewShell *pNew) { mpSfxViewShell = pNew; }
472 // Selection of Draw Engine has been changed.
473 virtual void DrawSelChanged();
475 SwPagePreviewLayout* PagePreviewLayout();
477 /** adjust view options for page preview
479 Because page preview should show the document as it is printed -
480 page preview is print preview -, the view options are adjusted to the
481 same as for printing.
483 @param _rPrintOptions
484 input parameter - constant reference to print options, to which the
485 view option will be adjusted.
487 void AdjustOptionsForPagePreview( SwPrintData const& rPrintOptions );
489 bool IsViewLocked() const { return mbViewLocked; }
490 void LockView( bool b ) { mbViewLocked = b; }
492 inline void LockPaint(LockPaintReason eReason);
493 void ImplLockPaint();
494 inline void UnlockPaint(bool bVirDev = false );
495 void ImplUnlockPaint( std::vector<LockPaintReason>& rReasons, bool bVirDev );
496 bool IsPaintLocked() const { return mnLockPaint != 0; }
498 // Get/set DrawView and PageView.
499 bool HasDrawView() const;
500 void MakeDrawView();
502 // Are we dragging draw shapes around.
503 bool HasDrawViewDrag() const;
505 // DrawView may be used at UI.
506 SdrView *GetDrawView();
507 const SdrView *GetDrawView() const { return const_cast<SwViewShell*>(this)->GetDrawView(); }
509 // Take care that MarkList is up-to-date in any case (Bug 57153).
510 SdrView *GetDrawViewWithValidMarkList();
512 // Query attribute pool.
513 inline const SfxItemPool& GetAttrPool() const;
514 SfxItemPool& GetAttrPool();
516 bool IsPreview() const { return mbPreview; }
518 bool IsFrameView() const { return mbFrameView; }
520 // Invalidates pages and contents.
521 // When bSizeChanged==true, adds/removes
522 // headers and footers as necessary.
523 void InvalidateLayout(bool bSizeChanged);
525 const Size& GetBrowseBorder() const;
526 sal_Int32 GetBrowseWidth() const;
527 void SetBrowseBorder( const Size& rNew );
529 css::uno::Reference< css::accessibility::XAccessible > CreateAccessible();
531 css::uno::Reference< css::accessibility::XAccessible > CreateAccessiblePreview();
533 void ShowPreviewSelection( sal_uInt16 nSelPage );
534 void InvalidateAccessibleFocus();
536 // Apply Accessibility options.
537 void ApplyAccessibilityOptions();
539 /** invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
541 @param _pFromTextFrame
542 input parameter - paragraph frame, for which the relation CONTENT_FLOWS_FROM
543 has to be invalidated.
544 If NULL, no CONTENT_FLOWS_FROM relation has to be invalidated
546 @param _pToTextFrame
547 input parameter - paragraph frame, for which the relation CONTENT_FLOWS_TO
548 has to be invalidated.
549 If NULL, no CONTENT_FLOWS_TO relation has to be invalidated
551 void InvalidateAccessibleParaFlowRelation( const SwTextFrame* _pFromTextFrame,
552 const SwTextFrame* _pToTextFrame );
554 /** invalidate text selection for paragraphs
556 void InvalidateAccessibleParaTextSelection();
558 /** invalidate attributes for paragraphs and paragraph's characters
560 usage also for changes of the attributes of
561 paragraph's characters.
563 @param rTextFrame
564 input parameter - paragraph frame, whose attributes have changed
566 void InvalidateAccessibleParaAttrs( const SwTextFrame& rTextFrame );
568 SwAccessibleMap* GetAccessibleMap();
570 SwViewShell( SwViewShell&, vcl::Window *pWin, OutputDevice *pOut = nullptr,
571 tools::Long nFlags = 0 );
572 SwViewShell( SwDoc& rDoc, vcl::Window *pWin,
573 const SwViewOption *pOpt, OutputDevice *pOut = nullptr,
574 tools::Long nFlags = 0 );
575 virtual ~SwViewShell() override;
577 sal_Int32 GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const SwRect& rRect ) const;
579 bool IsInConstructor() const { return mbInConstructor; }
581 const BitmapEx& GetReplacementBitmap(bool bIsErrorState);
582 void DeleteReplacementBitmaps();
584 const SwPostItMgr* GetPostItMgr() const { return const_cast<SwViewShell*>(this)->GetPostItMgr(); }
585 SwPostItMgr* GetPostItMgr();
587 /// Acts both for headers / footers, depending on the bShow(Header|Footer)Separator flags
588 void ToggleHeaderFooterEdit();
589 /// Acts both for headers / footers, depending on the bShow(Header|Footer)Separator flags
590 bool IsHeaderFooterEdit() const { return mbHeaderFooterEdit; }
591 bool IsShowHeaderFooterSeparator( FrameControlType eControl ) { return (eControl == FrameControlType::Header)? mbShowHeaderSeparator: mbShowFooterSeparator; }
592 virtual void SetShowHeaderFooterSeparator( FrameControlType eControl, bool bShow );
593 bool IsSelectAll() const { return mbSelectAll; }
595 void setOutputToWindow(bool bOutputToWindow);
596 bool isOutputToWindow() const;
597 void OnGraphicArrived(const SwRect&);
599 void GetFirstLastVisPageNumbers(SwVisiblePageNumbers& rVisiblePageNumbers);
601 virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
604 // manages global ShellPointer
605 class CurrShell
607 public:
608 SwViewShell *pPrev;
609 SwRootFrame *pRoot;
611 CurrShell( SwViewShell *pNew );
612 ~CurrShell();
615 inline void SwViewShell::ResetInvalidRect()
617 maInvalidRect.Clear();
620 inline void SwViewShell::StartAction()
622 if ( !mnStartAction++ )
623 ImplStartAction();
626 inline void SwViewShell::EndAction( const bool bIdleEnd )
628 if( 0 == (mnStartAction - 1) )
629 ImplEndAction( bIdleEnd );
630 --mnStartAction;
633 inline void SwViewShell::LockPaint(LockPaintReason eReason)
635 maLockPaintReasons.push_back(eReason);
636 if ( !mnLockPaint++ )
637 ImplLockPaint();
640 inline void SwViewShell::UnlockPaint(bool bVirDev )
642 if ( 0 == --mnLockPaint )
644 ImplUnlockPaint(maLockPaintReasons, bVirDev);
645 maLockPaintReasons.clear();
649 inline const SfxItemPool& SwViewShell::GetAttrPool() const
651 return const_cast<SwViewShell*>(this)->GetAttrPool();
655 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */