LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/sw/source/ui/inc - view.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 28 53 52.8 %
Date: 2013-07-09 Functions: 25 44 56.8 %
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 _SWVIEW_HXX
      20             : #define _SWVIEW_HXX
      21             : 
      22             : #include <vcl/timer.hxx>
      23             : #include <vcl/field.hxx>
      24             : #include <vcl/floatwin.hxx>
      25             : #include <svtools/htmlcfg.hxx>
      26             : #include <sfx2/viewfac.hxx>
      27             : #include <sfx2/viewsh.hxx>
      28             : #include <sfx2/objsh.hxx>
      29             : #include <editeng/svxenum.hxx>
      30             : #include <sfx2/zoomitem.hxx>
      31             : #include <svx/svxids.hrc>
      32             : #include <editeng/editstat.hxx>
      33             : #include "swdllapi.h"
      34             : #include <swtypes.hxx>
      35             : #include <shellid.hxx>
      36             : #include <IMark.hxx>
      37             : 
      38             : class Button;
      39             : class ImageButton;
      40             : class SwTxtFmtColl;
      41             : class SwPageDesc;
      42             : class SwFrmFmt;
      43             : class SwCharFmt;
      44             : class SwNumRule;
      45             : class SwGlossaryHdl;
      46             : class SwDrawBase;
      47             : class SvxRuler;
      48             : class SvxLRSpaceItem;
      49             : class SwDocShell;
      50             : class SwScrollbar;
      51             : class SvBorder;
      52             : class Ruler;
      53             : class SvxSearchItem;
      54             : class SearchAttrItemList;
      55             : class SvxSearchDialog;
      56             : class SdrView;
      57             : class Dialog;
      58             : class SdrObject;
      59             : class SdrPageView;
      60             : class SwNaviImageButton;
      61             : class SwHlpImageButton;
      62             : class SwView;
      63             : class SwEditWin;
      64             : class SwWrtShell;
      65             : class SwView_Impl;
      66             : struct SwSearchOptions;
      67             : class FmFormShell;
      68             : class CommandEvent;
      69             : class InsCaptionOpt;
      70             : class SvGlobalName;
      71             : class SvtAccessibilityOptions;
      72             : class SwTransferable;
      73             : class SwMailMergeConfigItem;
      74             : class SwTxtNode; // #i23726#
      75             : class SwFormatClipboard;
      76             : struct SwConversionArgs;
      77             : class Graphic;
      78             : class GraphicFilter;
      79             : class SwPostItMgr;
      80             : 
      81             : namespace com{ namespace sun { namespace star {
      82             :     namespace view{ class XSelectionSupplier; }
      83             : }}}
      84             : namespace sfx2 { class FileDialogHelper; }
      85             : 
      86             : const long nLeftOfst = -370;
      87             : const long nScrollX  =   30;
      88             : const long nScrollY  =   30;
      89             : 
      90             : #define MINZOOM 20
      91             : #define MAXZOOM 600
      92             : 
      93             : #define MAX_MARKS 5
      94             : 
      95             : #define CHILDWIN_LABEL      1
      96             : #define CHILDWIN_MAILMERGE  2
      97             : 
      98             : enum ShellModes
      99             : {
     100             :     SHELL_MODE_TEXT,
     101             :     SHELL_MODE_FRAME,
     102             :     SHELL_MODE_GRAPHIC,
     103             :     SHELL_MODE_OBJECT,
     104             :     SHELL_MODE_DRAW,
     105             :     SHELL_MODE_DRAW_CTRL,
     106             :     SHELL_MODE_DRAW_FORM,
     107             :     SHELL_MODE_DRAWTEXT,
     108             :     SHELL_MODE_BEZIER,
     109             :     SHELL_MODE_LIST_TEXT,
     110             :     SHELL_MODE_TABLE_TEXT,
     111             :     SHELL_MODE_TABLE_LIST_TEXT,
     112             :     SHELL_MODE_MEDIA,
     113             :     SHELL_MODE_EXTRUDED_CUSTOMSHAPE,
     114             :     SHELL_MODE_FONTWORK,
     115             :     SHELL_MODE_POSTIT,
     116             :     SHELL_MODE_NAVIGATION
     117             : };
     118             : 
     119             : /*--------------------------------------------------------------------
     120             :     Description:    apply a template
     121             :  --------------------------------------------------------------------*/
     122             : struct SwApplyTemplate
     123             : {
     124             :     union
     125             :     {
     126             :         SwTxtFmtColl* pTxtColl;
     127             :         SwPageDesc*   pPageDesc;
     128             :         SwFrmFmt*     pFrmFmt;
     129             :         SwCharFmt*    pCharFmt;
     130             :         SwNumRule*    pNumRule;
     131             :     } aColl;
     132             : 
     133             :     int eType;
     134             :     sal_uInt16 nColor;
     135             :     SwFormatClipboard* m_pFormatClipboard;
     136             :     bool bUndo;
     137             : 
     138           0 :     SwApplyTemplate() :
     139             :         eType(0),
     140             :         nColor(0),
     141             :         m_pFormatClipboard(0),
     142           0 :         bUndo(false)
     143             :     {
     144           0 :         aColl.pTxtColl = 0;
     145           0 :     }
     146             : };
     147             : 
     148             : /*--------------------------------------------------------------------
     149             :     Description:    view of a document
     150             :  --------------------------------------------------------------------*/
     151             : class SW_DLLPUBLIC SwView: public SfxViewShell
     152             : {
     153             :     friend class SwHHCWrapper;
     154             :     friend class SwHyphWrapper;
     155             :     friend class SwView_Impl;
     156             :     friend class SwClipboardChangeListener;
     157             : 
     158             :     // search & replace
     159             :     static SvxSearchDialog *m_pSrchDlg;
     160             :     static SvxSearchItem   *m_pSrchItem;
     161             : 
     162             :     static sal_uInt16           m_nInsertCtrlState;
     163             :     static sal_uInt16           m_nWebInsertCtrlState;
     164             :     static sal_uInt16           m_nInsertObjectCtrlState;
     165             :     static sal_uInt16           m_nInsertFieldCtrlState;
     166             :     static sal_uInt16           m_nMoveType; // for buttons below the scrollbar (viewmdi)
     167             :     static sal_Int32        m_nActMark; // current jump mark for unknown mark
     168             : 
     169             :     static bool             m_bExtra;
     170             :     static sal_Bool             m_bFound;
     171             :     static bool             m_bJustOpened;
     172             : 
     173             :     static SearchAttrItemList* m_pSrchList;
     174             :     static SearchAttrItemList* m_pReplList;
     175             : 
     176             : 
     177             :     SvxHtmlOptions      m_aHTMLOpt;
     178             :     Timer               m_aTimer;         // for delayed ChgLnks during an action
     179             :     String              m_aPageStr;       // status view, current page
     180             :     String              m_sSwViewData,
     181             :     //and the new cursor position if the user double click in the PagePreView
     182             :                         m_sNewCrsrPos;
     183             :     // to support keyboard the number of the page to go to can be set too
     184             :     sal_uInt16              m_nNewPage;
     185             : 
     186             :     Point               m_aTabColFromDocPos;  // moving table colmns out of the document
     187             :     SwTxtNode           * m_pNumRuleNodeFromDoc; // Moving indent of numrule #i23726#
     188             : 
     189             :     Size                m_aDocSz;         // current document size
     190             :     Rectangle           m_aVisArea;       // visible region
     191             : 
     192             :     SwEditWin           *m_pEditWin;
     193             :     SwWrtShell          *m_pWrtShell;
     194             : 
     195             :     SfxShell            *m_pShell;        // current SubShell at the dispatcher
     196             :     FmFormShell         *m_pFormShell;    // DB-FormShell
     197             : 
     198             :     SwView_Impl         *m_pViewImpl;     // Impl-data for UNO + Basic
     199             : 
     200             : 
     201             :     SwScrollbar         *m_pHScrollbar,   // MDI control elements
     202             :                         *m_pVScrollbar;
     203             : 
     204             :     bool                m_bHScrollbarEnabled;
     205             :     bool                m_bVScrollbarEnabled;
     206             : 
     207             :     Window              *m_pScrollFill;   // dummy window for filling the lower right edge
     208             :                                         // when both scrollbars are active
     209             : 
     210             :     SvxRuler            *m_pHRuler,
     211             :                         *m_pVRuler;
     212             :     ImageButton         *m_pTogglePageBtn;
     213             : 
     214             :     SwHlpImageButton    *m_pPageUpBtn,
     215             :                         *m_pPageDownBtn;
     216             : 
     217             :     SwNaviImageButton   *m_pNaviBtn;
     218             :     SwGlossaryHdl       *m_pGlosHdl;          // handle text block
     219             :     SwDrawBase          *m_pDrawActual;
     220             : 
     221             :     const SwFrmFmt      *m_pLastTableFormat;
     222             : 
     223             :     SwFormatClipboard   *m_pFormatClipboard; //holds data for format paintbrush
     224             : 
     225             :     SwPostItMgr         *m_pPostItMgr;
     226             : 
     227             :     int                 m_nSelectionType;
     228             :     FloatingWindow      *m_pFieldPopup;
     229             : 
     230             :     static const int m_nMASTERENUMCOMMANDS = 6;
     231             : 
     232             :     String          m_aCurrShapeEnumCommand[ m_nMASTERENUMCOMMANDS ];
     233             : 
     234             :     sal_uInt16          m_nPageCnt;
     235             : 
     236             :     // current draw mode
     237             :     sal_uInt16          m_nDrawSfxId;
     238             :     String          m_sDrawCustom; //some drawing types are marked with strings!
     239             :     sal_uInt16          m_nFormSfxId;
     240             :     sal_uInt16          m_nLastPasteDestination;
     241             : 
     242             :     // save the border distance status from SwView::StateTabWin to re-use it in SwView::ExecTabWin()
     243             :     sal_uInt16          m_nLeftBorderDistance;
     244             :     sal_uInt16          m_nRightBorderDistance;
     245             : 
     246             :     bool m_bWheelScrollInProgress;
     247             : 
     248             :     sal_Bool            m_bCenterCrsr : 1,
     249             :                     m_bTopCrsr : 1,
     250             :                     m_bAlwaysShowSel : 1,
     251             :                     m_bTabColFromDoc : 1,
     252             :                     m_bNumIndentFromDoc : 1, // #i23726#
     253             :                     m_bTabRowFromDoc : 1,
     254             :                     m_bSetTabColFromDoc : 1 ,
     255             :                     m_bSetTabRowFromDoc : 1,
     256             :                     m_bAttrChgNotified : 1,
     257             :                     m_bAttrChgNotifiedWithRegistrations : 1,
     258             :                     m_bVerbsActive : 1,
     259             :                     m_bDrawRotate : 1,
     260             :                     m_bDrawSelMode : 1,
     261             :                     m_bShowAtResize : 1,
     262             :                     m_bInOuterResizePixel : 1,
     263             :                     m_bInInnerResizePixel : 1,
     264             :                     m_bPasteState : 1,
     265             :                     m_bPasteSpecialState : 1,
     266             :                     m_bInMailMerge : 1,
     267             :                     m_bInDtor : 1, //detect destructor to prevent creating of sub shells while closing
     268             :                     m_bOldShellWasPagePreView : 1,
     269             :                     m_bIsPreviewDoubleClick : 1, // #i114045#
     270             :                     m_bMakeSelectionVisible : 1, // transport the bookmark selection
     271             :                     m_bAnnotationMode; ///< The real cursor position is inside an annotation.
     272             : 
     273             :     // methods for searching
     274             :     // set search context
     275             :     SW_DLLPRIVATE sal_Bool              SearchAndWrap(sal_Bool bApi = sal_False);
     276             :     SW_DLLPRIVATE sal_Bool          SearchAll(sal_uInt16* pFound = 0);
     277             :     SW_DLLPRIVATE sal_uLong         FUNC_Search( const SwSearchOptions& rOptions );
     278             :     SW_DLLPRIVATE void          Replace();
     279             : 
     280             :     bool                        IsDocumentBorder();
     281             : 
     282             :     SW_DLLPRIVATE bool          IsTextTool() const;
     283             : 
     284             :     // create control elements
     285             :     SW_DLLPRIVATE void          CreateBtns();
     286             :     SW_DLLPRIVATE DECL_LINK( BtnPage, Button * );
     287             : 
     288             :     SW_DLLPRIVATE DECL_LINK( TimeoutHdl, void* );
     289             :     SW_DLLPRIVATE DECL_LINK( UpdatePercentHdl, GraphicFilter* );
     290             : 
     291             :     SW_DLLPRIVATE DECL_LINK( FieldPopupModeEndHdl, void* );
     292             : 
     293             :     inline long     GetXScroll() const;
     294             :     inline long     GetYScroll() const;
     295             :     SW_DLLPRIVATE  Point    AlignToPixel(const Point& rPt) const;
     296             :     SW_DLLPRIVATE   void        CalcPt( Point* pPt,const Rectangle& rRect,
     297             :                             sal_uInt16 nRangeX = USHRT_MAX,
     298             :                             sal_uInt16 nRangeY = USHRT_MAX);
     299             : 
     300             :     SW_DLLPRIVATE sal_Bool          GetPageScrollUpOffset(SwTwips& rOff) const;
     301             :     SW_DLLPRIVATE sal_Bool          GetPageScrollDownOffset(SwTwips& rOff) const;
     302             : 
     303             :     // scrollbar movements
     304             :     SW_DLLPRIVATE long          PageUp();
     305             :     SW_DLLPRIVATE long          PageDown();
     306             :     SW_DLLPRIVATE long          PageUpCrsr(sal_Bool bSelect);
     307             :     SW_DLLPRIVATE long          PageDownCrsr(sal_Bool bSelect);
     308             :     SW_DLLPRIVATE long          PhyPageUp();
     309             :     SW_DLLPRIVATE long          PhyPageDown();
     310             : 
     311             :     SW_DLLPRIVATE int               _CreateScrollbar( sal_Bool bHori );
     312             :     SW_DLLPRIVATE DECL_LINK( ScrollHdl, SwScrollbar * );
     313             :     SW_DLLPRIVATE DECL_LINK( EndScrollHdl, SwScrollbar * );
     314             :     SW_DLLPRIVATE sal_Bool          UpdateScrollbars();
     315             :     SW_DLLPRIVATE DECL_LINK( WindowChildEventListener, VclSimpleEvent* );
     316             :     SW_DLLPRIVATE void          CalcVisArea( const Size &rPixelSz );
     317             : 
     318             :     SW_DLLPRIVATE void            CreatePageButtons(sal_Bool bShow);
     319             : 
     320             :     // linguistics functions
     321             :     SW_DLLPRIVATE void          HyphenateDocument();
     322             :     SW_DLLPRIVATE sal_Bool          IsDrawTextHyphenate();
     323             :     SW_DLLPRIVATE void          HyphenateDrawText();
     324             :     SW_DLLPRIVATE void          StartThesaurus();
     325             : 
     326             :     // text conversion
     327             :     SW_DLLPRIVATE void          StartTextConversion( LanguageType nSourceLang, LanguageType nTargetLang, const Font *pTargetFont, sal_Int32 nOptions, sal_Bool bIsInteractive );
     328             : 
     329             :     // used for spell checking and text conversion
     330             :     SW_DLLPRIVATE void          SpellStart( SvxSpellArea eSpell, bool bStartDone,
     331             :                                         bool bEndDone, SwConversionArgs *pConvArgs = 0 );
     332             :     SW_DLLPRIVATE void          SpellEnd( SwConversionArgs *pConvArgs = 0 );
     333             : 
     334             :     SW_DLLPRIVATE void          HyphStart( SvxSpellArea eSpell );
     335             :     SW_DLLPRIVATE sal_Bool      CheckSpecialCntnt();
     336           0 :     SW_DLLPRIVATE void          SpellKontext(sal_Bool bOn = sal_True)
     337           0 :                             { m_bCenterCrsr = bOn; m_bAlwaysShowSel = bOn; }
     338             : 
     339             :     // methods for printing
     340             :     SW_DLLPRIVATE virtual   SfxPrinter*     GetPrinter( sal_Bool bCreate = sal_False );
     341             :     SW_DLLPRIVATE virtual bool  HasPrintOptionsPage() const;
     342             :     SW_DLLPRIVATE virtual SfxTabPage*       CreatePrintOptionsPage( Window* pParent,
     343             :                                                     const SfxItemSet& rSet);
     344             :     // for readonly switching
     345             :     SW_DLLPRIVATE virtual void  Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
     346             :     SW_DLLPRIVATE void          _CheckReadonlyState();
     347             :     SW_DLLPRIVATE void          _CheckReadonlySelection();
     348             : 
     349             :     // method for rotating PageDesc
     350             :     SW_DLLPRIVATE void          SwapPageMargin(const SwPageDesc&, SvxLRSpaceItem& rLR);
     351             : 
     352             :     SW_DLLPRIVATE void          _SetZoom( const Size &rEditSz,
     353             :                               SvxZoomType eZoomType,
     354             :                               short nFactor = 100,
     355             :                               sal_Bool bViewOnly = sal_False);
     356             :     SW_DLLPRIVATE void          CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool bInner );
     357             : 
     358             :     SW_DLLPRIVATE void          ShowAtResize();
     359             : 
     360             :     SW_DLLPRIVATE virtual void  Move();
     361             : 
     362             :     SW_DLLPRIVATE sal_Bool      InsertGraphicDlg( SfxRequest& );
     363             : 
     364             :     SW_DLLPRIVATE void          DocumentStatsChanged();
     365             : 
     366             : protected:
     367             : 
     368       10877 :     SwView_Impl*    GetViewImpl() {return m_pViewImpl;}
     369             : 
     370             :     void ImpSetVerb( int nSelType );
     371             : 
     372           4 :     int             GetSelectionType() const { return m_nSelectionType; }
     373           2 :     void            SetSelectionType(int nSet) { m_nSelectionType = nSet;}
     374             : 
     375             :     // for SwWebView
     376           2 :     void            SetShell( SfxShell* pS )            { m_pShell = pS; }
     377           2 :     void            SetFormShell( FmFormShell* pSh )    { m_pFormShell = pSh; }
     378             : 
     379             :     virtual void    SelectShell();
     380             : 
     381             :     virtual void    Activate(sal_Bool);
     382             :     virtual void    Deactivate(sal_Bool);
     383             :     virtual void    InnerResizePixel( const Point &rOfs, const Size &rSize );
     384             :     virtual void    OuterResizePixel( const Point &rOfs, const Size &rSize );
     385             : 
     386             :     void            SetImageButtonColor(Color& rColor);
     387             : 
     388           0 :     const SwFrmFmt* GetLastTblFrmFmt() const {return m_pLastTableFormat;}
     389           4 :     void            SetLastTblFrmFmt(const SwFrmFmt* pSet) {m_pLastTableFormat = pSet;}
     390             : 
     391             :     // form letter execution
     392             :     void    GenerateFormLetter(sal_Bool bUseCurrentDocument);
     393             : 
     394             :     using SfxShell::GetDispatcher;
     395             : 
     396             : public:
     397             : 
     398          65 :     SFX_DECL_VIEWFACTORY(SwView);
     399          66 :     SFX_DECL_INTERFACE(SW_VIEWSHELL)
     400             :     TYPEINFO();
     401             : 
     402             :     SfxDispatcher   &GetDispatcher();
     403             : 
     404             :     void                    GotFocus() const;
     405             :     virtual SdrView*        GetDrawView() const;
     406             :     virtual sal_Bool        HasUIFeature( sal_uInt32 nFeature );
     407             :     virtual void            ShowCursor( bool bOn = sal_True );
     408             :     virtual ErrCode         DoVerb( long nVerb );
     409             : 
     410             :     virtual sal_uInt16          SetPrinter( SfxPrinter* pNew,
     411             :                                         sal_uInt16 nDiff = SFX_PRINTER_ALL, bool bIsAPI=false);
     412             :     ShellModes              GetShellMode();
     413             : 
     414             :     com::sun::star::view::XSelectionSupplier*       GetUNOObject();
     415             : 
     416             :     String                  GetSelectionTextParam( sal_Bool bCompleteWords,
     417             :                                                    sal_Bool bEraseTrail );
     418             :     virtual sal_Bool            HasSelection( sal_Bool  bText ) const;
     419             :     virtual String          GetSelectionText( sal_Bool bCompleteWords = sal_False );
     420             :     virtual sal_uInt16          PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False );
     421             :     virtual void            MarginChanged();
     422             : 
     423             :     // replace word/selection with text from the thesaurus
     424             :     // (this code has special handling for "in word" character)
     425             :     void                    InsertThesaurusSynonym( const String &rSynonmText, const String &rLookUpText, bool bValidSelection );
     426             :     bool                    IsValidSelectionForThesaurus() const;
     427             :     String                  GetThesaurusLookUpText( bool bSelection ) const;
     428             : 
     429             :     // immediately switch shell -> for GetSelectionObject
     430             :     void        StopShellTimer();
     431             : 
     432       54578 :     inline SwWrtShell&      GetWrtShell   () const { return *m_pWrtShell; }
     433        9457 :     inline SwWrtShell*      GetWrtShellPtr() const { return  m_pWrtShell; }
     434             : 
     435       66565 :     inline       SwEditWin &GetEditWin()        { return *m_pEditWin; }
     436        8450 :     inline const SwEditWin &GetEditWin () const { return *m_pEditWin; }
     437             : 
     438             : #if defined WNT || defined UNX
     439             :     void ScannerEventHdl( const ::com::sun::star::lang::EventObject& rEventObject );
     440             : #endif
     441             : 
     442             :     // hand the handler for text blocks to the shell; create if applicable
     443             :     SwGlossaryHdl*          GetGlosHdl();
     444             : 
     445        7100 :     inline const Rectangle& GetVisArea() const { return m_aVisArea; }
     446             : 
     447             :     sal_Bool            IsScroll(const Rectangle& rRect) const;
     448             :     void            Scroll( const Rectangle& rRect,
     449             :                             sal_uInt16 nRangeX = USHRT_MAX,
     450             :                             sal_uInt16 nRangeY = USHRT_MAX);
     451             : 
     452             :     long        SetVScrollMax(long lMax);
     453             :     long        SetHScrollMax(long lMax);
     454             : 
     455             :     void SpellError(LanguageType eLang);
     456             :     sal_Bool            ExecSpellPopup( const Point& rPt );
     457             :     void                ExecFieldPopup( const Point& rPt, sw::mark::IFieldmark *fieldBM );
     458             : 
     459             :     // SMARTTAGS
     460             :     sal_Bool            ExecSmartTagPopup( const Point& rPt );
     461             : 
     462             :     DECL_LINK( OnlineSpellCallback, SpellCallbackInfo*);
     463             :     sal_Bool            ExecDrwTxtSpellPopup(const Point& rPt);
     464             : 
     465           0 :     void            SetTabColFromDocPos( const Point &rPt ) { m_aTabColFromDocPos = rPt; }
     466           0 :     void            SetTabColFromDoc( sal_Bool b ) { m_bTabColFromDoc = b; }
     467        2140 :     sal_Bool            IsTabColFromDoc() const    { return m_bTabColFromDoc; }
     468           0 :     void            SetTabRowFromDoc( sal_Bool b ) { m_bTabRowFromDoc = b; }
     469        1062 :     sal_Bool            IsTabRowFromDoc() const    { return m_bTabRowFromDoc; }
     470             : 
     471             :     // -> #i23726#
     472           0 :     void            SetNumRuleNodeFromDoc( SwTxtNode * pNumRuleNode )
     473           0 :                     { m_pNumRuleNodeFromDoc = pNumRuleNode; }
     474             :     void            SetNumIndentFromDoc(sal_Bool b) { m_bNumIndentFromDoc = b; }
     475             :     sal_Bool            IsNumIndentFromDoc() const { return NULL != m_pNumRuleNodeFromDoc; }
     476             :     // <- #i23726#
     477             : 
     478             :     void    DocSzChgd( const Size& rNewSize );
     479         291 :     const   Size&   GetDocSz() const { return m_aDocSz; }
     480             :     virtual void    SetVisArea( const Rectangle&, sal_Bool bUpdateScrollbar = sal_True);
     481             :             void    SetVisArea( const Point&, sal_Bool bUpdateScrollbar = sal_True);
     482             :             void    CheckVisArea();
     483             : 
     484             :     void RecheckBrowseMode();
     485             :     static Dialog* GetSearchDialog();
     486             : 
     487             :     static sal_uInt16   GetMoveType();
     488             :     static void     SetMoveType(sal_uInt16 nSet);
     489             :     DECL_STATIC_LINK( SwView, MoveNavigationHdl, bool* ); // #i75416#
     490             :     static void     SetActMark(sal_Int32 nSet);
     491             : 
     492             :     sal_Bool            HandleWheelCommands( const CommandEvent& );
     493             : 
     494             :     // insert frames
     495             :     void            InsFrmMode(sal_uInt16 nCols);
     496             : 
     497             :     void            SetZoom( SvxZoomType eZoomType, short nFactor = 100, sal_Bool bViewOnly = sal_False);
     498             :     virtual void    SetZoomFactor( const Fraction &rX, const Fraction & );
     499             : 
     500             :     void            SetViewLayout( sal_uInt16 nColumns, bool bBookMode, sal_Bool bViewOnly = sal_False );
     501             : 
     502             :     void            ShowHScrollbar(sal_Bool bShow);
     503             :     sal_Bool        IsHScrollbarVisible()const;
     504             : 
     505             :     void            ShowVScrollbar(sal_Bool bShow);
     506             :     sal_Bool        IsVScrollbarVisible()const;
     507             : 
     508             :     void            EnableHScrollbar(bool bEnable);
     509             :     void            EnableVScrollbar(bool bEnable);
     510             : 
     511             :     int             CreateVRuler();
     512             :     int             KillVRuler();
     513             :     int             CreateTab();
     514             :     int             KillTab();
     515             : 
     516           0 :     int             StatVRuler() const { return ((Window*)m_pVRuler)->IsVisible(); }
     517             :     void            ChangeVRulerMetric(FieldUnit eUnit);
     518             :     void            GetVRulerMetric(FieldUnit& rToFill) const;
     519             : 
     520             :     int             StatTab() const { return ((Window*)m_pHRuler)->IsVisible(); }
     521           0 :     SvxRuler&       GetHRuler()    { return *m_pHRuler; }
     522           0 :     SvxRuler&       GetVRuler()    { return *m_pVRuler; }
     523             :     void            InvalidateRulerPos();
     524             :     void            ChangeTabMetric(FieldUnit eUnit);
     525             :     void            GetHRulerMetric(FieldUnit& rToFill) const;
     526             : 
     527             :         // Handler
     528             :     void            Execute(SfxRequest&);
     529             :     void            ExecPageMove(SfxRequest&);
     530             :     void            ExecStyle(SfxRequest&);
     531             :     void            ExecLingu(SfxRequest&);
     532             :     void            ExecDataBase(SfxRequest&);
     533             :     void            ExecDlg(SfxRequest&);
     534             :     void            ExecDlgExt(SfxRequest&);
     535             :     void            ExecDBDlg(SfxRequest &);
     536             :     void            ExecColl(SfxRequest&);
     537             :     void            ExecutePrint(SfxRequest&);
     538             :     void            ExecDraw(SfxRequest&);
     539             :     void            ExecTabWin(SfxRequest&);
     540             :     void            ExecuteStatusLine(SfxRequest&);
     541             :     DECL_LINK( ExecRulerClick, Ruler * );
     542             :     void            ExecSearch(SfxRequest&, sal_Bool bNoMessage = sal_False);
     543             :     void            ExecViewOptions(SfxRequest &);
     544             : 
     545             :     void            StateViewOptions(SfxItemSet &);
     546             :     void            StateSearch(SfxItemSet &);
     547             :     void            GetState(SfxItemSet&);
     548             :     void            StateStatusLine(SfxItemSet&);
     549             : 
     550             : 
     551             :     // functions for drawing
     552             :     void            SetDrawFuncPtr(SwDrawBase* pFuncPtr);
     553         546 :     inline SwDrawBase* GetDrawFuncPtr(/*sal_Bool bBuf = sal_False*/) const  { return m_pDrawActual; }
     554             :     void            GetDrawState(SfxItemSet &rSet);
     555             :     void            ExitDraw();
     556           0 :     inline sal_Bool     IsDrawRotate()      { return m_bDrawRotate; }
     557           0 :     inline void     FlipDrawRotate()    { m_bDrawRotate = !m_bDrawRotate; }
     558           0 :     inline sal_Bool     IsDrawSelMode()     { return m_bDrawSelMode; }
     559             :     void            SetSelDrawSlot();
     560           0 :     inline void     FlipDrawSelMode()   { m_bDrawSelMode = !m_bDrawSelMode; }
     561             :     void            NoRotate();     // turn off rotate mode
     562             :     sal_Bool            EnterDrawTextMode(const Point& aDocPos);
     563           0 :     void            LeaveDrawCreate()   { m_nDrawSfxId = m_nFormSfxId = USHRT_MAX; m_sDrawCustom.Erase();}
     564       12415 :     sal_Bool            IsDrawMode()        { return (m_nDrawSfxId != USHRT_MAX || m_nFormSfxId != USHRT_MAX); }
     565             :     bool            IsFormMode() const;
     566             :     bool            IsBezierEditMode();
     567             :     bool            AreOnlyFormsSelected() const;
     568             :     sal_Bool            HasDrwObj(SdrObject *pSdrObj) const;
     569             :     sal_Bool            HasOnlyObj(SdrObject *pSdrObj, sal_uInt32 eObjInventor) const;
     570             :     sal_Bool            BeginTextEdit(  SdrObject* pObj, SdrPageView* pPV=NULL,
     571             :                                     Window* pWin=NULL, bool bIsNewObj=false, bool bSetSelectionToStart=false );
     572             : 
     573             :     void            StateTabWin(SfxItemSet&);
     574             : 
     575             :     // attributes have changed
     576             :     DECL_LINK( AttrChangedNotify, void* );
     577             : 
     578             :     // form control has been activated
     579             :     DECL_LINK( FormControlActivated, void* );
     580             : 
     581             :     // edit links
     582             :     void            EditLinkDlg();
     583             :     void            AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId = 0);
     584             :     void            InsertCaption(const InsCaptionOpt *pOpt);
     585             : 
     586             :     // Async call by Core
     587             :     void        UpdatePageNums(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr);
     588             : 
     589             :     String      GetPageStr(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr);
     590             : 
     591             :     // hand over Shell
     592        1743 :                  SfxShell       *GetCurShell()  { return m_pShell; }
     593             :                  SwDocShell     *GetDocShell();
     594             :     inline const SwDocShell     *GetDocShell() const;
     595         489 :     inline       FmFormShell    *GetFormShell() { return m_pFormShell; }
     596           0 :     inline const FmFormShell    *GetFormShell() const { return m_pFormShell; }
     597             : 
     598             :     // so that in the SubShells' DTors m_pShell can be reset if applicable
     599         792 :     void ResetSubShell()    { m_pShell = 0; }
     600             : 
     601             :     virtual void    WriteUserData(String &, sal_Bool bBrowse = sal_False );
     602             :     virtual void    ReadUserData(const String &, sal_Bool bBrowse = sal_False );
     603             :     virtual void    ReadUserDataSequence ( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse );
     604             :     virtual void    WriteUserDataSequence ( com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse );
     605             : 
     606           0 :     void SetCrsrAtTop( sal_Bool bFlag, sal_Bool bCenter = sal_False )
     607           0 :         { m_bTopCrsr = bFlag, m_bCenterCrsr = bCenter; }
     608           0 :     sal_Bool IsCrsrAtTop() const                    { return m_bTopCrsr; }
     609           0 :     sal_Bool IsCrsrAtCenter() const                 { return m_bCenterCrsr; }
     610             : 
     611             :     bool JumpToSwMark( const String& rMark );
     612             : 
     613             :     long InsertDoc( sal_uInt16 nSlotId, const String& rFileName,
     614             :                     const String& rFilterName, sal_Int16 nVersion = 0 );
     615             : 
     616             :     void ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem );
     617             :     long InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVersion );
     618             :     DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper * );
     619             : 
     620             :     // status methods for clipboard.
     621             :     // Status changes now notified from the clipboard.
     622             :     sal_Bool IsPasteAllowed();
     623             :     sal_Bool IsPasteSpecialAllowed();
     624             : 
     625             :     // Enable mail merge - mail merge field dialog enabled
     626             :     void EnableMailMerge(sal_Bool bEnable = sal_True);
     627             :     //apply Accessiblity options
     628             :     void ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions);
     629             : 
     630             :     SwView(SfxViewFrame* pFrame, SfxViewShell*);
     631             :     ~SwView();
     632             : 
     633             :     void NotifyDBChanged();
     634             : 
     635             :     SfxObjectShellLock CreateTmpSelectionDoc();
     636             : 
     637             :     void        AddTransferable(SwTransferable& rTransferable);
     638             : 
     639             :     // store MailMerge data while "Back to Mail Merge Wizard" FloatingWindow is active
     640             :     // or to support printing
     641             :     void   SetMailMergeConfigItem(SwMailMergeConfigItem*  pConfigItem, sal_uInt16 nRestart, sal_Bool bIsSource);
     642             :     SwMailMergeConfigItem*  GetMailMergeConfigItem();
     643             :     sal_uInt16              GetMailMergeRestartPage() const;
     644             :     sal_Bool                IsMailMergeSourceView() const;
     645             : 
     646             :     void ExecFormatPaintbrush(SfxRequest &);
     647             :     void StateFormatPaintbrush(SfxItemSet &);
     648             : 
     649             :     //public fuer D&D
     650             :     int     InsertGraphic( const String &rPath, const String &rFilter,
     651             :                             sal_Bool bLink = sal_True, GraphicFilter *pFlt = 0,
     652             :                             Graphic* pPreviewGrf = 0,
     653             :                             sal_Bool bRule = sal_False );
     654             : 
     655             :     void ExecuteScan( SfxRequest& rReq );
     656             : 
     657       64853 :     SwPostItMgr* GetPostItMgr() { return m_pPostItMgr;}
     658             :     const SwPostItMgr* GetPostItMgr() const { return m_pPostItMgr;}
     659             : 
     660             :     // exhibition hack (MA,MBA)
     661             :     void SelectShellForDrop();
     662             : 
     663             :     void UpdateDocStats();
     664             :     /// Where is the real cursor: in the annotation or in the main document?
     665             :     void SetAnnotationMode(bool bMode);
     666             : };
     667             : 
     668             : // ----------------- inline Methoden ----------------------
     669         596 : inline long SwView::GetXScroll() const
     670             : {
     671         596 :     return m_aVisArea.GetWidth() * nScrollX / 100L;
     672             : }
     673             : 
     674         596 : inline long SwView::GetYScroll() const
     675             : {
     676         596 :     return m_aVisArea.GetHeight() * nScrollY / 100L;
     677             : }
     678             : 
     679        2373 : inline const SwDocShell *SwView::GetDocShell() const
     680             : {
     681        2373 :     return ((SwView*)this)->GetDocShell();
     682             : }
     683             : 
     684             : SfxTabPage* CreatePrintOptionsPage( Window *pParent,
     685             :                                     const SfxItemSet &rOptions,
     686             :                                     sal_Bool bPreview);
     687             : 
     688             : #endif
     689             : 
     690             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10