LCOV - code coverage report
Current view: top level - sw/inc - viewsh.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 55 58 94.8 %
Date: 2014-11-03 Functions: 39 42 92.9 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : #ifndef INCLUDED_SW_INC_VIEWSH_HXX
      20             : #define INCLUDED_SW_INC_VIEWSH_HXX
      21             : 
      22             : #include <com/sun/star/embed/XClassifiedObject.hpp>
      23             : #include <com/sun/star/embed/XEmbeddedObject.hpp>
      24             : #include <tools/rtti.hxx>
      25             : #include "swdllapi.h"
      26             : #include <swtypes.hxx>
      27             : #include <ring.hxx>
      28             : #include <swrect.hxx>
      29             : #include <boost/shared_ptr.hpp>
      30             : #include <stack>
      31             : #include <vcl/mapmod.hxx>
      32             : #include <vcl/print.hxx>
      33             : 
      34             : namespace com { namespace sun { namespace star { namespace accessibility {
      35             :            class XAccessible; } } } }
      36             : 
      37             : class SwDoc;
      38             : class IDocumentSettingAccess;
      39             : class IDocumentDeviceAccess;
      40             : class IDocumentMarkAccess;
      41             : class IDocumentDrawModelAccess;
      42             : class IDocumentRedlineAccess;
      43             : class IDocumentLayoutAccess;
      44             : class IDocumentFieldsAccess;
      45             : class IDocumentContentOperations;
      46             : class IDocumentStylePoolAccess;
      47             : class IDocumentStatistics;
      48             : class IDocumentUndoRedo;
      49             : class IDocumentListItems;
      50             : class IDocumentOutlineNodes;
      51             : class SfxPrinter;
      52             : class SfxProgress;
      53             : class SwRootFrm;
      54             : class SwNodes;
      55             : class SdrView;
      56             : class SfxItemPool;
      57             : class SfxViewShell;
      58             : class SwViewOption;
      59             : class SwViewImp;
      60             : class SwPrintData;
      61             : class SwPagePreviewPrtData;
      62             : namespace vcl { class Window; }
      63             : class OutputDevice;
      64             : class SwLayIdle;
      65             : struct ShellResource;
      66             : class SwRegionRects;
      67             : class SwFrm;
      68             : class SvtAccessibilityOptions;
      69             : class SwPagePreviewLayout;
      70             : class SwTxtFrm;
      71             : class BitmapEx;
      72             : 
      73             : struct SwAccessibilityOptions;
      74             : namespace vcl { class Region; }
      75             : class SwPostItMgr;
      76             : class SdrPaintWindow;
      77             : class SwAccessibleMap;
      78             : 
      79             : namespace vcl
      80             : {
      81             :     class OldStylePrintAdaptor;
      82             : }
      83             : 
      84             : enum FrameControlType
      85             : {
      86             :     PageBreak,
      87             :     Header,
      88             :     Footer
      89             : };
      90             : 
      91             : // Define for flags needed in ctor or layers below.
      92             : // Currently the Preview flag is needed for DrawPage.
      93             : #define VSHELLFLAG_ISPREVIEW            ((long)0x1)
      94             : #define VSHELLFLAG_SHARELAYOUT          ((long)0x2)
      95             : typedef boost::shared_ptr<SwRootFrm> SwRootFrmPtr;
      96             : 
      97             : class SW_DLLPUBLIC SwViewShell : public Ring
      98             : {
      99             :     friend void SetOutDev( SwViewShell *pSh, OutputDevice *pOut );
     100             :     friend void SetOutDevAndWin( SwViewShell *pSh, OutputDevice *pOut,
     101             :                                  vcl::Window *pWin, sal_uInt16 nZoom );
     102             : 
     103             :     friend class SwViewImp;
     104             :     friend class SwLayIdle;
     105             : 
     106             :     // For setting visible area for page preview paint.
     107             :     friend class SwPagePreviewLayout;
     108             : 
     109             :     // Set SwVisArea in order to enable clean formatting before printing.
     110             :     friend void SetSwVisArea( SwViewShell *pSh, const SwRect & );
     111             : 
     112             :     static BitmapEx*    mpReplaceBmp;    ///< replaced display of still loaded images
     113             :     static BitmapEx*    mpErrorBmp;      ///< error display of missed images
     114             : 
     115             :     static bool mbLstAct;        // sal_True if EndAction of last Shell
     116             :                                     // i.e. if the EndActions of the other
     117             :                                     // Shells on the document are through.
     118             : 
     119             :     Point         maPrtOffst;         // Ofst for Printer,
     120             :                                      // non-printable margin.
     121             :      Size         maBrowseBorder;     // Border for frame documents.
     122             :     SwRect        maInvalidRect;
     123             : 
     124             :     SfxViewShell *mpSfxViewShell;
     125             :     SwViewImp    *mpImp;             // Core-internals of SwViewShell.
     126             :                                     // The pointer is never 0.
     127             : 
     128             :     ::vcl::Window *mpWin;             ///< = 0 during printing or pdf export
     129             :     OutputDevice *mpOut;              ///< Window, Printer, VirtDev, ...
     130             :     OutputDevice* mpTmpRef;           // Temporariy reference device. Is used
     131             :                                      // during (printer depending) prospect
     132             :                                      // and page preview printing
     133             :                                      // (because a scaling has to be set at
     134             :                                      // the original printer)
     135             : 
     136             :     SwViewOption *mpOpt;
     137             :     SwAccessibilityOptions* mpAccOptions;
     138             : 
     139             :     bool  mbDocSizeChgd     :1;  // For DocChgNotify(): Announce new DocSize
     140             :                                     // at EndAction to DocMDI.
     141             :     bool  mbPaintWorks      :1;  // Normal Painting if sal_True,
     142             :                                     // remember Paint if sal_False.
     143             :     bool  mbPaintInProgress :1;  // Block any double paint.
     144             :     bool  mbViewLocked      :1;  // Lock visible range;
     145             :                                     // in this case MakeVisible is ineffectual.
     146             :     bool  mbInEndAction     :1;  // Avoid problems, cf. viewsh.cxx.
     147             :     bool  mbPreview         :1;  // If sal_True it is a Preview-SwViewShell.
     148             :     bool  mbFrameView       :1;  // If sal_True it is a  (HTML-)Frame.
     149             :     bool  mbEnableSmooth    :1;  // Disable SmoothScroll, e.g. for drag
     150             :                                     // of scrollbars.
     151             :     bool  mbEndActionByVirDev:1; // Paints from EndAction always via virtual device
     152             :                                     // (e.g. when browsing).
     153             :     bool      mbShowHeaderSeparator:1; ///< Flag to say that we are showing the header control
     154             :     bool      mbShowFooterSeparator:1; ///< Flag to say that we are showing the footer control
     155             :     bool      mbHeaderFooterEdit:1;  ///< Flag to say that we are editing header or footer (according to the bShow(Header|Footer)Separator above)
     156             : 
     157             :     // boolean, indicating that class in in constructor.
     158             :     bool mbInConstructor:1;
     159             :     bool mbTiledRendering:1; ///< Set if we are doing the tiled rendering (using PaintTile()).
     160             : 
     161             :     SdrPaintWindow*         mpTargetPaintWindow;
     162             :     OutputDevice*           mpBufferedOut;
     163             : 
     164             :     SwRootFrmPtr            mpLayout;
     165             : 
     166             :     // Initialization; called by the diverse constructors.
     167             :     SAL_DLLPRIVATE void Init( const SwViewOption *pNewOpt );
     168             : 
     169             :     inline void ResetInvalidRect();
     170             : 
     171             :     SAL_DLLPRIVATE void Reformat();          // Invalidates complete Layout (ApplyViewOption).
     172             : 
     173             :     SAL_DLLPRIVATE void PaintDesktop( const SwRect & );  // Collect values for painting of desktop
     174             :                                                         // and calling.
     175             :     // PaintDesktop split. This pars is also used by PreviewPage.
     176             :     SAL_DLLPRIVATE void _PaintDesktop( const SwRegionRects &rRegion );
     177             : 
     178             :     SAL_DLLPRIVATE bool CheckInvalidForPaint( const SwRect & );  // Direct Paint or rather
     179             :                                                                     // trigger an action.
     180             : 
     181             :     SAL_DLLPRIVATE void PrepareForPrint( const SwPrintData &rOptions );
     182             : 
     183             :     SAL_DLLPRIVATE void ImplApplyViewOptions( const SwViewOption &rOpt );
     184             : 
     185             : protected:
     186             :     static ShellResource*   mpShellRes;      ///< Resources for the Shell.
     187             :     static vcl::Window*          mpCareWindow;    ///< Avoid this window.
     188             : 
     189             :     SwRect                  maVisArea;       ///< The modern version of VisArea.
     190             :     SwDoc                   *mpDoc;          ///< The document; never 0.
     191             : 
     192             :     sal_uInt16 mnStartAction; ///< != 0 if at least one Action is active.
     193             :     sal_uInt16 mnLockPaint;   ///< != 0 if Paint is locked.
     194             :     bool      mbSelectAll; ///< Special select all mode: whole document selected, even if doc starts with table.
     195             : 
     196             : public:
     197             :     TYPEINFO();
     198             : 
     199     2153667 :           SwViewImp *Imp() { return mpImp; }
     200      793451 :     const SwViewImp *Imp() const { return mpImp; }
     201             : 
     202             :     const SwNodes& GetNodes() const;
     203             : 
     204             :     // After change of printer; by Doc.
     205             :     void            InitPrt( OutputDevice *pOutDev );
     206             : 
     207             :     // Bracketing of actions belonging together.
     208             :     inline void StartAction();
     209             :            void ImplStartAction();
     210             :     inline void EndAction( const bool bIdleEnd = false );
     211             :            void ImplEndAction( const bool bIdleEnd = false );
     212         466 :     sal_uInt16 ActionCount() const { return mnStartAction; }
     213      489754 :     bool ActionPend() const { return mnStartAction != 0; }
     214       13374 :     bool IsInEndAction() const { return mbInEndAction; }
     215             : 
     216       85916 :     void SetEndActionByVirDev( bool b ) { mbEndActionByVirDev = b; }
     217       52335 :     bool IsEndActionByVirDev()          { return mbEndActionByVirDev; }
     218             : 
     219             :     // The ActionCount for all Shells is temporarily set to zero and then
     220             :     // restored at the RootFrame via UNO.
     221             :     void    SetRestoreActions(sal_uInt16 nSet);
     222             :     sal_uInt16  GetRestoreActions() const;
     223             : 
     224           0 :     inline bool HasInvalidRect() const { return maInvalidRect.HasArea(); }
     225           1 :     void ChgHyphenation() { Reformat(); }
     226             :     void ChgNumberDigits();
     227             : 
     228             :     bool AddPaintRect( const SwRect &rRect );
     229             : 
     230             :     void InvalidateWindows( const SwRect &rRect );
     231             : 
     232             :     // #i72754# set of Pre/PostPaints with lock counter and initial target OutDev
     233             : protected:
     234             :     std::stack<vcl::Region> mPrePostPaintRegions; // acts also as a lock counter (empty == not locked)
     235             :     OutputDevice*           mpPrePostOutDev;
     236             :     MapMode                 maPrePostMapMode;
     237             : public:
     238             :     void PrePaint();
     239             :     void DLPrePaint2(const vcl::Region& rRegion);
     240             :     void DLPostPaint2(bool bPaintFormLayer);
     241        1232 :     const MapMode& getPrePostMapMode() const { return maPrePostMapMode; }
     242             : 
     243             :     virtual void Paint(const Rectangle &rRect);
     244             : 
     245             :     /** Paint tile.
     246             : 
     247             :         Sets the pOut so that the rRect is always painted over the entire
     248             :         pOut, ie. starts in 0,0 and ends in width/height.
     249             :     */
     250             :     void PaintTile(VirtualDevice &rDevice, int contextWidth, int contextHeight, int tilePosX, int tilePosY, long tileWidth, long tileHeight);
     251             : 
     252        3192 :     bool IsPaintInProgress() const { return mbPaintInProgress; }
     253         885 :     bool IsDrawingLayerPaintInProgress() const { return !mPrePostPaintRegions.empty(); }
     254             : 
     255             :     // Notification that visible area has been changed.
     256             :     // VisArea is reset, after that scrolling takes place.
     257             :     // The passed rect is situated on pixel borders
     258             :     // in order to avoid pixel errors when scrolling.
     259             :     virtual void VisPortChgd( const SwRect & );
     260             :     bool SmoothScroll( long lXDiff, long lYDiff, const Rectangle* );//Browser
     261       10598 :     void EnableSmooth( bool b ) { mbEnableSmooth = b; }
     262             : 
     263      715649 :     const SwRect& VisArea() const { return maVisArea; }
     264             : 
     265             :     // If necessary scroll until passed Rect is situated in visible sector.
     266             :     void MakeVisible( const SwRect & );
     267             : 
     268             :     // At nearest occasion pass new document size to UI.
     269             :     void SizeChgNotify();
     270             :     void UISizeNotify();            // Passing of current size.
     271             : 
     272             :     Point GetPagePos( sal_uInt16 nPageNum ) const;
     273             : 
     274             :     sal_uInt16 GetNumPages();   // Ask count of current pages from layout.
     275             :     bool   IsDummyPage( sal_uInt16 nPageNum ) const;  // An empty page?
     276             : 
     277             :     // Invalidate first visible page for all Shells in ring.
     278             :     void SetFirstVisPageInvalid();
     279             : 
     280             :     SwRootFrm   *GetLayout() const;
     281             :     bool         IsNewLayout() const; // Has Layout been loaded or created?
     282             : 
     283             :      Size GetDocSize() const;   // Get document size.
     284             : 
     285             :     virtual void CalcLayout();  // Force complete formatting of layout.
     286             : 
     287             :     sal_uInt16 GetPageCount() const;
     288             : 
     289             :     const Size GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const;
     290             : 
     291     5610806 :     inline SwDoc *GetDoc()  const { return mpDoc; }  //Never 0.
     292             : 
     293             :     /** Provides access to the document setting interface
     294             :      */
     295             :     const IDocumentSettingAccess* getIDocumentSettingAccess() const;
     296             :           IDocumentSettingAccess* getIDocumentSettingAccess();
     297             : 
     298             :     /** Provides access to the document device interface
     299             :      */
     300             :     const IDocumentDeviceAccess* getIDocumentDeviceAccess() const;
     301             :           IDocumentDeviceAccess* getIDocumentDeviceAccess();
     302             : 
     303             :     /** Provides access to the document bookmark interface
     304             :      */
     305             :     const IDocumentMarkAccess* getIDocumentMarkAccess() const;
     306             :           IDocumentMarkAccess* getIDocumentMarkAccess();
     307             : 
     308             :     /** Provides access to the document draw model interface
     309             :      */
     310             :     const IDocumentDrawModelAccess* getIDocumentDrawModelAccess() const;
     311             :           IDocumentDrawModelAccess* getIDocumentDrawModelAccess();
     312             : 
     313             :     /** Provides access to the document redline interface
     314             :      */
     315             :     const IDocumentRedlineAccess* getIDocumentRedlineAccess() const;
     316             :           IDocumentRedlineAccess* getIDocumentRedlineAccess();
     317             : 
     318             :     /** Provides access to the document layout interface
     319             :      */
     320             :     const IDocumentLayoutAccess* getIDocumentLayoutAccess() const;
     321             :           IDocumentLayoutAccess* getIDocumentLayoutAccess();
     322             : 
     323             :     /** Provides access to the content operations interface
     324             :      */
     325             :     IDocumentContentOperations* getIDocumentContentOperations();
     326             : 
     327             :     /** Provides access to the document style pool interface
     328             :      */
     329             :     IDocumentStylePoolAccess* getIDocumentStylePoolAccess();
     330             : 
     331             :     /** Provides access to the document statistics interface
     332             :      */
     333             :     const IDocumentStatistics* getIDocumentStatistics() const;
     334             : 
     335             :     /** Provides access to the document undo/redo interface
     336             :      */
     337             :     IDocumentUndoRedo const& GetIDocumentUndoRedo() const;
     338             :     IDocumentUndoRedo      & GetIDocumentUndoRedo();
     339             : 
     340             :     const IDocumentListItems* getIDocumentListItemsAccess() const;
     341             :     const IDocumentOutlineNodes* getIDocumentOutlineNodesAccess() const;
     342             : 
     343             :     // 1. GetRefDev:   Either the printer or the virtual device from the doc
     344             :     // 2. GetWin:      Available if we not printing
     345             :     // 3. GetOut:      Printer, Window or Virtual device
     346             :     OutputDevice& GetRefDev() const;
     347     6859693 :     inline vcl::Window* GetWin()    const { return mpWin; }
     348     2146523 :     inline OutputDevice* GetOut()     const { return mpOut; }
     349             : 
     350           0 :     void SetWin(vcl::Window* win) { mpWin = win; }
     351        4274 :     static inline bool IsLstEndAction() { return SwViewShell::mbLstAct; }
     352             : 
     353             :     // Change of all page descriptors.
     354             :     void   ChgAllPageOrientation( Orientation eOri );
     355             :     void   ChgAllPageSize( Size &rSz );
     356             : 
     357             :     // Printing of one page.
     358             :     // bIsPDFExport == true is: do PDF Export (no printing!)
     359             :     bool PrintOrPDFExport( OutputDevice *pOutDev,
     360             :             SwPrintData const& rPrintData,
     361             :             sal_Int32 nRenderer /* offset in vector of pages to print */ );
     362             : 
     363             :     // Printing of one brochure page.
     364             :     void PrintProspect( OutputDevice *pOutDev, const SwPrintData &rPrintData,
     365             :             sal_Int32 nRenderer /* offset in vector of page pairs for prospect printing */ );
     366             : 
     367             :     // Printing for OLE 2.0.
     368             :     static void PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions,
     369             :                          OutputDevice* pOleOut, const Rectangle& rRect );
     370             : 
     371             :     // Fill temporary doc with selected text for Print or PDF export.
     372             :     SwDoc * FillPrtDoc( SwDoc* pPrtDoc, const SfxPrinter* pPrt );
     373             : 
     374             :     // Called internally for Shell. Formats pages.
     375             :     void CalcPagesForPrint( sal_uInt16 nMax );
     376             : 
     377             :     // All about fields.
     378             :     void UpdateFlds(bool bCloseDB = false);
     379             :     bool IsAnyFieldInDoc() const;
     380             :     // Update all charts, for that exists any table.
     381             :     void UpdateAllCharts();
     382             :     bool HasCharts() const;
     383             : 
     384             :     // DOCUMENT COMPATIBILITY FLAGS START
     385             : 
     386             :     // Add or maximize paragraph spacing?
     387             :     void SetParaSpaceMax( bool bNew );
     388             : 
     389             :     // Add or maximize paragraph spacing?
     390             :     void SetParaSpaceMaxAtPages( bool bNew );
     391             : 
     392             :     // Compatible behaviour of tabs.
     393             :     void SetTabCompat( bool bNew );
     394             : 
     395             :     // Font metric attribute "External Leading" should be considered.
     396             :     void SetAddExtLeading( bool bNew );
     397             : 
     398             :     // Formatting by virtual device or printer.
     399             :     void SetUseVirDev( bool nNew );
     400             : 
     401             :     // Adding paragraph and table spacing at bottom
     402             :     // of table cells.
     403             :     void SetAddParaSpacingToTableCells( bool _bAddParaSpacingToTableCells );
     404             : 
     405             :     // Former formatting of text lines with
     406             :     // proportional line spacing or not.
     407             :     void SetUseFormerLineSpacing( bool _bUseFormerLineSpacing );
     408             : 
     409             :     // Former object positioning.
     410             :     void SetUseFormerObjectPositioning( bool _bUseFormerObjPos );
     411             : 
     412             :     void SetConsiderWrapOnObjPos( bool _bConsiderWrapOnObjPos );
     413             : 
     414             :     void SetUseFormerTextWrapping( bool _bUseFormerTextWrapping );
     415             : 
     416             :     void SetDoNotJustifyLinesWithManualBreak( bool _bDoNotJustifyLinesWithManualBreak );
     417             : 
     418             :     // DOCUMENT COMPATIBILITY FLAGS END
     419             : 
     420             :     // Calls Idle-formatter of Layout.
     421             :     void LayoutIdle();
     422             : 
     423    10173947 :     inline const SwViewOption *GetViewOptions() const { return mpOpt; }
     424             :     virtual void  ApplyViewOptions( const SwViewOption &rOpt );
     425             :            void  SetUIOptions( const SwViewOption &rOpt );
     426             :     virtual void  SetReadonlyOption(bool bSet);          // Set readonly-bit of ViewOptions.
     427             :            void  SetPDFExportOption(bool bSet);         // Set/reset PDF export mode.
     428             :            void  SetPrtFormatOption(bool bSet);         // Set PrtFormat-Bit of ViewOptions.
     429             :            void  SetReadonlySelectionOption(bool bSet); // Change the selection mode in readonly docs.
     430             : 
     431       45072 :     const SwAccessibilityOptions* GetAccessibilityOptions() const { return mpAccOptions;}
     432             : 
     433         180 :     static void           SetShellRes( ShellResource* pRes ) { mpShellRes = pRes; }
     434             :     static ShellResource* GetShellRes();
     435             : 
     436             :     static void           SetCareWin( vcl::Window* pNew );
     437       61387 :     static vcl::Window*        GetCareWin(SwViewShell& rVSh)
     438       61387 :                           { return mpCareWindow ? mpCareWindow : CareChildWin(rVSh); }
     439             :     static vcl::Window*        CareChildWin(SwViewShell& rVSh);
     440             : 
     441       74611 :     inline SfxViewShell   *GetSfxViewShell() { return mpSfxViewShell; }
     442        4708 :     inline void           SetSfxViewShell(SfxViewShell *pNew) { mpSfxViewShell = pNew; }
     443             : 
     444             :     // Selection of  Draw Engine has been changed.
     445             :     virtual void DrawSelChanged();
     446             : 
     447             :     SwPagePreviewLayout* PagePreviewLayout();
     448             : 
     449             :     /** adjust view options for page preview
     450             : 
     451             :         Because page preview should show the document as it is printed -
     452             :         page preview is print preview -, the view options are adjusted to the
     453             :         same as for printing.
     454             : 
     455             :         @param _rPrintOptions
     456             :         input parameter - constant reference to print options, to which the
     457             :         view option will be adjusted.
     458             :     */
     459             :     void AdjustOptionsForPagePreview( SwPrintData const& rPrintOptions );
     460             : 
     461       56318 :     bool IsViewLocked() const { return mbViewLocked; }
     462      104821 :     void LockView( bool b )   { mbViewLocked = b;    }
     463             : 
     464             :     inline void LockPaint();
     465             :            void ImplLockPaint();
     466             :     inline void UnlockPaint( bool bVirDev = false );
     467             :            void ImplUnlockPaint( bool bVirDev );
     468      171114 :            bool IsPaintLocked() const { return mnLockPaint != 0; }
     469             : 
     470             :     // Get/set DrawView and PageView.
     471             :     bool HasDrawView() const;
     472             :     void MakeDrawView();
     473             : 
     474             :     // DrawView may be used at UI.
     475             :           SdrView *GetDrawView();
     476      331907 :     const SdrView *GetDrawView() const { return ((SwViewShell*)this)->GetDrawView(); }
     477             : 
     478             :     // Take care that MarkList is up-to-date in any case (Bug 57153).
     479             :     SdrView *GetDrawViewWithValidMarkList();
     480             : 
     481             :     // Query attribute pool.
     482             :     inline const SfxItemPool& GetAttrPool() const;
     483             :                  SfxItemPool& GetAttrPool();
     484             : 
     485      239142 :     bool IsPreview() const { return mbPreview; }
     486             : 
     487        1694 :     bool IsFrameView()  const { return mbFrameView; }
     488             :     void SetFrameView( const Size& rBrowseBorder )
     489             :            { mbFrameView = true; maBrowseBorder = rBrowseBorder; }
     490             : 
     491             :     // Makes the necessary invalidations:
     492             :     // If BrowseMode has changed bBrowseChgd == sal_True
     493             :     // or bBrowseChgd == sal_False in BrowseMode
     494             :     // if proportions have changed.
     495             :     void CheckBrowseView( bool bBrowseChgd );
     496             : 
     497             :     const Size& GetBrowseBorder() const;
     498             :     sal_Int32 GetBrowseWidth() const;
     499             :     void SetBrowseBorder( const Size& rNew );
     500             : 
     501             :     ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
     502             : 
     503             :     ::com::sun::star::uno::Reference<
     504             :         ::com::sun::star::accessibility::XAccessible >
     505             :             CreateAccessiblePreview();
     506             : 
     507             :     void ShowPreviewSelection( sal_uInt16 nSelPage );
     508             :     void InvalidateAccessibleFocus();
     509             : 
     510             :     // Apply Accessiblity options.
     511             :     void ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions);
     512             : 
     513             :     /** invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
     514             : 
     515             :         @author OD
     516             : 
     517             :         @param _pFromTxtFrm
     518             :         input parameter - paragraph frame, for which the relation CONTENT_FLOWS_FROM
     519             :         has to be invalidated.
     520             :         If NULL, no CONTENT_FLOWS_FROM relation has to be invalidated
     521             : 
     522             :         @param _pToTxtFrm
     523             :         input parameter - paragraph frame, for which the relation CONTENT_FLOWS_TO
     524             :         has to be invalidated.
     525             :         If NULL, no CONTENT_FLOWS_TO relation has to be invalidated
     526             :     */
     527             :     void InvalidateAccessibleParaFlowRelation( const SwTxtFrm* _pFromTxtFrm,
     528             :                                                const SwTxtFrm* _pToTxtFrm );
     529             : 
     530             :     /** invalidate text selection for paragraphs
     531             : 
     532             :         @author OD
     533             :     */
     534             :     void InvalidateAccessibleParaTextSelection();
     535             : 
     536             :     /** invalidate attributes for paragraphs and paragraph's characters
     537             : 
     538             :         usage also for changes of the attributes of
     539             :         paragraph's characters.
     540             : 
     541             :         @author OD
     542             : 
     543             :         @param rTxtFrm
     544             :         input parameter - paragraph frame, whose attributes have changed
     545             :     */
     546             :     void InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm );
     547             : 
     548             :     SwAccessibleMap* GetAccessibleMap();
     549             : 
     550             :     SwViewShell( SwViewShell&, vcl::Window *pWin = 0, OutputDevice *pOut = 0,
     551             :                 long nFlags = 0 );
     552             :     SwViewShell( SwDoc& rDoc, vcl::Window *pWin,
     553             :                const SwViewOption *pOpt = 0, OutputDevice *pOut = 0,
     554             :                long nFlags = 0 );
     555             :     virtual ~SwViewShell();
     556             : 
     557             :     sal_Int32 GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const SwRect& rRect ) const;
     558             : 
     559       80146 :     inline bool IsInConstructor() const { return mbInConstructor; }
     560             : 
     561             :     static const BitmapEx& GetReplacementBitmap( bool bIsErrorState );
     562             :     static void DeleteReplacementBitmaps();
     563             : 
     564      119052 :     const SwPostItMgr* GetPostItMgr() const { return (const_cast<SwViewShell*>(this))->GetPostItMgr(); }
     565             :     SwPostItMgr* GetPostItMgr();
     566             : 
     567             :     /// Acts both for headers / footers, depending on the bShow(Header|Footer)Separator flags
     568             :     void ToggleHeaderFooterEdit();
     569             :     /// Acts both for headers / footers, depending on the bShow(Header|Footer)Separator flags
     570       12575 :     bool IsHeaderFooterEdit() const { return mbHeaderFooterEdit; }
     571       27926 :     bool IsShowHeaderFooterSeparator( FrameControlType eControl ) { return (eControl == Header)? mbShowHeaderSeparator: mbShowFooterSeparator; }
     572           0 :     virtual void SetShowHeaderFooterSeparator( FrameControlType eControl, bool bShow ) { if ( eControl == Header ) mbShowHeaderSeparator = bShow; else mbShowFooterSeparator = bShow; }
     573         546 :     bool IsSelectAll() { return mbSelectAll; }
     574             : };
     575             : 
     576             : // manages global ShellPointer
     577             : class CurrShell
     578             : {
     579             : public:
     580             :     SwViewShell *pPrev;
     581             :     SwRootFrm *pRoot;
     582             : 
     583             :     CurrShell( SwViewShell *pNew );
     584             :     ~CurrShell();
     585             : };
     586             : 
     587        4096 : inline void SwViewShell::ResetInvalidRect()
     588             : {
     589        4096 :    maInvalidRect.Clear();
     590        4096 : }
     591             : 
     592      114031 : inline void SwViewShell::StartAction()
     593             : {
     594      114031 :     if ( !mnStartAction++ )
     595       73477 :         ImplStartAction();
     596      114031 : }
     597      114031 : inline void SwViewShell::EndAction( const bool bIdleEnd )
     598             : {
     599      114031 :     if( 0 == (mnStartAction - 1) )
     600       73477 :         ImplEndAction( bIdleEnd );
     601      114031 :     --mnStartAction;
     602      114031 : }
     603             : 
     604       24782 : inline void SwViewShell::LockPaint()
     605             : {
     606       24782 :     if ( !mnLockPaint++ )
     607       24666 :         ImplLockPaint();
     608       24782 : }
     609       24782 : inline void SwViewShell::UnlockPaint( bool bVirDev )
     610             : {
     611       24782 :     if ( 0 == --mnLockPaint )
     612       24666 :         ImplUnlockPaint( bVirDev );
     613       24782 : }
     614             : inline const SfxItemPool& SwViewShell::GetAttrPool() const
     615             : {
     616             :     return ((SwViewShell*)this)->GetAttrPool();
     617             : }
     618             : 
     619             : #endif // INCLUDED_SW_INC_VIEWSH_HXX
     620             : 
     621             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10