xref: /trunk/main/sw/source/ui/inc/view.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir #ifndef _SWVIEW_HXX
28*cdf0e10cSrcweir #define _SWVIEW_HXX
29*cdf0e10cSrcweir 
30*cdf0e10cSrcweir #include <vcl/timer.hxx>
31*cdf0e10cSrcweir #include <vcl/field.hxx>
32*cdf0e10cSrcweir #include <svtools/htmlcfg.hxx>
33*cdf0e10cSrcweir #include <sfx2/viewfac.hxx>
34*cdf0e10cSrcweir #include <sfx2/viewsh.hxx>
35*cdf0e10cSrcweir #include <sfx2/objsh.hxx>
36*cdf0e10cSrcweir #include <editeng/svxenum.hxx>
37*cdf0e10cSrcweir #include <svx/zoomitem.hxx>
38*cdf0e10cSrcweir #include <editeng/editstat.hxx>
39*cdf0e10cSrcweir #include "swdllapi.h"
40*cdf0e10cSrcweir #include <swtypes.hxx>
41*cdf0e10cSrcweir #include <shellid.hxx>
42*cdf0e10cSrcweir #include <layout/layout.hxx>
43*cdf0e10cSrcweir #include <IMark.hxx>
44*cdf0e10cSrcweir 
45*cdf0e10cSrcweir class SwBaseShell;
46*cdf0e10cSrcweir class Button;
47*cdf0e10cSrcweir class ImageButton;
48*cdf0e10cSrcweir class SwTxtFmtColl;
49*cdf0e10cSrcweir class SwPageDesc;
50*cdf0e10cSrcweir class SwFrmFmt;
51*cdf0e10cSrcweir class SwCharFmt;
52*cdf0e10cSrcweir class SwNumRule;
53*cdf0e10cSrcweir class SwViewOption;
54*cdf0e10cSrcweir class SwGlossaryHdl;
55*cdf0e10cSrcweir class SwDrawBase;
56*cdf0e10cSrcweir class SvxRuler;
57*cdf0e10cSrcweir class SvxLRSpaceItem;
58*cdf0e10cSrcweir class SwDocShell;
59*cdf0e10cSrcweir class SwScrollbar;
60*cdf0e10cSrcweir class SvxVCBrowser;
61*cdf0e10cSrcweir class SvBorder;
62*cdf0e10cSrcweir class Ruler;
63*cdf0e10cSrcweir class OutlinerView;
64*cdf0e10cSrcweir class SvxSearchItem;
65*cdf0e10cSrcweir class SearchAttrItemList;
66*cdf0e10cSrcweir class SvxSearchDialog;
67*cdf0e10cSrcweir class SdrView;
68*cdf0e10cSrcweir class Dialog;
69*cdf0e10cSrcweir class SdrObject;
70*cdf0e10cSrcweir class SdrPageView;
71*cdf0e10cSrcweir class SwNaviImageButton;
72*cdf0e10cSrcweir class SwHlpImageButton;
73*cdf0e10cSrcweir class Outliner;
74*cdf0e10cSrcweir class SwView;
75*cdf0e10cSrcweir class SwEditWin;
76*cdf0e10cSrcweir class SwWrtShell;
77*cdf0e10cSrcweir class SwView_Impl;
78*cdf0e10cSrcweir class XSelectionObject;
79*cdf0e10cSrcweir struct SwSearchOptions;
80*cdf0e10cSrcweir class FmFormShell;
81*cdf0e10cSrcweir class CommandEvent;
82*cdf0e10cSrcweir class InsCaptionOpt;
83*cdf0e10cSrcweir class SvGlobalName;
84*cdf0e10cSrcweir class SvtAccessibilityOptions;
85*cdf0e10cSrcweir class SwTransferable;
86*cdf0e10cSrcweir class SwMailMergeConfigItem;
87*cdf0e10cSrcweir class SwTxtNode; // #i23726#
88*cdf0e10cSrcweir class SwPrintData;
89*cdf0e10cSrcweir class SwFormatClipboard;
90*cdf0e10cSrcweir struct SwConversionArgs;
91*cdf0e10cSrcweir class Graphic;
92*cdf0e10cSrcweir class GraphicFilter;
93*cdf0e10cSrcweir class SwPostItMgr;
94*cdf0e10cSrcweir class SwFieldBookmark;
95*cdf0e10cSrcweir 
96*cdf0e10cSrcweir namespace com{ namespace sun { namespace star {
97*cdf0e10cSrcweir     namespace view{ class XSelectionSupplier; }
98*cdf0e10cSrcweir }}}
99*cdf0e10cSrcweir namespace sfx2 { class FileDialogHelper; }
100*cdf0e10cSrcweir 
101*cdf0e10cSrcweir const long nLeftOfst = -370;
102*cdf0e10cSrcweir const long nScrollX  =   30;
103*cdf0e10cSrcweir const long nScrollY  =   30;
104*cdf0e10cSrcweir 
105*cdf0e10cSrcweir #define MINZOOM 20
106*cdf0e10cSrcweir #define MAXZOOM 600
107*cdf0e10cSrcweir 
108*cdf0e10cSrcweir #define MAX_MARKS 5
109*cdf0e10cSrcweir 
110*cdf0e10cSrcweir #define CHILDWIN_LABEL      1
111*cdf0e10cSrcweir #define CHILDWIN_MAILMERGE  2
112*cdf0e10cSrcweir 
113*cdf0e10cSrcweir enum ShellModes
114*cdf0e10cSrcweir {
115*cdf0e10cSrcweir     SHELL_MODE_TEXT,
116*cdf0e10cSrcweir     SHELL_MODE_FRAME,
117*cdf0e10cSrcweir     SHELL_MODE_GRAPHIC,
118*cdf0e10cSrcweir     SHELL_MODE_OBJECT,
119*cdf0e10cSrcweir     SHELL_MODE_DRAW,
120*cdf0e10cSrcweir     SHELL_MODE_DRAW_CTRL,
121*cdf0e10cSrcweir     SHELL_MODE_DRAW_FORM,
122*cdf0e10cSrcweir     SHELL_MODE_DRAWTEXT,
123*cdf0e10cSrcweir     SHELL_MODE_BEZIER,
124*cdf0e10cSrcweir     SHELL_MODE_LIST_TEXT,
125*cdf0e10cSrcweir     SHELL_MODE_TABLE_TEXT,
126*cdf0e10cSrcweir     SHELL_MODE_TABLE_LIST_TEXT,
127*cdf0e10cSrcweir     SHELL_MODE_MEDIA,
128*cdf0e10cSrcweir     SHELL_MODE_EXTRUDED_CUSTOMSHAPE,
129*cdf0e10cSrcweir     SHELL_MODE_FONTWORK,
130*cdf0e10cSrcweir     SHELL_MODE_POSTIT
131*cdf0e10cSrcweir };
132*cdf0e10cSrcweir 
133*cdf0e10cSrcweir /*--------------------------------------------------------------------
134*cdf0e10cSrcweir     Beschreibung:   Anwendung einer Vorlage
135*cdf0e10cSrcweir  --------------------------------------------------------------------*/
136*cdf0e10cSrcweir 
137*cdf0e10cSrcweir struct SwApplyTemplate
138*cdf0e10cSrcweir {
139*cdf0e10cSrcweir     union
140*cdf0e10cSrcweir     {
141*cdf0e10cSrcweir         SwTxtFmtColl* pTxtColl;
142*cdf0e10cSrcweir         SwPageDesc*   pPageDesc;
143*cdf0e10cSrcweir         SwFrmFmt*     pFrmFmt;
144*cdf0e10cSrcweir         SwCharFmt*    pCharFmt;
145*cdf0e10cSrcweir         SwNumRule*    pNumRule;
146*cdf0e10cSrcweir     } aColl;
147*cdf0e10cSrcweir 
148*cdf0e10cSrcweir     int eType;
149*cdf0e10cSrcweir     sal_uInt16 nColor;
150*cdf0e10cSrcweir     SwFormatClipboard* pFormatClipboard;
151*cdf0e10cSrcweir     sal_Bool bUndo;
152*cdf0e10cSrcweir 
153*cdf0e10cSrcweir     SwApplyTemplate() :
154*cdf0e10cSrcweir         eType(0),
155*cdf0e10cSrcweir         nColor(0),
156*cdf0e10cSrcweir         pFormatClipboard(0),
157*cdf0e10cSrcweir         bUndo(sal_False)
158*cdf0e10cSrcweir     {
159*cdf0e10cSrcweir         aColl.pTxtColl = 0;
160*cdf0e10cSrcweir     }
161*cdf0e10cSrcweir };
162*cdf0e10cSrcweir 
163*cdf0e10cSrcweir 
164*cdf0e10cSrcweir /*--------------------------------------------------------------------
165*cdf0e10cSrcweir     Beschreibung:   Sicht auf ein Dokument
166*cdf0e10cSrcweir  --------------------------------------------------------------------*/
167*cdf0e10cSrcweir 
168*cdf0e10cSrcweir class SW_DLLPUBLIC SwView: public SfxViewShell
169*cdf0e10cSrcweir {
170*cdf0e10cSrcweir     //Messehack (MA,MBA)
171*cdf0e10cSrcweir     friend void lcl_SelectShellForDrop( SwView &rView );
172*cdf0e10cSrcweir 
173*cdf0e10cSrcweir     friend class TestTemplateItem;
174*cdf0e10cSrcweir     friend class SwHHCWrapper;
175*cdf0e10cSrcweir     friend class SwHyphWrapper;
176*cdf0e10cSrcweir     friend class SwView_Impl;
177*cdf0e10cSrcweir     friend class SwClipboardChangeListener;
178*cdf0e10cSrcweir 
179*cdf0e10cSrcweir     //suchen & ersetzen
180*cdf0e10cSrcweir     static SvxSearchDialog *pSrchDlg;
181*cdf0e10cSrcweir     static SvxSearchItem   *pSrchItem;
182*cdf0e10cSrcweir 
183*cdf0e10cSrcweir     static sal_uInt16           nInsertCtrlState;
184*cdf0e10cSrcweir     static sal_uInt16           nWebInsertCtrlState;
185*cdf0e10cSrcweir     static sal_uInt16           nInsertObjectCtrlState;
186*cdf0e10cSrcweir     static sal_uInt16           nInsertFieldCtrlState;
187*cdf0e10cSrcweir     static sal_uInt16           nMoveType; // fuer Buttons unter dem Scrollbar (viewmdi)
188*cdf0e10cSrcweir     static sal_Int32        nActMark; // aktuelle Sprungmarke fuer unbenannte Merker
189*cdf0e10cSrcweir 
190*cdf0e10cSrcweir     static sal_Bool             bExtra;
191*cdf0e10cSrcweir     static sal_Bool             bFound;
192*cdf0e10cSrcweir     static sal_Bool             bJustOpened;
193*cdf0e10cSrcweir 
194*cdf0e10cSrcweir     static SearchAttrItemList* pSrchList;
195*cdf0e10cSrcweir     static SearchAttrItemList* pReplList;
196*cdf0e10cSrcweir 
197*cdf0e10cSrcweir 
198*cdf0e10cSrcweir     SvxHtmlOptions      aHTMLOpt;
199*cdf0e10cSrcweir     Timer               aTimer;         //Fuer verzoegerte ChgLnks waehrend
200*cdf0e10cSrcweir                                         //einer Aktion
201*cdf0e10cSrcweir     String              aPageStr;       //Statusanzeige, aktuelle Seite
202*cdf0e10cSrcweir     String              sSwViewData,
203*cdf0e10cSrcweir     //and the new cursor position if the user double click in the PagePreView
204*cdf0e10cSrcweir                         sNewCrsrPos;
205*cdf0e10cSrcweir     // to support keyboard the number of the page to go to can be set too
206*cdf0e10cSrcweir     sal_uInt16              nNewPage;
207*cdf0e10cSrcweir 
208*cdf0e10cSrcweir     Point               aTabColFromDocPos;  //Verschieben von Tabellenspalten aus
209*cdf0e10cSrcweir                                             //aus dem Dokument heraus.
210*cdf0e10cSrcweir     SwTxtNode           * pNumRuleNodeFromDoc; // Moving indent of numrule #i23726#
211*cdf0e10cSrcweir 
212*cdf0e10cSrcweir     Size                aDocSz;         // aktuelle Dokumentgroesse
213*cdf0e10cSrcweir     Rectangle           aVisArea;       // sichtbarer Bereich
214*cdf0e10cSrcweir 
215*cdf0e10cSrcweir     SwEditWin           *pEditWin;
216*cdf0e10cSrcweir     SwWrtShell          *pWrtShell;
217*cdf0e10cSrcweir 
218*cdf0e10cSrcweir     SfxShell            *pShell;        //aktuelle SubShell auf dem Dispatcher
219*cdf0e10cSrcweir     FmFormShell         *pFormShell;    // DB-FormShell
220*cdf0e10cSrcweir 
221*cdf0e10cSrcweir     SwView_Impl         *pViewImpl;     // Impl-Daten fuer UNO + Basic
222*cdf0e10cSrcweir 
223*cdf0e10cSrcweir 
224*cdf0e10cSrcweir     SwScrollbar         *pHScrollbar,   // MDI Bedienelemente
225*cdf0e10cSrcweir                         *pVScrollbar;
226*cdf0e10cSrcweir 
227*cdf0e10cSrcweir     Window              *pScrollFill;   // Dummy-Window zum Fuellen der rechten
228*cdf0e10cSrcweir                                         // unteren Ecke, wenn beide Scrollbars
229*cdf0e10cSrcweir                                         // aktiv sind
230*cdf0e10cSrcweir 
231*cdf0e10cSrcweir     SvxRuler            *pHRuler,
232*cdf0e10cSrcweir                         *pVRuler;
233*cdf0e10cSrcweir     ImageButton         *pTogglePageBtn;
234*cdf0e10cSrcweir 
235*cdf0e10cSrcweir     SwHlpImageButton    *pPageUpBtn,
236*cdf0e10cSrcweir                         *pPageDownBtn;
237*cdf0e10cSrcweir 
238*cdf0e10cSrcweir     SwNaviImageButton   *pNaviBtn;
239*cdf0e10cSrcweir     SwGlossaryHdl       *pGlosHdl;          // Henkel Textbausteine
240*cdf0e10cSrcweir     SwDrawBase          *pDrawActual;
241*cdf0e10cSrcweir 
242*cdf0e10cSrcweir     const SwFrmFmt      *pLastTableFormat;
243*cdf0e10cSrcweir 
244*cdf0e10cSrcweir     SwFormatClipboard   *pFormatClipboard; //holds data for format paintbrush
245*cdf0e10cSrcweir 
246*cdf0e10cSrcweir     SwPostItMgr         *mpPostItMgr;
247*cdf0e10cSrcweir 
248*cdf0e10cSrcweir     int                 nSelectionType;
249*cdf0e10cSrcweir 
250*cdf0e10cSrcweir     static const int MASTERENUMCOMMANDS = 6;
251*cdf0e10cSrcweir 
252*cdf0e10cSrcweir     String          aCurrShapeEnumCommand[ MASTERENUMCOMMANDS ];
253*cdf0e10cSrcweir 
254*cdf0e10cSrcweir     sal_uInt16          nPageCnt;
255*cdf0e10cSrcweir 
256*cdf0e10cSrcweir     // Aktueller Drawmode
257*cdf0e10cSrcweir     sal_uInt16          nDrawSfxId;
258*cdf0e10cSrcweir     String          sDrawCustom; //some drawing types are marked with strings!
259*cdf0e10cSrcweir     sal_uInt16          nFormSfxId;
260*cdf0e10cSrcweir     sal_uInt16          nLastPasteDestination;
261*cdf0e10cSrcweir 
262*cdf0e10cSrcweir     // save the border distance status from SwView::StateTabWin to re-use it in SwView::ExecTabWin()
263*cdf0e10cSrcweir     sal_uInt16          nLeftBorderDistance;
264*cdf0e10cSrcweir     sal_uInt16          nRightBorderDistance;
265*cdf0e10cSrcweir 
266*cdf0e10cSrcweir     sal_Bool            bCenterCrsr : 1,
267*cdf0e10cSrcweir                     bTopCrsr : 1,
268*cdf0e10cSrcweir                     bAllwaysShowSel : 1,
269*cdf0e10cSrcweir                     bTabColFromDoc : 1,
270*cdf0e10cSrcweir                     bNumIndentFromDoc : 1, // #i23726#
271*cdf0e10cSrcweir                     bTabRowFromDoc : 1,
272*cdf0e10cSrcweir                     bSetTabColFromDoc : 1 ,
273*cdf0e10cSrcweir                     bSetTabRowFromDoc : 1,
274*cdf0e10cSrcweir                     bAttrChgNotified : 1,
275*cdf0e10cSrcweir                     bAttrChgNotifiedWithRegistrations : 1,
276*cdf0e10cSrcweir                     bVerbsActive : 1,
277*cdf0e10cSrcweir                     bDrawRotate : 1,
278*cdf0e10cSrcweir                     bDrawSelMode : 1,
279*cdf0e10cSrcweir                     bShowAtResize : 1,
280*cdf0e10cSrcweir                     bInOuterResizePixel : 1,
281*cdf0e10cSrcweir                     bInInnerResizePixel : 1,
282*cdf0e10cSrcweir                     bPasteState : 1,
283*cdf0e10cSrcweir                     bPasteSpecialState : 1,
284*cdf0e10cSrcweir                     bInMailMerge : 1,
285*cdf0e10cSrcweir                     bInDtor : 1, //detect destructor to prevent creating of sub shells while closing
286*cdf0e10cSrcweir                     bOldShellWasPagePreView : 1,
287*cdf0e10cSrcweir                     bIsPreviewDoubleClick : 1, // #i114045#
288*cdf0e10cSrcweir                     bMakeSelectionVisible : 1 // #b6330459# transport the bookmark selection
289*cdf0e10cSrcweir                     ;
290*cdf0e10cSrcweir 
291*cdf0e10cSrcweir     // Methoden fuers Suchen
292*cdf0e10cSrcweir     // Suchkontext setzen
293*cdf0e10cSrcweir     SW_DLLPRIVATE sal_Bool              SearchAndWrap(sal_Bool bApi = sal_False);
294*cdf0e10cSrcweir     SW_DLLPRIVATE sal_Bool          SearchAll(sal_uInt16* pFound = 0);
295*cdf0e10cSrcweir     SW_DLLPRIVATE sal_uLong         FUNC_Search( const SwSearchOptions& rOptions );
296*cdf0e10cSrcweir     SW_DLLPRIVATE void          Replace();
297*cdf0e10cSrcweir 
298*cdf0e10cSrcweir     sal_Bool                                IsDocumentBorder();
299*cdf0e10cSrcweir 
300*cdf0e10cSrcweir     SW_DLLPRIVATE sal_Bool          IsTextTool() const;
301*cdf0e10cSrcweir 
302*cdf0e10cSrcweir     // Bedienelemente verwalten anlegen
303*cdf0e10cSrcweir     SW_DLLPRIVATE void          CreateBtns();
304*cdf0e10cSrcweir     SW_DLLPRIVATE DECL_LINK( BtnPage, Button * );
305*cdf0e10cSrcweir 
306*cdf0e10cSrcweir     SW_DLLPRIVATE DECL_LINK( TimeoutHdl, Timer * );
307*cdf0e10cSrcweir     SW_DLLPRIVATE DECL_LINK( UpdatePercentHdl, GraphicFilter* );
308*cdf0e10cSrcweir 
309*cdf0e10cSrcweir     SW_DLLPRIVATE DECL_LINK( HtmlOptionsHdl, void * );
310*cdf0e10cSrcweir 
311*cdf0e10cSrcweir     inline long     GetXScroll() const;
312*cdf0e10cSrcweir     inline long     GetYScroll() const;
313*cdf0e10cSrcweir     SW_DLLPRIVATE  Point    AlignToPixel(const Point& rPt) const;
314*cdf0e10cSrcweir     SW_DLLPRIVATE   void        CalcPt( Point* pPt,const Rectangle& rRect,
315*cdf0e10cSrcweir                             sal_uInt16 nRangeX = USHRT_MAX,
316*cdf0e10cSrcweir                             sal_uInt16 nRangeY = USHRT_MAX);
317*cdf0e10cSrcweir 
318*cdf0e10cSrcweir     SW_DLLPRIVATE sal_Bool          GetPageScrollUpOffset(SwTwips& rOff) const;
319*cdf0e10cSrcweir     SW_DLLPRIVATE sal_Bool          GetPageScrollDownOffset(SwTwips& rOff) const;
320*cdf0e10cSrcweir 
321*cdf0e10cSrcweir     // Scrollbar Movements
322*cdf0e10cSrcweir     SW_DLLPRIVATE long          PageUp();
323*cdf0e10cSrcweir     SW_DLLPRIVATE long          PageDown();
324*cdf0e10cSrcweir     SW_DLLPRIVATE long          PageUpCrsr(sal_Bool bSelect);
325*cdf0e10cSrcweir     SW_DLLPRIVATE long          PageDownCrsr(sal_Bool bSelect);
326*cdf0e10cSrcweir     SW_DLLPRIVATE long          PhyPageUp();
327*cdf0e10cSrcweir     SW_DLLPRIVATE long          PhyPageDown();
328*cdf0e10cSrcweir 
329*cdf0e10cSrcweir     SW_DLLPRIVATE int               _CreateScrollbar( sal_Bool bHori );
330*cdf0e10cSrcweir     SW_DLLPRIVATE DECL_LINK( ScrollHdl, SwScrollbar * );
331*cdf0e10cSrcweir     SW_DLLPRIVATE DECL_LINK( EndScrollHdl, SwScrollbar * );
332*cdf0e10cSrcweir     SW_DLLPRIVATE sal_Bool          UpdateScrollbars();
333*cdf0e10cSrcweir     SW_DLLPRIVATE void          CalcVisArea( const Size &rPixelSz );
334*cdf0e10cSrcweir 
335*cdf0e10cSrcweir     SW_DLLPRIVATE void            CreatePageButtons(sal_Bool bShow);
336*cdf0e10cSrcweir 
337*cdf0e10cSrcweir     // Linguistik-Funktionen
338*cdf0e10cSrcweir     SW_DLLPRIVATE void          HyphenateDocument();
339*cdf0e10cSrcweir     SW_DLLPRIVATE sal_Bool          IsDrawTextHyphenate();
340*cdf0e10cSrcweir     SW_DLLPRIVATE void          HyphenateDrawText();
341*cdf0e10cSrcweir     SW_DLLPRIVATE void          StartThesaurus();
342*cdf0e10cSrcweir 
343*cdf0e10cSrcweir     // text conversion
344*cdf0e10cSrcweir     SW_DLLPRIVATE void          StartTextConversion( LanguageType nSourceLang, LanguageType nTargetLang, const Font *pTargetFont, sal_Int32 nOptions, sal_Bool bIsInteractive );
345*cdf0e10cSrcweir 
346*cdf0e10cSrcweir     // used for spell checking and text conversion
347*cdf0e10cSrcweir     SW_DLLPRIVATE void          SpellStart( SvxSpellArea eSpell, sal_Bool bStartDone,
348*cdf0e10cSrcweir                                         sal_Bool bEndDone, SwConversionArgs *pConvArgs = 0 );
349*cdf0e10cSrcweir     SW_DLLPRIVATE void          SpellEnd( SwConversionArgs *pConvArgs = 0 );
350*cdf0e10cSrcweir 
351*cdf0e10cSrcweir     SW_DLLPRIVATE void          HyphStart( SvxSpellArea eSpell );
352*cdf0e10cSrcweir     SW_DLLPRIVATE sal_Bool          CheckSpecialCntnt();
353*cdf0e10cSrcweir     SW_DLLPRIVATE void          SpellKontext(sal_Bool bOn = sal_True)
354*cdf0e10cSrcweir                             { bCenterCrsr = bOn; bAllwaysShowSel = bOn; }
355*cdf0e10cSrcweir 
356*cdf0e10cSrcweir     // Methoden fuers Printing
357*cdf0e10cSrcweir     SW_DLLPRIVATE virtual   SfxPrinter*     GetPrinter( sal_Bool bCreate = sal_False );
358*cdf0e10cSrcweir             SfxTabPage*     CreatePrintOptionsPage( Window* pParent,
359*cdf0e10cSrcweir                                                     const SfxItemSet& rSet);
360*cdf0e10cSrcweir     // fuer Readonly-Umschaltung
361*cdf0e10cSrcweir     SW_DLLPRIVATE virtual void  Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
362*cdf0e10cSrcweir     SW_DLLPRIVATE void          _CheckReadonlyState();
363*cdf0e10cSrcweir     SW_DLLPRIVATE void          _CheckReadonlySelection();
364*cdf0e10cSrcweir 
365*cdf0e10cSrcweir     // Methode fuer PageDesc drehen
366*cdf0e10cSrcweir     SW_DLLPRIVATE void          SwapPageMargin(const SwPageDesc&, SvxLRSpaceItem& rLR);
367*cdf0e10cSrcweir 
368*cdf0e10cSrcweir     SW_DLLPRIVATE void          _SetZoom( const Size &rEditSz,
369*cdf0e10cSrcweir                               SvxZoomType eZoomType,
370*cdf0e10cSrcweir                               short nFactor = 100,
371*cdf0e10cSrcweir                               sal_Bool bViewOnly = sal_False);
372*cdf0e10cSrcweir     SW_DLLPRIVATE void          CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool bInner );
373*cdf0e10cSrcweir 
374*cdf0e10cSrcweir     SW_DLLPRIVATE void          ShowAtResize();
375*cdf0e10cSrcweir 
376*cdf0e10cSrcweir     SW_DLLPRIVATE virtual void  Move();
377*cdf0e10cSrcweir 
378*cdf0e10cSrcweir     SW_DLLPRIVATE sal_Bool          InsertGraphicDlg( SfxRequest& );
379*cdf0e10cSrcweir 
380*cdf0e10cSrcweir protected:
381*cdf0e10cSrcweir 
382*cdf0e10cSrcweir     SwView_Impl*    GetViewImpl() {return pViewImpl;}
383*cdf0e10cSrcweir 
384*cdf0e10cSrcweir     void ImpSetVerb( int nSelType );
385*cdf0e10cSrcweir 
386*cdf0e10cSrcweir     int             GetSelectionType() const { return nSelectionType; }
387*cdf0e10cSrcweir     void            SetSelectionType(int nSet) { nSelectionType = nSet;}
388*cdf0e10cSrcweir 
389*cdf0e10cSrcweir     // fuer die SwWebView
390*cdf0e10cSrcweir     void            SetShell( SfxShell* pS )            { pShell = pS; }
391*cdf0e10cSrcweir     void            SetFormShell( FmFormShell* pSh )    { pFormShell = pSh; }
392*cdf0e10cSrcweir 
393*cdf0e10cSrcweir     virtual void    SelectShell();
394*cdf0e10cSrcweir 
395*cdf0e10cSrcweir     virtual void    Activate(sal_Bool);
396*cdf0e10cSrcweir     virtual void    Deactivate(sal_Bool);
397*cdf0e10cSrcweir     virtual void    InnerResizePixel( const Point &rOfs, const Size &rSize );
398*cdf0e10cSrcweir     virtual void    OuterResizePixel( const Point &rOfs, const Size &rSize );
399*cdf0e10cSrcweir     virtual Size    GetOptimalSizePixel() const;
400*cdf0e10cSrcweir 
401*cdf0e10cSrcweir     void            SetImageButtonColor(Color& rColor);
402*cdf0e10cSrcweir 
403*cdf0e10cSrcweir     const SwFrmFmt* GetLastTblFrmFmt() const {return pLastTableFormat;}
404*cdf0e10cSrcweir     void            SetLastTblFrmFmt(const SwFrmFmt* pSet) {pLastTableFormat = pSet;}
405*cdf0e10cSrcweir 
406*cdf0e10cSrcweir     // form letter execution
407*cdf0e10cSrcweir     void    GenerateFormLetter(sal_Bool bUseCurrentDocument);
408*cdf0e10cSrcweir 
409*cdf0e10cSrcweir     using SfxShell::GetDispatcher;
410*cdf0e10cSrcweir 
411*cdf0e10cSrcweir public:
412*cdf0e10cSrcweir 
413*cdf0e10cSrcweir     SFX_DECL_VIEWFACTORY(SwView);
414*cdf0e10cSrcweir     SFX_DECL_INTERFACE(SW_VIEWSHELL)
415*cdf0e10cSrcweir     TYPEINFO();
416*cdf0e10cSrcweir 
417*cdf0e10cSrcweir     SfxDispatcher   &GetDispatcher();
418*cdf0e10cSrcweir 
419*cdf0e10cSrcweir     void                    GotFocus() const;
420*cdf0e10cSrcweir     virtual SdrView*        GetDrawView() const;
421*cdf0e10cSrcweir     virtual sal_Bool        HasUIFeature( sal_uInt32 nFeature );
422*cdf0e10cSrcweir     virtual void            ShowCursor( FASTBOOL bOn = sal_True );
423*cdf0e10cSrcweir     virtual ErrCode         DoVerb( long nVerb );
424*cdf0e10cSrcweir 
425*cdf0e10cSrcweir     virtual sal_uInt16          SetPrinter( SfxPrinter* pNew,
426*cdf0e10cSrcweir                                         sal_uInt16 nDiff = SFX_PRINTER_ALL, bool bIsAPI=false);
427*cdf0e10cSrcweir     ShellModes              GetShellMode();
428*cdf0e10cSrcweir 
429*cdf0e10cSrcweir     com::sun::star::view::XSelectionSupplier*       GetUNOObject();
430*cdf0e10cSrcweir 
431*cdf0e10cSrcweir     String                  GetSelectionTextParam( sal_Bool bCompleteWords,
432*cdf0e10cSrcweir                                                    sal_Bool bEraseTrail );
433*cdf0e10cSrcweir     virtual sal_Bool            HasSelection( sal_Bool  bText ) const;
434*cdf0e10cSrcweir     virtual String          GetSelectionText( sal_Bool bCompleteWords = sal_False );
435*cdf0e10cSrcweir     virtual sal_uInt16          PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False );
436*cdf0e10cSrcweir     virtual void            MarginChanged();
437*cdf0e10cSrcweir 
438*cdf0e10cSrcweir     // replace word/selection with text from the thesaurus
439*cdf0e10cSrcweir     // (this code has special handling for "in word" character)
440*cdf0e10cSrcweir     void                    InsertThesaurusSynonym( const String &rSynonmText, const String &rLookUpText, bool bValidSelection );
441*cdf0e10cSrcweir     bool                    IsValidSelectionForThesaurus() const;
442*cdf0e10cSrcweir     String                  GetThesaurusLookUpText( bool bSelection ) const;
443*cdf0e10cSrcweir 
444*cdf0e10cSrcweir     // Shell sofort wechseln ->  fuer GetSelectionObject
445*cdf0e10cSrcweir     void        StopShellTimer();
446*cdf0e10cSrcweir 
447*cdf0e10cSrcweir     inline SwWrtShell&      GetWrtShell   () const { return *pWrtShell; }
448*cdf0e10cSrcweir     inline SwWrtShell*      GetWrtShellPtr() const { return  pWrtShell; }
449*cdf0e10cSrcweir 
450*cdf0e10cSrcweir     inline       SwEditWin &GetEditWin()        { return *pEditWin; }
451*cdf0e10cSrcweir     inline const SwEditWin &GetEditWin () const { return *pEditWin; }
452*cdf0e10cSrcweir 
453*cdf0e10cSrcweir #if defined WNT || defined UNX
454*cdf0e10cSrcweir     void ScannerEventHdl( const ::com::sun::star::lang::EventObject& rEventObject );
455*cdf0e10cSrcweir #endif
456*cdf0e10cSrcweir 
457*cdf0e10cSrcweir     //Handler fuer Textbausteine an die Textshell rausreichen, gfs. anlegen
458*cdf0e10cSrcweir     SwGlossaryHdl*          GetGlosHdl();
459*cdf0e10cSrcweir 
460*cdf0e10cSrcweir     inline const Rectangle& GetVisArea() const { return aVisArea; }
461*cdf0e10cSrcweir 
462*cdf0e10cSrcweir     sal_Bool            IsScroll(const Rectangle& rRect) const;
463*cdf0e10cSrcweir     void            Scroll( const Rectangle& rRect,
464*cdf0e10cSrcweir                             sal_uInt16 nRangeX = USHRT_MAX,
465*cdf0e10cSrcweir                             sal_uInt16 nRangeY = USHRT_MAX);
466*cdf0e10cSrcweir 
467*cdf0e10cSrcweir     long        SetVScrollMax(long lMax);
468*cdf0e10cSrcweir     long        SetHScrollMax(long lMax);
469*cdf0e10cSrcweir 
470*cdf0e10cSrcweir     DECL_LINK( SpellError, LanguageType * );
471*cdf0e10cSrcweir     sal_Bool            ExecSpellPopup( const Point& rPt );
472*cdf0e10cSrcweir     sal_Bool            ExecFieldPopup( const Point& rPt, sw::mark::IFieldmark *fieldBM );
473*cdf0e10cSrcweir     // SMARTTAGS
474*cdf0e10cSrcweir     sal_Bool            ExecSmartTagPopup( const Point& rPt );
475*cdf0e10cSrcweir 
476*cdf0e10cSrcweir     DECL_LINK( OnlineSpellCallback, SpellCallbackInfo*);
477*cdf0e10cSrcweir     sal_Bool            ExecDrwTxtSpellPopup(const Point& rPt);
478*cdf0e10cSrcweir 
479*cdf0e10cSrcweir     void            SetTabColFromDocPos( const Point &rPt ) { aTabColFromDocPos = rPt; }
480*cdf0e10cSrcweir     void            SetTabColFromDoc( sal_Bool b ) { bTabColFromDoc = b; }
481*cdf0e10cSrcweir     sal_Bool            IsTabColFromDoc() const    { return bTabColFromDoc; }
482*cdf0e10cSrcweir     void            SetTabRowFromDoc( sal_Bool b ) { bTabRowFromDoc = b; }
483*cdf0e10cSrcweir     sal_Bool            IsTabRowFromDoc() const    { return bTabRowFromDoc; }
484*cdf0e10cSrcweir 
485*cdf0e10cSrcweir     // -> #i23726#
486*cdf0e10cSrcweir     void            SetNumRuleNodeFromDoc( SwTxtNode * pNumRuleNode )
487*cdf0e10cSrcweir                     { pNumRuleNodeFromDoc = pNumRuleNode; }
488*cdf0e10cSrcweir     void            SetNumIndentFromDoc(sal_Bool b) { bNumIndentFromDoc = b; }
489*cdf0e10cSrcweir     sal_Bool            IsNumIndentFromDoc() const { return NULL != pNumRuleNodeFromDoc; }
490*cdf0e10cSrcweir     // <- #i23726#
491*cdf0e10cSrcweir 
492*cdf0e10cSrcweir     void    DocSzChgd( const Size& rNewSize );
493*cdf0e10cSrcweir     const   Size&   GetDocSz() const { return aDocSz; }
494*cdf0e10cSrcweir     virtual void    SetVisArea( const Rectangle&, sal_Bool bUpdateScrollbar = sal_True);
495*cdf0e10cSrcweir             void    SetVisArea( const Point&, sal_Bool bUpdateScrollbar = sal_True);
496*cdf0e10cSrcweir             void    CheckVisArea();
497*cdf0e10cSrcweir 
498*cdf0e10cSrcweir     void RecheckBrowseMode();
499*cdf0e10cSrcweir     static LAYOUT_NS Dialog* GetSearchDialog();
500*cdf0e10cSrcweir 
501*cdf0e10cSrcweir     static sal_uInt16   GetMoveType();
502*cdf0e10cSrcweir     static void     SetMoveType(sal_uInt16 nSet);
503*cdf0e10cSrcweir     DECL_STATIC_LINK( SwView, MoveNavigationHdl, bool* ); // #i75416#
504*cdf0e10cSrcweir     static void     SetActMark(sal_Int32 nSet);
505*cdf0e10cSrcweir 
506*cdf0e10cSrcweir     sal_Bool            HandleWheelCommands( const CommandEvent& );
507*cdf0e10cSrcweir 
508*cdf0e10cSrcweir     // Rahmen einfuegen
509*cdf0e10cSrcweir     void            InsFrmMode(sal_uInt16 nCols);
510*cdf0e10cSrcweir 
511*cdf0e10cSrcweir     void            SetZoom( SvxZoomType eZoomType, short nFactor = 100, sal_Bool bViewOnly = sal_False);
512*cdf0e10cSrcweir     virtual void    SetZoomFactor( const Fraction &rX, const Fraction & );
513*cdf0e10cSrcweir 
514*cdf0e10cSrcweir     void            SetViewLayout( sal_uInt16 nColumns, bool bBookMode, sal_Bool bViewOnly = sal_False );
515*cdf0e10cSrcweir 
516*cdf0e10cSrcweir     void            ShowHScrollbar(sal_Bool bShow);
517*cdf0e10cSrcweir     sal_Bool        IsHScrollbarVisible()const;
518*cdf0e10cSrcweir 
519*cdf0e10cSrcweir     void            ShowVScrollbar(sal_Bool bShow);
520*cdf0e10cSrcweir     sal_Bool        IsVScrollbarVisible()const;
521*cdf0e10cSrcweir 
522*cdf0e10cSrcweir     int             CreateVLineal();
523*cdf0e10cSrcweir     int             KillVLineal();
524*cdf0e10cSrcweir     int             CreateTab();
525*cdf0e10cSrcweir     int             KillTab();
526*cdf0e10cSrcweir 
527*cdf0e10cSrcweir     int             StatVLineal() const { return ((Window*)pVRuler)->IsVisible(); }
528*cdf0e10cSrcweir     void            ChangeVLinealMetric(FieldUnit eUnit);
529*cdf0e10cSrcweir     void            GetVLinealMetric(FieldUnit& rToFill) const;
530*cdf0e10cSrcweir 
531*cdf0e10cSrcweir     int             StatTab() const { return ((Window*)pHRuler)->IsVisible(); }
532*cdf0e10cSrcweir     SvxRuler&       GetHLineal()    { return *pHRuler; }
533*cdf0e10cSrcweir     SvxRuler&       GetVLineal()    { return *pVRuler; }
534*cdf0e10cSrcweir     void            InvalidateRulerPos();
535*cdf0e10cSrcweir     void            ChangeTabMetric(FieldUnit eUnit);
536*cdf0e10cSrcweir     void            GetHLinealMetric(FieldUnit& rToFill) const;
537*cdf0e10cSrcweir 
538*cdf0e10cSrcweir         // Handler
539*cdf0e10cSrcweir     void            Execute(SfxRequest&);
540*cdf0e10cSrcweir     void            ExecPageMove(SfxRequest&);
541*cdf0e10cSrcweir     void            ExecStyle(SfxRequest&);
542*cdf0e10cSrcweir     void            ExecLingu(SfxRequest&);
543*cdf0e10cSrcweir     void            ExecDataBase(SfxRequest&);
544*cdf0e10cSrcweir     void            ExecDlg(SfxRequest&);
545*cdf0e10cSrcweir     void            ExecDlgExt(SfxRequest&);
546*cdf0e10cSrcweir     void            ExecDBDlg(SfxRequest &);
547*cdf0e10cSrcweir     void            ExecColl(SfxRequest&);
548*cdf0e10cSrcweir     void            ExecutePrint(SfxRequest&);
549*cdf0e10cSrcweir     void            ExecDraw(SfxRequest&);
550*cdf0e10cSrcweir     void            ExecTabWin(SfxRequest&);
551*cdf0e10cSrcweir     void            ExecuteStatusLine(SfxRequest&);
552*cdf0e10cSrcweir     DECL_LINK( ExecRulerClick, Ruler * );
553*cdf0e10cSrcweir     void            ExecSearch(SfxRequest&, sal_Bool bNoMessage = sal_False);
554*cdf0e10cSrcweir     void            ExecViewOptions(SfxRequest &);
555*cdf0e10cSrcweir 
556*cdf0e10cSrcweir     void            StateViewOptions(SfxItemSet &);
557*cdf0e10cSrcweir     void            StateSearch(SfxItemSet &);
558*cdf0e10cSrcweir     void            GetState(SfxItemSet&);
559*cdf0e10cSrcweir     void            StateStatusLine(SfxItemSet&);
560*cdf0e10cSrcweir 
561*cdf0e10cSrcweir 
562*cdf0e10cSrcweir     // Funktionen fuer Drawing
563*cdf0e10cSrcweir     void            SetDrawFuncPtr(SwDrawBase* pFuncPtr);
564*cdf0e10cSrcweir     inline SwDrawBase* GetDrawFuncPtr(/*sal_Bool bBuf = sal_False*/) const  { return pDrawActual; }
565*cdf0e10cSrcweir     void            GetDrawState(SfxItemSet &rSet);
566*cdf0e10cSrcweir     void            ExitDraw();
567*cdf0e10cSrcweir     inline sal_Bool     IsDrawRotate()      { return bDrawRotate; }
568*cdf0e10cSrcweir     inline void     FlipDrawRotate()    { bDrawRotate = !bDrawRotate; }
569*cdf0e10cSrcweir     inline sal_Bool     IsDrawSelMode()     { return bDrawSelMode; }
570*cdf0e10cSrcweir     void            SetSelDrawSlot();
571*cdf0e10cSrcweir     inline void     FlipDrawSelMode()   { bDrawSelMode = !bDrawSelMode; }
572*cdf0e10cSrcweir     void            NoRotate();     // Rotate-Mode abschalten
573*cdf0e10cSrcweir     sal_Bool            EnterDrawTextMode(const Point& aDocPos);
574*cdf0e10cSrcweir     void            LeaveDrawCreate()   { nDrawSfxId = nFormSfxId = USHRT_MAX; sDrawCustom.Erase();}
575*cdf0e10cSrcweir     sal_Bool            IsDrawMode()        { return (nDrawSfxId != USHRT_MAX || nFormSfxId != USHRT_MAX); }
576*cdf0e10cSrcweir     sal_Bool            IsFormMode() const;
577*cdf0e10cSrcweir     sal_Bool            IsBezierEditMode();
578*cdf0e10cSrcweir     sal_Bool            AreOnlyFormsSelected() const;
579*cdf0e10cSrcweir     sal_Bool            HasDrwObj(SdrObject *pSdrObj) const;
580*cdf0e10cSrcweir     sal_Bool            HasOnlyObj(SdrObject *pSdrObj, sal_uInt32 eObjInventor) const;
581*cdf0e10cSrcweir     sal_Bool            BeginTextEdit(  SdrObject* pObj, SdrPageView* pPV=NULL,
582*cdf0e10cSrcweir                                     Window* pWin=NULL, bool bIsNewObj=false, bool bSetSelectionToStart=false );
583*cdf0e10cSrcweir 
584*cdf0e10cSrcweir     void            StateTabWin(SfxItemSet&);
585*cdf0e10cSrcweir 
586*cdf0e10cSrcweir     // Attribute haben sich geaendert
587*cdf0e10cSrcweir     DECL_LINK( AttrChangedNotify, SwWrtShell * );
588*cdf0e10cSrcweir 
589*cdf0e10cSrcweir     // form control has been activated
590*cdf0e10cSrcweir     DECL_LINK( FormControlActivated, FmFormShell* );
591*cdf0e10cSrcweir 
592*cdf0e10cSrcweir     // Links bearbeiten
593*cdf0e10cSrcweir     void            EditLinkDlg();
594*cdf0e10cSrcweir     void            AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId = 0);
595*cdf0e10cSrcweir     void            InsertCaption(const InsCaptionOpt *pOpt);
596*cdf0e10cSrcweir 
597*cdf0e10cSrcweir     // Async Aufruf durch Core
598*cdf0e10cSrcweir     void        UpdatePageNums(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr);
599*cdf0e10cSrcweir 
600*cdf0e10cSrcweir     String      GetPageStr(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr);
601*cdf0e10cSrcweir 
602*cdf0e10cSrcweir     // Shell rausreichen
603*cdf0e10cSrcweir                  SfxShell       *GetCurShell()  { return pShell; }
604*cdf0e10cSrcweir                  SwDocShell     *GetDocShell();
605*cdf0e10cSrcweir     inline const SwDocShell     *GetDocShell() const;
606*cdf0e10cSrcweir     inline       FmFormShell    *GetFormShell() { return pFormShell; }
607*cdf0e10cSrcweir     inline const FmFormShell    *GetFormShell() const { return pFormShell; }
608*cdf0e10cSrcweir 
609*cdf0e10cSrcweir     //damit in DToren der SubShells ggf. pShell zurueckgesetzt werden kann
610*cdf0e10cSrcweir     void ResetSubShell()    { pShell = 0; }
611*cdf0e10cSrcweir 
612*cdf0e10cSrcweir     virtual void    WriteUserData(String &, sal_Bool bBrowse = sal_False );
613*cdf0e10cSrcweir     virtual void    ReadUserData(const String &, sal_Bool bBrowse = sal_False );
614*cdf0e10cSrcweir     virtual void    ReadUserDataSequence ( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse );
615*cdf0e10cSrcweir     virtual void    WriteUserDataSequence ( com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse );
616*cdf0e10cSrcweir 
617*cdf0e10cSrcweir     void SetCrsrAtTop( sal_Bool bFlag, sal_Bool bCenter = sal_False )
618*cdf0e10cSrcweir         { bTopCrsr = bFlag, bCenterCrsr = bCenter; }
619*cdf0e10cSrcweir     sal_Bool IsCrsrAtTop() const                    { return bTopCrsr; }
620*cdf0e10cSrcweir     sal_Bool IsCrsrAtCenter() const                 { return bCenterCrsr; }
621*cdf0e10cSrcweir 
622*cdf0e10cSrcweir     sal_Bool JumpToSwMark( const String& rMark );
623*cdf0e10cSrcweir 
624*cdf0e10cSrcweir     long InsertDoc( sal_uInt16 nSlotId, const String& rFileName,
625*cdf0e10cSrcweir                     const String& rFilterName, sal_Int16 nVersion = 0 );
626*cdf0e10cSrcweir 
627*cdf0e10cSrcweir     void ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem );
628*cdf0e10cSrcweir     long InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVersion );
629*cdf0e10cSrcweir     DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper * );
630*cdf0e10cSrcweir 
631*cdf0e10cSrcweir     // status methods for clipboard.
632*cdf0e10cSrcweir     // Status changes now notified from the clipboard.
633*cdf0e10cSrcweir     sal_Bool IsPasteAllowed();
634*cdf0e10cSrcweir     sal_Bool IsPasteSpecialAllowed();
635*cdf0e10cSrcweir 
636*cdf0e10cSrcweir     // Enable mail merge - mail merge field dialog enabled
637*cdf0e10cSrcweir     void EnableMailMerge(sal_Bool bEnable = sal_True);
638*cdf0e10cSrcweir     //apply Accessiblity options
639*cdf0e10cSrcweir     void ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions);
640*cdf0e10cSrcweir 
641*cdf0e10cSrcweir     SwView(SfxViewFrame* pFrame, SfxViewShell*);
642*cdf0e10cSrcweir     ~SwView();
643*cdf0e10cSrcweir 
644*cdf0e10cSrcweir     void NotifyDBChanged();
645*cdf0e10cSrcweir 
646*cdf0e10cSrcweir     SfxObjectShellLock & GetTmpSelectionDoc();
647*cdf0e10cSrcweir     SfxObjectShellLock & GetOrCreateTmpSelectionDoc();
648*cdf0e10cSrcweir 
649*cdf0e10cSrcweir     void        AddTransferable(SwTransferable& rTransferable);
650*cdf0e10cSrcweir 
651*cdf0e10cSrcweir     // store MailMerge data while "Back to Mail Merge Wizard" FloatingWindow is active
652*cdf0e10cSrcweir     // or to support printing
653*cdf0e10cSrcweir     void   SetMailMergeConfigItem(SwMailMergeConfigItem*  pConfigItem, sal_uInt16 nRestart, sal_Bool bIsSource);
654*cdf0e10cSrcweir     SwMailMergeConfigItem*  GetMailMergeConfigItem();
655*cdf0e10cSrcweir     sal_uInt16              GetMailMergeRestartPage() const;
656*cdf0e10cSrcweir     sal_Bool                IsMailMergeSourceView() const;
657*cdf0e10cSrcweir 
658*cdf0e10cSrcweir     void ExecFormatPaintbrush(SfxRequest &);
659*cdf0e10cSrcweir     void StateFormatPaintbrush(SfxItemSet &);
660*cdf0e10cSrcweir 
661*cdf0e10cSrcweir     //public fuer D&D
662*cdf0e10cSrcweir     int     InsertGraphic( const String &rPath, const String &rFilter,
663*cdf0e10cSrcweir                             sal_Bool bLink = sal_True, GraphicFilter *pFlt = 0,
664*cdf0e10cSrcweir                             Graphic* pPreviewGrf = 0,
665*cdf0e10cSrcweir                             sal_Bool bRule = sal_False );
666*cdf0e10cSrcweir 
667*cdf0e10cSrcweir     void ExecuteScan( SfxRequest& rReq );
668*cdf0e10cSrcweir 
669*cdf0e10cSrcweir     SwPostItMgr* GetPostItMgr() { return mpPostItMgr;}
670*cdf0e10cSrcweir     const SwPostItMgr* GetPostItMgr() const { return mpPostItMgr;}
671*cdf0e10cSrcweir };
672*cdf0e10cSrcweir 
673*cdf0e10cSrcweir // ----------------- inline Methoden ----------------------
674*cdf0e10cSrcweir 
675*cdf0e10cSrcweir inline long SwView::GetXScroll() const
676*cdf0e10cSrcweir {
677*cdf0e10cSrcweir     return aVisArea.GetWidth() * nScrollX / 100L;
678*cdf0e10cSrcweir }
679*cdf0e10cSrcweir 
680*cdf0e10cSrcweir inline long SwView::GetYScroll() const
681*cdf0e10cSrcweir {
682*cdf0e10cSrcweir     return aVisArea.GetHeight() * nScrollY / 100L;
683*cdf0e10cSrcweir }
684*cdf0e10cSrcweir 
685*cdf0e10cSrcweir inline const SwDocShell *SwView::GetDocShell() const
686*cdf0e10cSrcweir {
687*cdf0e10cSrcweir     return ((SwView*)this)->GetDocShell();
688*cdf0e10cSrcweir }
689*cdf0e10cSrcweir 
690*cdf0e10cSrcweir //***********************************************************
691*cdf0e10cSrcweir 
692*cdf0e10cSrcweir SfxTabPage* CreatePrintOptionsPage( Window *pParent,
693*cdf0e10cSrcweir                                     const SfxItemSet &rOptions,
694*cdf0e10cSrcweir                                     sal_Bool bPreview);
695*cdf0e10cSrcweir 
696*cdf0e10cSrcweir #endif
697*cdf0e10cSrcweir 
698