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