LCOV - code coverage report
Current view: top level - libreoffice/sw/source/ui/inc - view.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 20 53 37.7 %
Date: 2012-12-27 Functions: 18 44 40.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 _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* pFormatClipboard;
     136             :     sal_Bool bUndo;
     137             : 
     138           0 :     SwApplyTemplate() :
     139             :         eType(0),
     140             :         nColor(0),
     141             :         pFormatClipboard(0),
     142           0 :         bUndo(sal_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 *pSrchDlg;
     160             :     static SvxSearchItem   *pSrchItem;
     161             : 
     162             :     static sal_uInt16           nInsertCtrlState;
     163             :     static sal_uInt16           nWebInsertCtrlState;
     164             :     static sal_uInt16           nInsertObjectCtrlState;
     165             :     static sal_uInt16           nInsertFieldCtrlState;
     166             :     static sal_uInt16           nMoveType; // for buttons below the scrollbar (viewmdi)
     167             :     static sal_Int32        nActMark; // current jump mark for unknown mark
     168             : 
     169             :     static sal_Bool             bExtra;
     170             :     static sal_Bool             bFound;
     171             :     static sal_Bool             bJustOpened;
     172             : 
     173             :     static SearchAttrItemList* pSrchList;
     174             :     static SearchAttrItemList* pReplList;
     175             : 
     176             : 
     177             :     SvxHtmlOptions      aHTMLOpt;
     178             :     Timer               aTimer;         // for delayed ChgLnks during an action
     179             :     String              aPageStr;       // status view, current page
     180             :     String              sSwViewData,
     181             :     //and the new cursor position if the user double click in the PagePreView
     182             :                         sNewCrsrPos;
     183             :     // to support keyboard the number of the page to go to can be set too
     184             :     sal_uInt16              nNewPage;
     185             : 
     186             :     Point               aTabColFromDocPos;  // moving table colmns out of the document
     187             :     SwTxtNode           * pNumRuleNodeFromDoc; // Moving indent of numrule #i23726#
     188             : 
     189             :     Size                aDocSz;         // current document size
     190             :     Rectangle           aVisArea;       // visible region
     191             : 
     192             :     SwEditWin           *pEditWin;
     193             :     SwWrtShell          *pWrtShell;
     194             : 
     195             :     SfxShell            *pShell;        // current SubShell at the dispatcher
     196             :     FmFormShell         *pFormShell;    // DB-FormShell
     197             : 
     198             :     SwView_Impl         *pViewImpl;     // Impl-data for UNO + Basic
     199             : 
     200             : 
     201             :     SwScrollbar         *pHScrollbar,   // MDI control elements
     202             :                         *pVScrollbar;
     203             : 
     204             :     bool                mbHScrollbarEnabled;
     205             :     bool                mbVScrollbarEnabled;
     206             : 
     207             :     Window              *pScrollFill;   // dummy window for filling the lower right edge
     208             :                                         // when both scrollbars are active
     209             : 
     210             :     SvxRuler            *pHRuler,
     211             :                         *pVRuler;
     212             :     ImageButton         *pTogglePageBtn;
     213             : 
     214             :     SwHlpImageButton    *pPageUpBtn,
     215             :                         *pPageDownBtn;
     216             : 
     217             :     SwNaviImageButton   *pNaviBtn;
     218             :     SwGlossaryHdl       *pGlosHdl;          // handle text block
     219             :     SwDrawBase          *pDrawActual;
     220             : 
     221             :     const SwFrmFmt      *pLastTableFormat;
     222             : 
     223             :     SwFormatClipboard   *pFormatClipboard; //holds data for format paintbrush
     224             : 
     225             :     SwPostItMgr         *mpPostItMgr;
     226             : 
     227             :     int                 nSelectionType;
     228             :     FloatingWindow      *mpFieldPopup;
     229             : 
     230             :     static const int MASTERENUMCOMMANDS = 6;
     231             : 
     232             :     String          aCurrShapeEnumCommand[ MASTERENUMCOMMANDS ];
     233             : 
     234             :     sal_uInt16          nPageCnt;
     235             : 
     236             :     // current draw mode
     237             :     sal_uInt16          nDrawSfxId;
     238             :     String          sDrawCustom; //some drawing types are marked with strings!
     239             :     sal_uInt16          nFormSfxId;
     240             :     sal_uInt16          nLastPasteDestination;
     241             : 
     242             :     // save the border distance status from SwView::StateTabWin to re-use it in SwView::ExecTabWin()
     243             :     sal_uInt16          nLeftBorderDistance;
     244             :     sal_uInt16          nRightBorderDistance;
     245             : 
     246             :     sal_Bool            bCenterCrsr : 1,
     247             :                     bTopCrsr : 1,
     248             :                     bAllwaysShowSel : 1,
     249             :                     bTabColFromDoc : 1,
     250             :                     bNumIndentFromDoc : 1, // #i23726#
     251             :                     bTabRowFromDoc : 1,
     252             :                     bSetTabColFromDoc : 1 ,
     253             :                     bSetTabRowFromDoc : 1,
     254             :                     bAttrChgNotified : 1,
     255             :                     bAttrChgNotifiedWithRegistrations : 1,
     256             :                     bVerbsActive : 1,
     257             :                     bDrawRotate : 1,
     258             :                     bDrawSelMode : 1,
     259             :                     bShowAtResize : 1,
     260             :                     bInOuterResizePixel : 1,
     261             :                     bInInnerResizePixel : 1,
     262             :                     bPasteState : 1,
     263             :                     bPasteSpecialState : 1,
     264             :                     bInMailMerge : 1,
     265             :                     bInDtor : 1, //detect destructor to prevent creating of sub shells while closing
     266             :                     bOldShellWasPagePreView : 1,
     267             :                     bIsPreviewDoubleClick : 1, // #i114045#
     268             :                     bMakeSelectionVisible : 1; // transport the bookmark selection
     269             : 
     270             :     // methods for searching
     271             :     // set search context
     272             :     SW_DLLPRIVATE sal_Bool              SearchAndWrap(sal_Bool bApi = sal_False);
     273             :     SW_DLLPRIVATE sal_Bool          SearchAll(sal_uInt16* pFound = 0);
     274             :     SW_DLLPRIVATE sal_uLong         FUNC_Search( const SwSearchOptions& rOptions );
     275             :     SW_DLLPRIVATE void          Replace();
     276             : 
     277             :     sal_Bool                                IsDocumentBorder();
     278             : 
     279             :     SW_DLLPRIVATE sal_Bool          IsTextTool() const;
     280             : 
     281             :     // create control elements
     282             :     SW_DLLPRIVATE void          CreateBtns();
     283             :     SW_DLLPRIVATE DECL_LINK( BtnPage, Button * );
     284             : 
     285             :     SW_DLLPRIVATE DECL_LINK( TimeoutHdl, void* );
     286             :     SW_DLLPRIVATE DECL_LINK( UpdatePercentHdl, GraphicFilter* );
     287             : 
     288             :     SW_DLLPRIVATE DECL_LINK( FieldPopupModeEndHdl, void* );
     289             : 
     290             :     inline long     GetXScroll() const;
     291             :     inline long     GetYScroll() const;
     292             :     SW_DLLPRIVATE  Point    AlignToPixel(const Point& rPt) const;
     293             :     SW_DLLPRIVATE   void        CalcPt( Point* pPt,const Rectangle& rRect,
     294             :                             sal_uInt16 nRangeX = USHRT_MAX,
     295             :                             sal_uInt16 nRangeY = USHRT_MAX);
     296             : 
     297             :     SW_DLLPRIVATE sal_Bool          GetPageScrollUpOffset(SwTwips& rOff) const;
     298             :     SW_DLLPRIVATE sal_Bool          GetPageScrollDownOffset(SwTwips& rOff) const;
     299             : 
     300             :     // scrollbar movements
     301             :     SW_DLLPRIVATE long          PageUp();
     302             :     SW_DLLPRIVATE long          PageDown();
     303             :     SW_DLLPRIVATE long          PageUpCrsr(sal_Bool bSelect);
     304             :     SW_DLLPRIVATE long          PageDownCrsr(sal_Bool bSelect);
     305             :     SW_DLLPRIVATE long          PhyPageUp();
     306             :     SW_DLLPRIVATE long          PhyPageDown();
     307             : 
     308             :     SW_DLLPRIVATE int               _CreateScrollbar( sal_Bool bHori );
     309             :     SW_DLLPRIVATE DECL_LINK( ScrollHdl, SwScrollbar * );
     310             :     SW_DLLPRIVATE DECL_LINK( EndScrollHdl, SwScrollbar * );
     311             :     SW_DLLPRIVATE sal_Bool          UpdateScrollbars();
     312             :     SW_DLLPRIVATE DECL_LINK( WindowChildEventListener, VclSimpleEvent* );
     313             :     SW_DLLPRIVATE void          CalcVisArea( const Size &rPixelSz );
     314             : 
     315             :     SW_DLLPRIVATE void            CreatePageButtons(sal_Bool bShow);
     316             : 
     317             :     // linguistics functions
     318             :     SW_DLLPRIVATE void          HyphenateDocument();
     319             :     SW_DLLPRIVATE sal_Bool          IsDrawTextHyphenate();
     320             :     SW_DLLPRIVATE void          HyphenateDrawText();
     321             :     SW_DLLPRIVATE void          StartThesaurus();
     322             : 
     323             :     // text conversion
     324             :     SW_DLLPRIVATE void          StartTextConversion( LanguageType nSourceLang, LanguageType nTargetLang, const Font *pTargetFont, sal_Int32 nOptions, sal_Bool bIsInteractive );
     325             : 
     326             :     // used for spell checking and text conversion
     327             :     SW_DLLPRIVATE void          SpellStart( SvxSpellArea eSpell, sal_Bool bStartDone,
     328             :                                         sal_Bool bEndDone, SwConversionArgs *pConvArgs = 0 );
     329             :     SW_DLLPRIVATE void          SpellEnd( SwConversionArgs *pConvArgs = 0 );
     330             : 
     331             :     SW_DLLPRIVATE void          HyphStart( SvxSpellArea eSpell );
     332             :     SW_DLLPRIVATE sal_Bool      CheckSpecialCntnt();
     333           0 :     SW_DLLPRIVATE void          SpellKontext(sal_Bool bOn = sal_True)
     334           0 :                             { bCenterCrsr = bOn; bAllwaysShowSel = bOn; }
     335             : 
     336             :     // methods for printing
     337             :     SW_DLLPRIVATE virtual   SfxPrinter*     GetPrinter( sal_Bool bCreate = sal_False );
     338             :     SW_DLLPRIVATE virtual bool  HasPrintOptionsPage() const;
     339             :     SW_DLLPRIVATE virtual SfxTabPage*       CreatePrintOptionsPage( Window* pParent,
     340             :                                                     const SfxItemSet& rSet);
     341             :     // for readonly switching
     342             :     SW_DLLPRIVATE virtual void  Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
     343             :     SW_DLLPRIVATE void          _CheckReadonlyState();
     344             :     SW_DLLPRIVATE void          _CheckReadonlySelection();
     345             : 
     346             :     // method for rotating PageDesc
     347             :     SW_DLLPRIVATE void          SwapPageMargin(const SwPageDesc&, SvxLRSpaceItem& rLR);
     348             : 
     349             :     SW_DLLPRIVATE void          _SetZoom( const Size &rEditSz,
     350             :                               SvxZoomType eZoomType,
     351             :                               short nFactor = 100,
     352             :                               sal_Bool bViewOnly = sal_False);
     353             :     SW_DLLPRIVATE void          CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool bInner );
     354             : 
     355             :     SW_DLLPRIVATE void          ShowAtResize();
     356             : 
     357             :     SW_DLLPRIVATE virtual void  Move();
     358             : 
     359             :     SW_DLLPRIVATE sal_Bool          InsertGraphicDlg( SfxRequest& );
     360             : 
     361             : protected:
     362             : 
     363         558 :     SwView_Impl*    GetViewImpl() {return pViewImpl;}
     364             : 
     365             :     void ImpSetVerb( int nSelType );
     366             : 
     367           0 :     int             GetSelectionType() const { return nSelectionType; }
     368           0 :     void            SetSelectionType(int nSet) { nSelectionType = nSet;}
     369             : 
     370             :     // for SwWebView
     371           0 :     void            SetShell( SfxShell* pS )            { pShell = pS; }
     372           0 :     void            SetFormShell( FmFormShell* pSh )    { pFormShell = pSh; }
     373             : 
     374             :     virtual void    SelectShell();
     375             : 
     376             :     virtual void    Activate(sal_Bool);
     377             :     virtual void    Deactivate(sal_Bool);
     378             :     virtual void    InnerResizePixel( const Point &rOfs, const Size &rSize );
     379             :     virtual void    OuterResizePixel( const Point &rOfs, const Size &rSize );
     380             :     virtual Size    GetOptimalSizePixel() const;
     381             : 
     382             :     void            SetImageButtonColor(Color& rColor);
     383             : 
     384           0 :     const SwFrmFmt* GetLastTblFrmFmt() const {return pLastTableFormat;}
     385           0 :     void            SetLastTblFrmFmt(const SwFrmFmt* pSet) {pLastTableFormat = pSet;}
     386             : 
     387             :     // form letter execution
     388             :     void    GenerateFormLetter(sal_Bool bUseCurrentDocument);
     389             : 
     390             :     using SfxShell::GetDispatcher;
     391             : 
     392             : public:
     393             : 
     394          16 :     SFX_DECL_VIEWFACTORY(SwView);
     395          20 :     SFX_DECL_INTERFACE(SW_VIEWSHELL)
     396             :     TYPEINFO();
     397             : 
     398             :     SfxDispatcher   &GetDispatcher();
     399             : 
     400             :     void                    GotFocus() const;
     401             :     virtual SdrView*        GetDrawView() const;
     402             :     virtual sal_Bool        HasUIFeature( sal_uInt32 nFeature );
     403             :     virtual void            ShowCursor( bool bOn = sal_True );
     404             :     virtual ErrCode         DoVerb( long nVerb );
     405             : 
     406             :     virtual sal_uInt16          SetPrinter( SfxPrinter* pNew,
     407             :                                         sal_uInt16 nDiff = SFX_PRINTER_ALL, bool bIsAPI=false);
     408             :     ShellModes              GetShellMode();
     409             : 
     410             :     com::sun::star::view::XSelectionSupplier*       GetUNOObject();
     411             : 
     412             :     String                  GetSelectionTextParam( sal_Bool bCompleteWords,
     413             :                                                    sal_Bool bEraseTrail );
     414             :     virtual sal_Bool            HasSelection( sal_Bool  bText ) const;
     415             :     virtual String          GetSelectionText( sal_Bool bCompleteWords = sal_False );
     416             :     virtual sal_uInt16          PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False );
     417             :     virtual void            MarginChanged();
     418             : 
     419             :     // replace word/selection with text from the thesaurus
     420             :     // (this code has special handling for "in word" character)
     421             :     void                    InsertThesaurusSynonym( const String &rSynonmText, const String &rLookUpText, bool bValidSelection );
     422             :     bool                    IsValidSelectionForThesaurus() const;
     423             :     String                  GetThesaurusLookUpText( bool bSelection ) const;
     424             : 
     425             :     // immediately switch shell -> for GetSelectionObject
     426             :     void        StopShellTimer();
     427             : 
     428        3104 :     inline SwWrtShell&      GetWrtShell   () const { return *pWrtShell; }
     429        1719 :     inline SwWrtShell*      GetWrtShellPtr() const { return  pWrtShell; }
     430             : 
     431        7052 :     inline       SwEditWin &GetEditWin()        { return *pEditWin; }
     432        2708 :     inline const SwEditWin &GetEditWin () const { return *pEditWin; }
     433             : 
     434             : #if defined WNT || defined UNX
     435             :     void ScannerEventHdl( const ::com::sun::star::lang::EventObject& rEventObject );
     436             : #endif
     437             : 
     438             :     // hand the handler for text blocks to the shell; create if applicable
     439             :     SwGlossaryHdl*          GetGlosHdl();
     440             : 
     441         934 :     inline const Rectangle& GetVisArea() const { return aVisArea; }
     442             : 
     443             :     sal_Bool            IsScroll(const Rectangle& rRect) const;
     444             :     void            Scroll( const Rectangle& rRect,
     445             :                             sal_uInt16 nRangeX = USHRT_MAX,
     446             :                             sal_uInt16 nRangeY = USHRT_MAX);
     447             : 
     448             :     long        SetVScrollMax(long lMax);
     449             :     long        SetHScrollMax(long lMax);
     450             : 
     451             :     void SpellError(LanguageType eLang);
     452             :     sal_Bool            ExecSpellPopup( const Point& rPt );
     453             :     void                ExecFieldPopup( const Point& rPt, sw::mark::IFieldmark *fieldBM );
     454             : 
     455             :     // SMARTTAGS
     456             :     sal_Bool            ExecSmartTagPopup( const Point& rPt );
     457             : 
     458             :     DECL_LINK( OnlineSpellCallback, SpellCallbackInfo*);
     459             :     sal_Bool            ExecDrwTxtSpellPopup(const Point& rPt);
     460             : 
     461           0 :     void            SetTabColFromDocPos( const Point &rPt ) { aTabColFromDocPos = rPt; }
     462           0 :     void            SetTabColFromDoc( sal_Bool b ) { bTabColFromDoc = b; }
     463         954 :     sal_Bool            IsTabColFromDoc() const    { return bTabColFromDoc; }
     464           0 :     void            SetTabRowFromDoc( sal_Bool b ) { bTabRowFromDoc = b; }
     465         425 :     sal_Bool            IsTabRowFromDoc() const    { return bTabRowFromDoc; }
     466             : 
     467             :     // -> #i23726#
     468           0 :     void            SetNumRuleNodeFromDoc( SwTxtNode * pNumRuleNode )
     469           0 :                     { pNumRuleNodeFromDoc = pNumRuleNode; }
     470             :     void            SetNumIndentFromDoc(sal_Bool b) { bNumIndentFromDoc = b; }
     471             :     sal_Bool            IsNumIndentFromDoc() const { return NULL != pNumRuleNodeFromDoc; }
     472             :     // <- #i23726#
     473             : 
     474             :     void    DocSzChgd( const Size& rNewSize );
     475          19 :     const   Size&   GetDocSz() const { return aDocSz; }
     476             :     virtual void    SetVisArea( const Rectangle&, sal_Bool bUpdateScrollbar = sal_True);
     477             :             void    SetVisArea( const Point&, sal_Bool bUpdateScrollbar = sal_True);
     478             :             void    CheckVisArea();
     479             : 
     480             :     void RecheckBrowseMode();
     481             :     static Dialog* GetSearchDialog();
     482             : 
     483             :     static sal_uInt16   GetMoveType();
     484             :     static void     SetMoveType(sal_uInt16 nSet);
     485             :     DECL_STATIC_LINK( SwView, MoveNavigationHdl, bool* ); // #i75416#
     486             :     static void     SetActMark(sal_Int32 nSet);
     487             : 
     488             :     sal_Bool            HandleWheelCommands( const CommandEvent& );
     489             : 
     490             :     // insert frames
     491             :     void            InsFrmMode(sal_uInt16 nCols);
     492             : 
     493             :     void            SetZoom( SvxZoomType eZoomType, short nFactor = 100, sal_Bool bViewOnly = sal_False);
     494             :     virtual void    SetZoomFactor( const Fraction &rX, const Fraction & );
     495             : 
     496             :     void            SetViewLayout( sal_uInt16 nColumns, bool bBookMode, sal_Bool bViewOnly = sal_False );
     497             : 
     498             :     void            ShowHScrollbar(sal_Bool bShow);
     499             :     sal_Bool        IsHScrollbarVisible()const;
     500             : 
     501             :     void            ShowVScrollbar(sal_Bool bShow);
     502             :     sal_Bool        IsVScrollbarVisible()const;
     503             : 
     504             :     void            EnableHScrollbar(bool bEnable);
     505             :     void            EnableVScrollbar(bool bEnable);
     506             : 
     507             :     int             CreateVLineal();
     508             :     int             KillVLineal();
     509             :     int             CreateTab();
     510             :     int             KillTab();
     511             : 
     512           0 :     int             StatVLineal() const { return ((Window*)pVRuler)->IsVisible(); }
     513             :     void            ChangeVLinealMetric(FieldUnit eUnit);
     514             :     void            GetVLinealMetric(FieldUnit& rToFill) const;
     515             : 
     516             :     int             StatTab() const { return ((Window*)pHRuler)->IsVisible(); }
     517           0 :     SvxRuler&       GetHLineal()    { return *pHRuler; }
     518           0 :     SvxRuler&       GetVLineal()    { return *pVRuler; }
     519             :     void            InvalidateRulerPos();
     520             :     void            ChangeTabMetric(FieldUnit eUnit);
     521             :     void            GetHLinealMetric(FieldUnit& rToFill) const;
     522             : 
     523             :         // Handler
     524             :     void            Execute(SfxRequest&);
     525             :     void            ExecPageMove(SfxRequest&);
     526             :     void            ExecStyle(SfxRequest&);
     527             :     void            ExecLingu(SfxRequest&);
     528             :     void            ExecDataBase(SfxRequest&);
     529             :     void            ExecDlg(SfxRequest&);
     530             :     void            ExecDlgExt(SfxRequest&);
     531             :     void            ExecDBDlg(SfxRequest &);
     532             :     void            ExecColl(SfxRequest&);
     533             :     void            ExecutePrint(SfxRequest&);
     534             :     void            ExecDraw(SfxRequest&);
     535             :     void            ExecTabWin(SfxRequest&);
     536             :     void            ExecuteStatusLine(SfxRequest&);
     537             :     DECL_LINK( ExecRulerClick, Ruler * );
     538             :     void            ExecSearch(SfxRequest&, sal_Bool bNoMessage = sal_False);
     539             :     void            ExecViewOptions(SfxRequest &);
     540             : 
     541             :     void            StateViewOptions(SfxItemSet &);
     542             :     void            StateSearch(SfxItemSet &);
     543             :     void            GetState(SfxItemSet&);
     544             :     void            StateStatusLine(SfxItemSet&);
     545             : 
     546             : 
     547             :     // functions for drawing
     548             :     void            SetDrawFuncPtr(SwDrawBase* pFuncPtr);
     549         297 :     inline SwDrawBase* GetDrawFuncPtr(/*sal_Bool bBuf = sal_False*/) const  { return pDrawActual; }
     550             :     void            GetDrawState(SfxItemSet &rSet);
     551             :     void            ExitDraw();
     552           0 :     inline sal_Bool     IsDrawRotate()      { return bDrawRotate; }
     553           0 :     inline void     FlipDrawRotate()    { bDrawRotate = !bDrawRotate; }
     554           0 :     inline sal_Bool     IsDrawSelMode()     { return bDrawSelMode; }
     555             :     void            SetSelDrawSlot();
     556           0 :     inline void     FlipDrawSelMode()   { bDrawSelMode = !bDrawSelMode; }
     557             :     void            NoRotate();     // turn off rotate mode
     558             :     sal_Bool            EnterDrawTextMode(const Point& aDocPos);
     559           0 :     void            LeaveDrawCreate()   { nDrawSfxId = nFormSfxId = USHRT_MAX; sDrawCustom.Erase();}
     560         662 :     sal_Bool            IsDrawMode()        { return (nDrawSfxId != USHRT_MAX || nFormSfxId != USHRT_MAX); }
     561             :     sal_Bool            IsFormMode() const;
     562             :     sal_Bool            IsBezierEditMode();
     563             :     sal_Bool            AreOnlyFormsSelected() const;
     564             :     sal_Bool            HasDrwObj(SdrObject *pSdrObj) const;
     565             :     sal_Bool            HasOnlyObj(SdrObject *pSdrObj, sal_uInt32 eObjInventor) const;
     566             :     sal_Bool            BeginTextEdit(  SdrObject* pObj, SdrPageView* pPV=NULL,
     567             :                                     Window* pWin=NULL, bool bIsNewObj=false, bool bSetSelectionToStart=false );
     568             : 
     569             :     void            StateTabWin(SfxItemSet&);
     570             : 
     571             :     // attributes have changed
     572             :     DECL_LINK( AttrChangedNotify, void* );
     573             : 
     574             :     // form control has been activated
     575             :     DECL_LINK( FormControlActivated, void* );
     576             : 
     577             :     // edit links
     578             :     void            EditLinkDlg();
     579             :     void            AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId = 0);
     580             :     void            InsertCaption(const InsCaptionOpt *pOpt);
     581             : 
     582             :     // Async call by Core
     583             :     void        UpdatePageNums(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr);
     584             : 
     585             :     String      GetPageStr(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr);
     586             : 
     587             :     // hand over Shell
     588         147 :                  SfxShell       *GetCurShell()  { return pShell; }
     589             :                  SwDocShell     *GetDocShell();
     590             :     inline const SwDocShell     *GetDocShell() const;
     591           0 :     inline       FmFormShell    *GetFormShell() { return pFormShell; }
     592           0 :     inline const FmFormShell    *GetFormShell() const { return pFormShell; }
     593             : 
     594             :     // so that in the SubShells' DTors pShell can be reset if applicable
     595          63 :     void ResetSubShell()    { pShell = 0; }
     596             : 
     597             :     virtual void    WriteUserData(String &, sal_Bool bBrowse = sal_False );
     598             :     virtual void    ReadUserData(const String &, sal_Bool bBrowse = sal_False );
     599             :     virtual void    ReadUserDataSequence ( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse );
     600             :     virtual void    WriteUserDataSequence ( com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse );
     601             : 
     602           0 :     void SetCrsrAtTop( sal_Bool bFlag, sal_Bool bCenter = sal_False )
     603           0 :         { bTopCrsr = bFlag, bCenterCrsr = bCenter; }
     604           0 :     sal_Bool IsCrsrAtTop() const                    { return bTopCrsr; }
     605           0 :     sal_Bool IsCrsrAtCenter() const                 { return bCenterCrsr; }
     606             : 
     607             :     bool JumpToSwMark( const String& rMark );
     608             : 
     609             :     long InsertDoc( sal_uInt16 nSlotId, const String& rFileName,
     610             :                     const String& rFilterName, sal_Int16 nVersion = 0 );
     611             : 
     612             :     void ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem );
     613             :     long InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVersion );
     614             :     DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper * );
     615             : 
     616             :     // status methods for clipboard.
     617             :     // Status changes now notified from the clipboard.
     618             :     sal_Bool IsPasteAllowed();
     619             :     sal_Bool IsPasteSpecialAllowed();
     620             : 
     621             :     // Enable mail merge - mail merge field dialog enabled
     622             :     void EnableMailMerge(sal_Bool bEnable = sal_True);
     623             :     //apply Accessiblity options
     624             :     void ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions);
     625             : 
     626             :     SwView(SfxViewFrame* pFrame, SfxViewShell*);
     627             :     ~SwView();
     628             : 
     629             :     void NotifyDBChanged();
     630             : 
     631             :     SfxObjectShellLock CreateTmpSelectionDoc();
     632             : 
     633             :     void        AddTransferable(SwTransferable& rTransferable);
     634             : 
     635             :     // store MailMerge data while "Back to Mail Merge Wizard" FloatingWindow is active
     636             :     // or to support printing
     637             :     void   SetMailMergeConfigItem(SwMailMergeConfigItem*  pConfigItem, sal_uInt16 nRestart, sal_Bool bIsSource);
     638             :     SwMailMergeConfigItem*  GetMailMergeConfigItem();
     639             :     sal_uInt16              GetMailMergeRestartPage() const;
     640             :     sal_Bool                IsMailMergeSourceView() const;
     641             : 
     642             :     void ExecFormatPaintbrush(SfxRequest &);
     643             :     void StateFormatPaintbrush(SfxItemSet &);
     644             : 
     645             :     //public fuer D&D
     646             :     int     InsertGraphic( const String &rPath, const String &rFilter,
     647             :                             sal_Bool bLink = sal_True, GraphicFilter *pFlt = 0,
     648             :                             Graphic* pPreviewGrf = 0,
     649             :                             sal_Bool bRule = sal_False );
     650             : 
     651             :     void ExecuteScan( SfxRequest& rReq );
     652             : 
     653        4982 :     SwPostItMgr* GetPostItMgr() { return mpPostItMgr;}
     654             :     const SwPostItMgr* GetPostItMgr() const { return mpPostItMgr;}
     655             : 
     656             :     // exhibition hack (MA,MBA)
     657             :     void SelectShellForDrop();
     658             : };
     659             : 
     660             : // ----------------- inline Methoden ----------------------
     661          32 : inline long SwView::GetXScroll() const
     662             : {
     663          32 :     return aVisArea.GetWidth() * nScrollX / 100L;
     664             : }
     665             : 
     666          32 : inline long SwView::GetYScroll() const
     667             : {
     668          32 :     return aVisArea.GetHeight() * nScrollY / 100L;
     669             : }
     670             : 
     671           0 : inline const SwDocShell *SwView::GetDocShell() const
     672             : {
     673           0 :     return ((SwView*)this)->GetDocShell();
     674             : }
     675             : 
     676             : SfxTabPage* CreatePrintOptionsPage( Window *pParent,
     677             :                                     const SfxItemSet &rOptions,
     678             :                                     sal_Bool bPreview);
     679             : 
     680             : #endif
     681             : 
     682             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10