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

Generated by: LCOV version 1.10